%% Jason Lunz <[EMAIL PROTECTED]> writes: jl> [EMAIL PROTECTED] said: >> I prefer to do something like this: >> >> MKDIRS += foo >> MKDIRS += bar >> ... >> >> __dummy := $(shell foreach d in $(MKDIRS); do [ -d $$d ] || mkdir -p $$d; done) >> >> That is loop is invoked once per invocation of make.
jl> Is there any reason for the __dummy? I have a Makefile that does: jl> $(shell mkdir -p $(OUTDIR)) jl> and that seems to work fine. It's a safety feature. If for some reason the shell script prints something to stdout then the __dummy will capture it. Otherwise it'll be interpreted as part of your makefile and most likely generate a syntax error. Just a habit, basically. -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
