X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rules%2Fbuild-perl.mk;h=cd231854620ab161fe4ee4b8b26261345f6b261f;hb=5289f5d85610f71625a439747a09384876655eb5;hp=f3ea2b67b16ab27e7d34fa8bcaeba72275aaa22f;hpb=8e63e8eae43292fbeb219740eadd798bde76760c;p=ghc-hetmet.git diff --git a/rules/build-perl.mk b/rules/build-perl.mk index f3ea2b6..cd23185 100644 --- a/rules/build-perl.mk +++ b/rules/build-perl.mk @@ -19,6 +19,7 @@ # $(eval $(call build-perl,driver/mangler,dist)) define build-perl +$(call trace, build-perl($1,$2)) # $1 = dir # $2 = distdir @@ -39,17 +40,28 @@ 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)";' >> $$@ + echo '$$$$TABLES_NEXT_TO_CODE = "$(GhcEnableTablesNextToCode)";' >> $$@ 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