[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gnu Make
From: |
VardhanVarma |
Subject: |
Re: Gnu Make |
Date: |
Wed, 03 Jan 2001 08:38:39 +0531 |
> makefile using a for loop. The problem is whenever a
> low level makefile has an error and reports an error,
> the top level make continues with the next make in the
> loop. I need the top level makefile to stop inside the
> for loop when a low level make has an error.
After the obvious suggestion to search the net for a
paper titled "Recursive Make Considered Harmful", i
have a few feelings:
1. Check your makefile. Most probably you are using a shell script
like this
all: for x in $DIRS\
(cd $x ; make)
This will of course not work, since lowerlevel's make's retgurn
code is being ignored.
Instead try something like this:
(cd $x ; make ; if $? != 0 exit 1 )
(suit to your particular /bin/sh )
2. something like this
i write a macro to have each directory in $DIRS with a _dir extension
( e.g. (src lib) ==> (src_dir lib_dir)
And have rule such as
all_dir: $(DIRS_dir)
$(DIRS_dir):
cd $@ && make @@ $@ is name of target, if my memory serves me right.
> I have a problem with calling makefiles within a
> makefile. The toplevel makefile is calling these
>
> Thanks In Advance
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-make