a Make question
fnf at unisoft.UUCP
fnf at unisoft.UUCP
Thu Oct 31 14:18:12 AEST 1985
In article <1596 at uwmacc.UUCP> jwp at uwmacc.UUCP (Jeffrey W Percival) writes:
>Here's a simple makefile:
>
> DIRS = d1 d2 d3 d4 d5
> depend: ; (for dir in $(DIRS); do (cd $dir; make depend); done)
>
>The problem with this is that 'make' is interpreting the $d as a null
>string, so the 'cd' command sees an argument of "ir". I tried
>escaping the $ preceding dir, to no avail. Can anybody make the
>above loop work, or suggest a better way? Thanks!
Try:
==========================
DIRS = d1 d2 d3 d4 d5
depend: $(DIRS)
$(DIRS): FRC
cd $@; make depend
FRC:
==========================
-Fred
More information about the Comp.unix
mailing list