diff options
author | Ian Lynagh <igloo@earth.li> | 2007-03-09 17:48:25 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2007-03-09 17:48:25 +0000 |
commit | 642ac8a05ea7f449c367cd4293b0e07ca3305fd8 (patch) | |
tree | 7901a4363b4757c1ed125330e578297e5f46e6ed /Makefile | |
parent | 410db5b555b74beb68aa39de950c2ca0e9c89f8e (diff) | |
download | haskell-642ac8a05ea7f449c367cd4293b0e07ca3305fd8.tar.gz |
Avoid duplication in the binary-dist rules for docs
Rather than building complex sh stuff and echoing what we're doing
ourselves, use make rules to do the looping and let make print things
out.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 16 insertions, 20 deletions
@@ -314,27 +314,23 @@ endif # XSLTPROC endif # BINDIST_DOC_WAYS -binary-dist :: ifneq "$(DIR_DOCBOOK_XSL)" "" - @for i in $(BinDistDirs); do \ - if test -d "$$i"; then \ - $(MAKE) -C $$i $(MFLAGS) $(BINDIST_DOC_WAYS); \ - echo $(MAKE) -C $$i $(MFLAGS) install-docs XMLDocWays="$(BINDIST_DOC_WAYS)" \ - prefix=$(BIN_DIST_DIR) \ - exec_prefix=$(BIN_DIST_DIR) \ - bindir=$(BIN_DIST_DIR)/bin/$(TARGETPLATFORM) \ - libdir=$(BIN_DIST_DIR)/lib/$(TARGETPLATFORM) \ - libexecdir=$(BIN_DIST_DIR)/lib/$(TARGETPLATFORM) \ - datadir=$(BIN_DIST_DIR)/share; \ - $(MAKE) -C $$i $(MFLAGS) install-docs XMLDocWays="$(BINDIST_DOC_WAYS)" \ - prefix=$(BIN_DIST_DIR) \ - exec_prefix=$(BIN_DIST_DIR) \ - bindir=$(BIN_DIST_DIR)/bin/$(TARGETPLATFORM) \ - libdir=$(BIN_DIST_DIR)/lib/$(TARGETPLATFORM) \ - libexecdir=$(BIN_DIST_DIR)/lib/$(TARGETPLATFORM) \ - datadir=$(BIN_DIST_DIR)/share; \ - fi \ - done +.PHONY: binary-dist-doc-% + +BINARY_DIST_DOC_RULES=$(foreach d,$(BinDistDirs),binary-dist-doc-$d) + +binary-dist :: $(BINARY_DIST_DOC_RULES) + +$(BINARY_DIST_DOC_RULES): binary-dist-doc-%: + $(MAKE) -C $* $(MFLAGS) $(BINDIST_DOC_WAYS) + $(MAKE) -C $* $(MFLAGS) install-docs \ + XMLDocWays="$(BINDIST_DOC_WAYS)" \ + prefix=$(BIN_DIST_DIR) \ + exec_prefix=$(BIN_DIST_DIR) \ + bindir=$(BIN_DIST_DIR)/bin/$(TARGETPLATFORM) \ + libdir=$(BIN_DIST_DIR)/lib/$(TARGETPLATFORM) \ + libexecdir=$(BIN_DIST_DIR)/lib/$(TARGETPLATFORM) \ + datadir=$(BIN_DIST_DIR)/share endif # Rename scripts to $i.prl and $i.sh where necessary. |