X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rules%2Fbuild-perl.mk;h=5ee1d2350b0f4a982f337644bd9d2e75e0ee98c9;hp=669f3d7be4fc7c6a74e2457057991a7f84ba3a76;hb=49a8e5c021009430d373d6224b29004c7d18c408;hpb=883d980815437736c486bf69b2f066ef918d2989 diff --git a/rules/build-perl.mk b/rules/build-perl.mk index 669f3d7..5ee1d23 100644 --- a/rules/build-perl.mk +++ b/rules/build-perl.mk @@ -23,12 +23,12 @@ define build-perl # $2 = distdir ifeq "$$($1_$2_TOPDIR)" "YES" -$1_$2_INPLACE = $(INPLACE_TOPDIR)/$$($1_$2_PROG) +$1_$2_INPLACE = $$(INPLACE_TOPDIR)/$$($1_$2_PROG) else -$1_$2_INPLACE = $(INPLACE_BIN)/$$($1_$2_PROG) +$1_$2_INPLACE = $$(INPLACE_BIN)/$$($1_$2_PROG) endif -$(call all-target,$$($1_$2_INPLACE)) +$(call all-target,$1_$2,$$($1_$2_INPLACE)) $(call clean-target,$1,$2,$1/$2 $$($1_$2_INPLACE)) .PHONY: clean_$1 @@ -39,17 +39,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