Makefile.in
changeset 555 561285bdb5c8
parent 554 be6197b5b33b
child 556 68c8c1b91269
     1.1 --- a/Makefile.in	Wed Jun 11 21:45:57 2008 +0000
     1.2 +++ b/Makefile.in	Wed Jun 11 22:18:06 2008 +0000
     1.3 @@ -25,17 +25,19 @@
     1.4  ###############################################################################
     1.5  # Global make rules
     1.6  
     1.7 -build: build-bin build-lib build-man
     1.8 +TARGETS := bin lib doc man
     1.9  
    1.10 -install: build install-bin install-lib install-doc install-man
    1.11 +build: $(patsubst %,build-%,$(TARGETS))
    1.12  
    1.13 -clean: clean-bin clean-lib clean-doc
    1.14 +install: local-test build $(patsubst %,install-%,$(TARGETS))
    1.15 +
    1.16 +clean: $(patsubst %,clean-%,$(TARGETS))
    1.17  
    1.18  distclean: clean
    1.19  	@echo "  RM     'Makefile'"
    1.20  	@rm -f Makefile
    1.21  
    1.22 -uninstall: uninstall-bin uninstall-lib uninstall-doc uninstall-man
    1.23 +uninstall: local-test $(patsubst %,uninstall-%,$(TARGETS))
    1.24  
    1.25  ###############################################################################
    1.26  # Specific make rules
    1.27 @@ -49,6 +51,8 @@
    1.28  
    1.29  build-lib:
    1.30  
    1.31 +build-doc:
    1.32 +
    1.33  build-man: docs/ct-ng.1.gz
    1.34  
    1.35  docs/ct-ng.1.gz: docs/ct-ng.1
    1.36 @@ -76,6 +80,8 @@
    1.37  clean-lib:
    1.38  
    1.39  clean-doc:
    1.40 +
    1.41 +clean-man:
    1.42  	@echo "  RM     'docs/ct-ng.1'"
    1.43  	@rm -f docs/ct-ng.1
    1.44  	@echo "  RM     'docs/ct-ng.1.gz'"
    1.45 @@ -94,12 +100,14 @@
    1.46  #--------------------------------------
    1.47  # Install rules
    1.48  
    1.49 -install-%: local-test
    1.50 -
    1.51  install-bin: $(BINDIR)
    1.52  	@echo "  INST   'ct-ng'"
    1.53  	@install -m 755 ct-ng "$(BINDIR)/ct-ng"
    1.54  
    1.55 +# If one is hacking crosstool-NG, the patch set might change between any two
    1.56 +# installations of the same VERSION, thus the patches must be removed prior
    1.57 +# to being installed. It is simpler to remove the whole lib/ directory, as it
    1.58 +# is the goal of the install-lib rule to install the lib/ directory...
    1.59  install-lib: uninstall-lib $(LIBDIR) install-lib-main install-lib-samples
    1.60  
    1.61  install-lib-main: $(LIBDIR)
    1.62 @@ -130,7 +138,7 @@
    1.63  	@echo "  INST   'ct-ng.1.gz'"
    1.64  	@install -m 644 docs/ct-ng.1.gz "$(MANDIR)"
    1.65  
    1.66 -$(BINDIR) $(LIBDIR) $(DOCDIR) $(MANDIR)::
    1.67 +$(BINDIR) $(LIBDIR) $(DOCDIR) $(MANDIR):
    1.68  	@echo "  MKDIR  '$@'"
    1.69  	@install -m 755 -d "$@"
    1.70  
    1.71 @@ -138,16 +146,18 @@
    1.72  #--------------------------------------
    1.73  # Uninstall rules
    1.74  
    1.75 -uninstall-%: local-test
    1.76 -
    1.77  uninstall-bin:
    1.78 +	@echo "  RM     '$(BINDIR)/ct-ng'"
    1.79  	@rm -f "$(BINDIR)/ct-ng"
    1.80  
    1.81  uninstall-lib:
    1.82 +	@echo "  RM     '$(LIBDIR)/'"
    1.83  	@rm -rf "$(LIBDIR)"
    1.84  
    1.85  uninstall-doc:
    1.86 +	@echo "  RM     '$(DOCDIR)/'"
    1.87  	@rm -rf "$(DOCDIR)"
    1.88  
    1.89  uninstall-man:
    1.90 +	@echo "  RM     '$(MANDIR)/ct-ng.1.gz'"
    1.91  	@rm -f "$(MANDIR)/ct-ng.1"{,.gz}