Hello Ian,I'm sorry I re-read what I wrote and found I hadn't adequately answered the question below:
Ian Lynagh wrote:
Peter Tanski wrote:You could force a rebuild by making the PHONY rebuild.$ (SUBDIR) a dependancy of FORCE: but then it might still rebuild base if you want to force a rebuild of unix--I haven't used FORCE before, though I have used 'make -o file'. I'm not sure why you would want to do this often--if Make can 'see' everything then you should be able to say 'make unix' and Make would only rebuild changed files as it normally does.This sounds like it would rerun configure for each change to the librarysources?
With the $(eval ) setup in the Makefile I sent Simon M (and CVS, I re- send it below), there is a large Make-function:
define mkrule_rec_makeLibraryEach stage: configure, GNUMakefile, make.library.$(1) and build.library.$(1) is separate. It is just a sketch of the idea and listing both make.library.$(1) and build.library.$(1)--especially making make.library.$(1) a dependancy of build.library.$(1)--is wrong (they are alternatives).
In any case each of those targets is PHONY (I hadn't gotten as far as tying them to files) and each is in the end available as a separate command. If you did use FORCE it Make would re-run configure but either written (it depends on the stamp file) or if it were to depend on a configure file like .setup-config, Make would not re-run configure since stamp/configure.library.build.$(1) would be registered as up to date.
Now at the extreme, almost the entire Makefile could be written as maybe two big Make-functions, similar to mkrule_rec_makeLibrary. If you want I will clean it up and give you a tested version to play with; then you could use
$(warning $(call \ mkrule_rec_makeLibrary,$(firstword \ $(SUBDIRS)),$(wordlist 2,$(words $(SUBDIRS)),$(SUBDIRS)))) in place of $(eval $(call \ mkrule_rec_makeLibrary,$(firstword \ $(SUBDIRS)),$(wordlist 2,$(words $(SUBDIRS)),$(SUBDIRS))))and with 'make -n' you would see the entire function expanded as separate targets with full names for the first item in the list. Of course to play with it you would have to upgrade your Make from 3.79.1 to at least 3.80. If you don't want to go with that, I won't mind--less work for me to do.
Cheers, Pete
Makefile
Description: Binary data
_______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
