Build system improvements
[ghc-hetmet.git] / rules / build-perl.mk
index 5ee1d23..c232193 100644 (file)
@@ -19,6 +19,7 @@
 # $(eval $(call build-perl,driver/mangler,dist))
 
 define build-perl
+$(call trace, build-perl($1,$2))
 # $1 = dir
 # $2 = distdir
 
@@ -28,7 +29,9 @@ 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
@@ -59,8 +62,8 @@ 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