Paul Smith wrote:
On Tue, 2009-09-22 at 13:19 -0400, Sam Steingold wrote:
Do I need to explicitly type
gllib/foo gllib/bar : config.status
mkdir -p gllib; cd gllib; make
You still have to consider prerequisites. Is it true that the one and
only reason gllib/foo or gllib/bar might need to be rebuilt is because
of a change to config.status?
OK, you got me.
what I _actually_ really need is this:
if config.status is newer, gllib should be removed and rebuilt from scratch.
otherwise the usual PHONY/cd+make is good enough.
so,
I have this:
---------------------------------------------------
.PHONY : gllib
gllib:
mkdir -p $@
if test ! -f $@/Makefile; then sh config.status $@/Makefile depfiles; fi
cd $@ && $(MAKE) CFLAGS="$(SUBDIR_CFLAGS)"
---------------------------------------------------
alas, when config.status has been changed, gllib must be removed before make
will do its job properly.
so, what should I do?
one thing that just occurred to me - maybe I should modify the config.status
rule to read:
config.status : configure
$(RM) config.cache
>new> rm -rf gllib
sh config.status --recheck
does this look right?
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make