|
From: | Mark Marshall |
Subject: | Re: how to create a single rule to build a directory as necessary |
Date: | Wed, 23 Sep 2009 13:02:59 +0100 |
User-agent: | Thunderbird 2.0.0.19 (Windows/20081209) |
Sam Steingold wrote:
so, I have this: --------------------------------------------------- .PHONY : gllib gllib: mkdir -p $@if test ! -f $@/Makefile; then sh config.status $@/Makefile depfiles; ficd $@ && $(MAKE) CFLAGS="$(SUBDIR_CFLAGS)" ---------------------------------------------------
I think this does what you want - things should depend on "gllib/stamp-make" to make sure that it gets rebuilt.
--------------------------------------------------- gllib/Makefile: config.status mkdir -p $(dir $@) sh config.status $@ depfiles gllib/stamp-make: gllib/Makefile cd $(dir $@) && $(MAKE) CFLAGS="$(SUBDIR_CFLAGS)" touch $@ --------------------------------------------------- Should gllib/Makefile also depends on depfiles? MM
[Prev in Thread] | Current Thread | [Next in Thread] |