diff options
author | Ian Lynagh <igloo@earth.li> | 2009-04-26 11:42:15 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-04-26 11:42:15 +0000 |
commit | 34cc75e1a62638f2833815746ebce0a9114dc26b (patch) | |
tree | ef21e8fd7af1356beea9cce7d6efb8a65374e24c /rules/manual-package-config.mk | |
parent | 74e1368d4688ee16f6decdf2cd3ebe27506b26ba (diff) | |
download | haskell-34cc75e1a62638f2833815746ebce0a9114dc26b.tar.gz |
GHC new build system megapatch
Diffstat (limited to 'rules/manual-package-config.mk')
-rw-r--r-- | rules/manual-package-config.mk | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/rules/manual-package-config.mk b/rules/manual-package-config.mk new file mode 100644 index 0000000000..2eb33b787a --- /dev/null +++ b/rules/manual-package-config.mk @@ -0,0 +1,33 @@ + +define manual-package-config # args: $1 = dir + +$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) $$< | \ + grep -v '^#pragma GCC' | \ + sed -e 's/""//g' -e 's/:[ ]*,/: /g' >$$@ + + $(GHC_PKG_INPLACE) update --force $$@ + +# This is actually a real file, but we need to recreate it on every +# "make install", so we declare it as phony +.PHONY: $1/package.conf.install +$1/package.conf.install: + $(CPP) $(RAWCPP_FLAGS) -P \ + -DINSTALLING \ + -DLIB_DIR='"$$(libdir)"' \ + -DINCLUDE_DIR='"$$(libdir)/include"' \ + $$($1_PACKAGE_CPP_OPTS) \ + -x c -I$$(GHC_INCLUDE_DIR) $1/package.conf.in | \ + grep -v '^#pragma GCC' | \ + sed -e 's/""//g' -e 's/:[ ]*,/: /g' >$$@ + +clean : clean_$1 +.PHONY: clean_$1 +clean_$1 : clean_$1_package.conf +.PHONY: clean_$1_package.conf +clean_$1_package.conf : + $(RM) $1/package.conf.install $1/package.conf.inplace +endef |