Build fix
[ghc.git] / rules / build-perl.mk
index c232193..b39134f 100644 (file)
@@ -20,6 +20,7 @@
 
 define build-perl
 $(call trace, build-perl($1,$2))
+$(call profStart, build-perl($1,$2))
 # $1 = dir
 # $2 = distdir
 
@@ -29,9 +30,7 @@ else
 $1_$2_INPLACE = $$(INPLACE_BIN)/$$($1_$2_PROG)
 endif
 
-ifeq "$$(phase_1_or_later)" "YES"
 $(call all-target,$1_$2,$$($1_$2_INPLACE))
-endif
 
 $(call clean-target,$1,$2,$1/$2 $$($1_$2_INPLACE))
 .PHONY: clean_$1
@@ -45,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)";' >> $$@
@@ -67,4 +66,5 @@ install_$1_$2: $1/$2/$$($1_$2_PROG)
 endif
 endif
 
+$(call profEnd, build-perl($1,$2))
 endef