Build fix
[ghc.git] / rules / build-perl.mk
index 5ee1d23..b39134f 100644 (file)
@@ -19,6 +19,8 @@
 # $(eval $(call build-perl,driver/mangler,dist))
 
 define build-perl
+$(call trace, build-perl($1,$2))
+$(call profStart, build-perl($1,$2))
 # $1 = dir
 # $2 = distdir
 
@@ -42,7 +44,7 @@ $1/$2/$$($1_$2_PROG).prl: $1/$$($1_PERL_SRC) $$(UNLIT) | $$$$(dir $$$$@)/.
 endif
 
 $1/$2/$$($1_$2_PROG): $1/$2/$$($1_$2_PROG).prl
-       "$$(RM)" $$(RM_OPTS) $$@
+       $$(call removeFiles,$$@)
        echo '#!$$(PERL)'                                  >> $$@
        echo '$$$$TARGETPLATFORM  = "$$(TARGETPLATFORM)";' >> $$@
        echo '$$$$TABLES_NEXT_TO_CODE  = "$(GhcEnableTablesNextToCode)";' >> $$@
@@ -59,9 +61,10 @@ 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)"
+       $$(call INSTALL_DIR,"$$($1_$2_INSTALL_IN)")
+       $$(call INSTALL_SCRIPT,$$(INSTALL_OPTS),$$<,"$$($1_$2_INSTALL_IN)")
 endif
 endif
 
+$(call profEnd, build-perl($1,$2))
 endef