Commit 0fc3078a authored by kili's avatar kili
Browse files

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.
parent ce9a1232
...@@ -35,7 +35,8 @@ endif ...@@ -35,7 +35,8 @@ endif
$1_$2_BUILD_CC_OPTS = \ $1_$2_BUILD_CC_OPTS = \
$$(SRC_CC_OPTS) \ $$(SRC_CC_OPTS) \
$$($1_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_CC_OPTS) \
$$($1_$2_CPP_OPTS) \ $$($1_$2_CPP_OPTS) \
$$(foreach dir,$$($1_$2_DEP_INCLUDE_DIRS),$$($1_$2_DEP_INCLUDE_DIRS_FLAG)$$(dir)) \ $$(foreach dir,$$($1_$2_DEP_INCLUDE_DIRS),$$($1_$2_DEP_INCLUDE_DIRS_FLAG)$$(dir)) \
...@@ -60,7 +61,8 @@ $1_$2_BUILD_HC_OPTS = \ ...@@ -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 $$(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 \
-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 inc,$$($1_$2_INCLUDE),-\#include "$$(inc)") \
$$(foreach opt,$$($1_$2_CPP_OPTS),-optP$$(opt)) \ $$(foreach opt,$$($1_$2_CPP_OPTS),-optP$$(opt)) \
$$(if $$($1_PACKAGE),-optP-include -optP$1/$2/build/autogen/cabal_macros.h) \ $$(if $$($1_PACKAGE),-optP-include -optP$1/$2/build/autogen/cabal_macros.h) \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment