[lug] How do you setup a recursive make?

bdoctor at ps-ax.com bdoctor at ps-ax.com
Mon Jul 23 10:46:34 MDT 2001


I completely agree with your assertion, however I must say this didn't come 
from the file you mention -- at least it wasn't copied when I sent this, 
rather it is the basis for another project I am working on.  You are right
though, it does appear to come from that file, no doubt.  Thanks for pointing
this out .. it will be propogated on my end.  Apologies if it was misleading.

-brad

> >>>>> "Brad" == Brad Doctor <bdoctor at ps-ax.com> writes:
> 
> Brad> SUBDIRS = lib server client docs
> Brad> METHODS = all clean
> Brad>    default-recursive:
> Brad>          @set fnord $(MAKEFLAGS); amf=$$2; \
> Brad>          dot_seen=no; \
> Brad>          target=`echo $@ | sed s/-recursive//`; \
> Brad>          list='$(SUBDIRS)'; for subdir in $$list; do \
> Brad>            echo "Making $$target in $$subdir"; \
> Brad>            if test "$$subdir" = "."; then \
> Brad>              dot_seen=yes; \
> Brad>              local_target="$$target-am"; \
> Brad>            else \
> Brad>              local_target="$$target"; \
> Brad>            fi; \
> Brad>            (cd $$subdir && $(MAKE) $(LOC_MAKEFLAGS) $$local_target) \
> Brad>             || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; 
> Brad> esac; \
> Brad>          done; \
> 
> This looks a lot like automake code (it has a couple additions, but it
> pretty much comes straight from lib/am/subdirs.am).
> 
> Please be careful when recommending that people copy it.  It is GPL.
> 
> The above chunk might even be big enough for this to matter (it's
> unclear; the FSF guideline is that 10 lines of code is enough to
> require paperwork, so I'm assuming this works both ways).  And in case
> anybody thinks this code is obvious (ha, ha) and not worth its
> copyright, there are at least 3 things in there that we learned
> through long experience.  We certainly didn't write it this way the
> first time.  Or the second.
> 
> Tom
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> 




More information about the LUG mailing list