diff -r be6197b5b33b -r 561285bdb5c8 Makefile.in --- a/Makefile.in Wed Jun 11 21:45:57 2008 +0000 +++ b/Makefile.in Wed Jun 11 22:18:06 2008 +0000 @@ -25,17 +25,19 @@ ############################################################################### # Global make rules -build: build-bin build-lib build-man +TARGETS := bin lib doc man -install: build install-bin install-lib install-doc install-man +build: $(patsubst %,build-%,$(TARGETS)) -clean: clean-bin clean-lib clean-doc +install: local-test build $(patsubst %,install-%,$(TARGETS)) + +clean: $(patsubst %,clean-%,$(TARGETS)) distclean: clean @echo " RM 'Makefile'" @rm -f Makefile -uninstall: uninstall-bin uninstall-lib uninstall-doc uninstall-man +uninstall: local-test $(patsubst %,uninstall-%,$(TARGETS)) ############################################################################### # Specific make rules @@ -49,6 +51,8 @@ build-lib: +build-doc: + build-man: docs/ct-ng.1.gz docs/ct-ng.1.gz: docs/ct-ng.1 @@ -76,6 +80,8 @@ clean-lib: clean-doc: + +clean-man: @echo " RM 'docs/ct-ng.1'" @rm -f docs/ct-ng.1 @echo " RM 'docs/ct-ng.1.gz'" @@ -94,12 +100,14 @@ #-------------------------------------- # Install rules -install-%: local-test - install-bin: $(BINDIR) @echo " INST 'ct-ng'" @install -m 755 ct-ng "$(BINDIR)/ct-ng" +# If one is hacking crosstool-NG, the patch set might change between any two +# installations of the same VERSION, thus the patches must be removed prior +# to being installed. It is simpler to remove the whole lib/ directory, as it +# is the goal of the install-lib rule to install the lib/ directory... install-lib: uninstall-lib $(LIBDIR) install-lib-main install-lib-samples install-lib-main: $(LIBDIR) @@ -130,7 +138,7 @@ @echo " INST 'ct-ng.1.gz'" @install -m 644 docs/ct-ng.1.gz "$(MANDIR)" -$(BINDIR) $(LIBDIR) $(DOCDIR) $(MANDIR):: +$(BINDIR) $(LIBDIR) $(DOCDIR) $(MANDIR): @echo " MKDIR '$@'" @install -m 755 -d "$@" @@ -138,16 +146,18 @@ #-------------------------------------- # Uninstall rules -uninstall-%: local-test - uninstall-bin: + @echo " RM '$(BINDIR)/ct-ng'" @rm -f "$(BINDIR)/ct-ng" uninstall-lib: + @echo " RM '$(LIBDIR)/'" @rm -rf "$(LIBDIR)" uninstall-doc: + @echo " RM '$(DOCDIR)/'" @rm -rf "$(DOCDIR)" uninstall-man: + @echo " RM '$(MANDIR)/ct-ng.1.gz'" @rm -f "$(MANDIR)/ct-ng.1"{,.gz}