Build fix
[ghc.git] / rules / manual-package-config.mk
index c37f204..848fe1b 100644 (file)
@@ -19,7 +19,7 @@ $1/package.conf.inplace : $1/package.conf.in $(GHC_PKG_INPLACE)
        $$(CPP) $$(RAWCPP_FLAGS) -P \
                -DTOP='"$$(TOP)"' \
                $$($1_PACKAGE_CPP_OPTS) \
-               -x c -I$$(GHC_INCLUDE_DIR) $$< -o $$@.raw
+               -x c $$(addprefix -I,$$(GHC_INCLUDE_DIRS)) $$< -o $$@.raw
        grep -v '^#pragma GCC' $$@.raw | \
            sed -e 's/""//g' -e 's/:[   ]*,/: /g' > $$@
 
@@ -34,14 +34,14 @@ $1/package.conf.install:
                -DLIB_DIR='"$$(if $$(filter YES,$$(RelocatableBuild)),$$$$topdir,$$(ghclibdir))"' \
                -DINCLUDE_DIR='"$$(if $$(filter YES,$$(RelocatableBuild)),$$$$topdir,$$(ghclibdir))/include"' \
                $$($1_PACKAGE_CPP_OPTS) \
-               -x c -I$$(GHC_INCLUDE_DIR) $1/package.conf.in -o $$@.raw
+               -x c $$(addprefix -I,$$(GHC_INCLUDE_DIRS)) $1/package.conf.in -o $$@.raw
        grep -v '^#pragma GCC' $$@.raw | \
            sed -e 's/""//g' -e 's/:[   ]*,/: /g' >$$@
 
 distclean : clean_$1_package.conf
 .PHONY: clean_$1_package.conf
 clean_$1_package.conf :
-       "$$(RM)" $$(RM_OPTS) $1/package.conf.install $1/package.conf.inplace
+       $$(call removeFiles,$1/package.conf.install $1/package.conf.inplace)
 
 $(call profEnd, manual-package-config($1))
 endef