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)
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)
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)"
"$(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 \
$(INPLACE_BIN)/ghc-cabal \
utils/ghc-pwd/ghc-pwd \
$(BINDIST_WRAPPERS) \
+ $(BINDIST_PERL_SOURCES) \
$(BINDIST_LIBS) \
$(BINDIST_HI) \
$(BINDIST_EXTRAS) \
$(INSTALL_LIBEXECS) \
$(INSTALL_LIBEXEC_SCRIPTS) \
$(INSTALL_TOPDIRS) \
- $(INSTALL_TOPDIR_SCRIPTS) \
$(INSTALL_BINS) \
$(INSTALL_MANPAGES) \
$(INSTALL_DOCS) \
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