Add Haiku platform (#5828)
[ghc.git] / rules / build-prog.mk
index 99093d3..69c5bd5 100644 (file)
@@ -96,7 +96,6 @@ ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
 ifneq "$$($1_$2_INSTALL_INPLACE)" "NO"
 $$($1_$2_INPLACE) : $1/$2/build/tmp/$$($1_$2_PROG) | $$$$(dir $$$$@)/.
        "$$(CP)" -p $$< $$@
-       touch $$@
 endif
 endif
 
@@ -117,8 +116,12 @@ ifeq "$3" "0"
 # worry about where the RTS header files are
 $(call c-suffix-rules,$1,$2,v,YES)
 else
+ifeq "$$($1_$2_UseGhcForCC)" "YES"
+$(call c-suffix-rules,$1,$2,v,YES)
+else
 $(call c-suffix-rules,$1,$2,v,NO)
 endif
+endif
 
 $(call hs-suffix-rules,$1,$2,v)
 $$(foreach dir,$$($1_$2_HS_SRC_DIRS),\