diff options
author | Matthias Kilian <kili@outback.escape.de> | 2009-08-26 15:33:40 +0000 |
---|---|---|
committer | Matthias Kilian <kili@outback.escape.de> | 2009-08-26 15:33:40 +0000 |
commit | 0fc3078a039e7fdd16baf3537a534462d3023db1 (patch) | |
tree | c3a83f5de20b08dbecdac0f34703a890a9eaf020 /rules/distdir-opts.mk | |
parent | ce9a12321f228ab68934e3031c32ab7f9a2173fc (diff) | |
download | haskell-0fc3078a039e7fdd16baf3537a534462d3023db1.tar.gz |
Don't mess up absolute INCLUDE_DIRS
When there are some absolute include dirs, don't create arguments
like -Ilibraries/base//usr/local/include.
I need this fix for injecting the iconv include dir (which is
/usr/local/include on OpenBSD) into the build of libraries/base.
Diffstat (limited to 'rules/distdir-opts.mk')
-rw-r--r-- | rules/distdir-opts.mk | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rules/distdir-opts.mk b/rules/distdir-opts.mk index d104a13810..a2dedb0bf5 100644 --- a/rules/distdir-opts.mk +++ b/rules/distdir-opts.mk @@ -35,7 +35,8 @@ endif $1_$2_BUILD_CC_OPTS = \ $$(SRC_CC_OPTS) \ $$($1_CC_OPTS) \ - $$(foreach dir,$$($1_$2_INCLUDE_DIRS),-I$1/$$(dir)) \ + $$(foreach dir,$$(filter-out /%,$$($1_$2_INCLUDE_DIRS)),-I$1/$$(dir)) \ + $$(foreach dir,$$(filter /%,$$($1_$2_INCLUDE_DIRS)),-I$$(dir)) \ $$($1_$2_CC_OPTS) \ $$($1_$2_CPP_OPTS) \ $$(foreach dir,$$($1_$2_DEP_INCLUDE_DIRS),$$($1_$2_DEP_INCLUDE_DIRS_FLAG)$$(dir)) \ @@ -60,7 +61,8 @@ $1_$2_BUILD_HC_OPTS = \ -i $$(if $$($1_$2_HS_SRC_DIRS),$$(foreach dir,$$($1_$2_HS_SRC_DIRS),-i$1/$$(dir)),-i$1) \ -i$1/$2/build -i$1/$2/build/autogen \ -I$1/$2/build -I$1/$2/build/autogen \ - $$(foreach dir,$$($1_$2_INCLUDE_DIRS),-I$1/$$(dir)) \ + $$(foreach dir,$$(filter-out /%,$$($1_$2_INCLUDE_DIRS)),-I$1/$$(dir)) \ + $$(foreach dir,$$(filter /%,$$($1_$2_INCLUDE_DIRS)),-I$$(dir)) \ $$(foreach inc,$$($1_$2_INCLUDE),-\#include "$$(inc)") \ $$(foreach opt,$$($1_$2_CPP_OPTS),-optP$$(opt)) \ $$(if $$($1_PACKAGE),-optP-include -optP$1/$2/build/autogen/cabal_macros.h) \ |