diff options
-rw-r--r-- | driver/mangler/ghc.mk | 2 | ||||
-rw-r--r-- | driver/split/ghc.mk | 2 | ||||
-rw-r--r-- | ghc.mk | 10 | ||||
-rw-r--r-- | rules/build-perl.mk | 12 |
4 files changed, 15 insertions, 11 deletions
diff --git a/driver/mangler/ghc.mk b/driver/mangler/ghc.mk index 92b00c4370..c5e3bdf3b7 100644 --- a/driver/mangler/ghc.mk +++ b/driver/mangler/ghc.mk @@ -13,7 +13,7 @@ driver/mangler_PERL_SRC = ghc-asm.lprl driver/mangler_dist_PROG = $(GHC_MANGLER_PGM) driver/mangler_dist_TOPDIR = YES +driver/mangler_dist_INSTALL_IN = $(DESTDIR)$(topdir) $(eval $(call build-perl,driver/mangler,dist)) -INSTALL_TOPDIR_SCRIPTS += driver/mangler/dist/$(GHC_MANGLER_PGM) diff --git a/driver/split/ghc.mk b/driver/split/ghc.mk index 388e212b13..0272652856 100644 --- a/driver/split/ghc.mk +++ b/driver/split/ghc.mk @@ -13,7 +13,7 @@ driver/split_PERL_SRC = ghc-split.lprl driver/split_dist_PROG = $(GHC_SPLIT_PGM) driver/split_dist_TOPDIR = YES +driver/split_dist_INSTALL_IN = $(DESTDIR)$(topdir) $(eval $(call build-perl,driver/split,dist)) -INSTALL_TOPDIR_SCRIPTS += driver/split/dist/$(GHC_SPLIT_PGM) @@ -760,7 +760,7 @@ TAGS: TAGS_compiler install: install_packages install_libs install_libexecs install_headers \ install_libexec_scripts install_bins install_docs \ - install_topdirs install_topdir_scripts + install_topdirs install_bins: $(INSTALL_BINS) $(INSTALL_DIR) "$(DESTDIR)$(bindir)" @@ -809,12 +809,6 @@ else "$(MV)" "$(DESTDIR)$(ghclibexecdir)/ghc-stage2" "$(DESTDIR)$(ghclibexecdir)/ghc" endif -install_topdir_scripts: $(INSTALL_TOPDIR_SCRIPTS) - $(INSTALL_DIR) "$(DESTDIR)$(topdir)" - for i in $(INSTALL_TOPDIR_SCRIPTS); do \ - $(INSTALL_SCRIPT) $(INSTALL_OPTS) $$i "$(DESTDIR)$(topdir)"; \ - done - install_topdirs: $(INSTALL_TOPDIRS) $(INSTALL_DIR) "$(DESTDIR)$(topdir)" for i in $(INSTALL_TOPDIRS); do \ @@ -920,6 +914,7 @@ $(eval $(call bindist,.,\ $(INPLACE_BIN)/ghc-cabal \ utils/ghc-pwd/ghc-pwd \ $(BINDIST_WRAPPERS) \ + $(BINDIST_PERL_SOURCES) \ $(BINDIST_LIBS) \ $(BINDIST_HI) \ $(BINDIST_EXTRAS) \ @@ -932,7 +927,6 @@ $(eval $(call bindist,.,\ $(INSTALL_LIBEXECS) \ $(INSTALL_LIBEXEC_SCRIPTS) \ $(INSTALL_TOPDIRS) \ - $(INSTALL_TOPDIR_SCRIPTS) \ $(INSTALL_BINS) \ $(INSTALL_MANPAGES) \ $(INSTALL_DOCS) \ diff --git a/rules/build-perl.mk b/rules/build-perl.mk index f3ea2b67b1..cfa71cc53d 100644 --- a/rules/build-perl.mk +++ b/rules/build-perl.mk @@ -39,17 +39,27 @@ ifeq "$(findstring clean,$(MAKECMDGOALS))" "" ifneq "$$(BINDIST)" "YES" $1/$2/$$($1_$2_PROG).prl: $1/$$($1_PERL_SRC) $$(UNLIT) | $$$$(dir $$$$@)/. "$$(UNLIT)" $$(UNLIT_OPTS) $$< $$@ +endif $1/$2/$$($1_$2_PROG): $1/$2/$$($1_$2_PROG).prl "$$(RM)" $$(RM_OPTS) $$@ echo '#!$$(PERL)' >> $$@ echo '$$$$TARGETPLATFORM = "$$(TARGETPLATFORM)";' >> $$@ cat $$< >> $$@ - $$(EXECUTABLE_FILE) $$@ $$($1_$2_INPLACE): $1/$2/$$($1_$2_PROG) | $$$$(dir $$$$@)/. "$$(CP)" $$< $$@ $$(EXECUTABLE_FILE) $$@ + +ifneq "$$($1_$2_INSTALL_IN)" "" +BINDIST_PERL_SOURCES += $1/$2/$$($1_$2_PROG).prl + +install: install_$1_$2 + +.PHONY: install_$1_$2 +install_$1_$2: $1/$2/$$($1_$2_PROG) + $$(INSTALL_DIR) "$$($1_$2_INSTALL_IN)" + $$(INSTALL_SCRIPT) $$(INSTALL_OPTS) $$< "$$($1_$2_INSTALL_IN)" endif endif |