help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looping in MAKE


From: Philip Guenther
Subject: Re: Looping in MAKE
Date: Wed, 21 Sep 2011 22:13:29 -0700

On Wed, Sep 21, 2011 at 6:08 PM, MD.Mahbubur Rahman
<address@hidden> wrote:
> I found foreach function in MAKE specification. How I can use
> for,while,switch-case in MAKE? May be this is a stupid question. Please help
> me as I am new in MAKE world....

Stop.

If you're new to the make world, then you shouldn't be studying up on
make functions like $(foreach), as *most* makefiles have no need of
them.  You should *first* be writing out a simple, declarative
makefile that uses no functions.  If you don't have a sense how a
makefile should operate and be written to get it's job done, then
learning how to write them more concisely is *bad*, because it just
distracts you from getting the job done.

Every language, including make, has a progression from simple to
complex.  Until you are comfortable with the simple, the complex is a
distraction that should be ignored.  A beginning C++ programmer
shouldn't try to understand templates immediately, nor should a
beginning make programmer start with make functions.

So, back up.

WHAT PROBLEM ARE YOU TRYING TO SOLVE?


Philip Guenther



reply via email to

[Prev in Thread] Current Thread [Next in Thread]