summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-06-11 22:18:06 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-06-11 22:18:06 (GMT)
commitd4dae524651df9c8705520f60ebcf8ccae129196 (patch)
tree36ff75d7cd2592ec72b785c2f1b4d067b8ffe538
parent62df5c3fed96af085f08bdebd058f535e824af23 (diff)
Re-instate a functionnal --local test.
Introduce a TARGETS make variable that contains sub-parts to {build,install,clean,uninstall} Small fix to directories creation. /trunk/Makefile.in | 28 19 9 0 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-)
-rw-r--r--Makefile.in28
1 files changed, 19 insertions, 9 deletions
diff --git a/Makefile.in b/Makefile.in
index afaecc3..0c85564 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -25,17 +25,19 @@ MAKE := $(shell which $(MAKE) || type -p $(MAKE) || echo /usr/bin/make)
###############################################################################
# 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-bin: ct-ng
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-bin:
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 @@ local-test:
#--------------------------------------
# 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 @@ install-man: $(MANDIR)
@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 @@ $(BINDIR) $(LIBDIR) $(DOCDIR) $(MANDIR)::
#--------------------------------------
# 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}