[linux-lvm] Make doesn't abort on error

Luca Berra bluca at comedia.it
Sun Dec 17 10:01:47 UTC 2000


On Sat, Dec 16, 2000 at 04:19:02PM +0100, Russell Coker wrote:
> Above is the error condition that make isn't detecting.  I've changed the 
> makefiles to use sonames so I can have multiple versions installed with ease 
> (I'll send the patch here when it's working - hopefully within 24 hours 
> otherwise maybe after Christmas).

i already posted such a patch

> Below is the code from make.tmpl.  For some reason when the "make -c 
> tools/lib all" fails it doesn't result in compilation aborting.  Perhaps 
> someone who knows make and shell scripting better than I can advise...
> 
> all:
>         @for d in $(SUBDIRS); \
>          do \
>             if [ "$$d" = "." ]; \
>             then \
>                $(MAKE) all_this; \
>             else \
>                $(MAKE) -C $$d all; \
>             fi; \
>          done

make checks output of the command it issues, in this case the shell that runs
the for loop, since the for loop has no error checking make does not complain.
If you want make to exit you should either recode the for loop or do something
like this:

--- --- --- --- --- ---
all: $(SUBDIRS)

$(SUBDIRS): dummy
    $(MAKE) -C $@

dummy:
--- --- --- --- --- ---

L.


-- 
Luca Berra -- bluca at comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \



More information about the linux-lvm mailing list