On Jun 16, 2004, at 11:42 AM, Norris, Nelson [LBRT/LNA] wrote:

I am looking for assistance in creating a makefile that will navigate a tree of directories, and perform a build on each subdirectory.

[snip]

MAKEDIRS = controlBoard displayBoard serialOptionBoard
all:
��� $(foreach dir, $(MAKEDIRS), $(MAKE) -C $(dir))
        $(foreach dir, $(MAKEDIRS), $(MAKE) -C $(dir);)

Note the semicolon before the final close-paren.

The response I get back from GNUmake is the following text:

gmake[1]: Entering directory `C:/_projects/mainProject'
gmake -C controlBoard� gmake -C displayBoard� gmake -C serialOptionBoard

What you wanted was:

gmake -C controlBoard;� gmake -C displayBoard;� gmake -C serialOptionBoard;

The lack of the semicolons causes the shell to interpret all the tokens following "controlBoard" as arguments to the first gmake command. The second "-C" argument to gmake causes it to try to descend into the controlBoard/displayBoard subdirectory, which doesn't exist, hence the error messages:
gmake: Entering an unknown directory
gmake: Leaving an unknown directory

Regards, -Steve -------- Steve Byan <[EMAIL PROTECTED]> Software Architect Egenera, Inc. 165 Forest Street Marlboro, MA 01752 (508) 858-3125



_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to