summaryrefslogtreecommitdiff
path: root/rules/build-perl.mk
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2010-03-24 17:14:22 +0000
committerIan Lynagh <igloo@earth.li>2010-03-24 17:14:22 +0000
commit484511cebe6055c13bedf6b9c773f96ae9d63dc3 (patch)
tree0584b1bca69c8bd1beec557a8b217efecfcf9e04 /rules/build-perl.mk
parent4a0b6d6cba4c6d053c928ecc111ff0a300443f4b (diff)
downloadhaskell-484511cebe6055c13bedf6b9c773f96ae9d63dc3.tar.gz
Change how perl scripts get installed; partially fixes #3863
We now regenerate them when installing, which means the path for perl doesn't get baked in
Diffstat (limited to 'rules/build-perl.mk')
-rw-r--r--rules/build-perl.mk12
1 files changed, 11 insertions, 1 deletions
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