Ensure -I is never merged back as well

feature/tap-sh
Baptiste Daroussin 2015-07-19 23:00:35 +02:00
parent 5a8dadafc6
commit 72c6e9237b
4 changed files with 6 additions and 2 deletions

View File

@ -117,6 +117,8 @@ pkg_fragment_can_merge_back(pkg_fragment_t *base, unsigned int flags, bool is_pr
return false;
if (base->type == 'L')
return false;
if (base->type == 'I')
return false;
return true;
}

View File

@ -7,6 +7,6 @@ Name: prefix-foo1
Description: A testing pkg-config file
Version: 1.2.3
Libs: -L${libdir} -lfoo1
Cflags: -fPIC -I${includedir}/foo1
Cflags: -fPIC -I${includedir}/foo -DBAR
Cflags.private: -DFOO_STATIC

View File

@ -7,6 +7,6 @@ Name: prefix-foo2
Description: A testing pkg-config file
Version: 1.2.3
Libs: -L${libdir} -lfoo2
Cflags: -fPIC -I${includedir}/foo2
Cflags: -fPIC -I${includedir}/foo -DFOO
Cflags.private: -DFOO_STATIC

View File

@ -268,6 +268,8 @@ run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs prefix-foo1" \
'-L/usr/bar/lib -lfoo1'
run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs prefix-foo1 prefix-foo2" \
'-L/usr/bar/lib -lfoo1 -lfoo2'
run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --cflags prefix-foo1 prefix-foo2" \
'-I/usr/bar/include/foo -DBAR -fPIC -DFOO'
# 10) tests for internal getopt implementation with options at the end
if [ "x@STRICT_MODE@" = "xno" ]; then