aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbuild2/cc/pkgconfig-libpkg-config.cxx19
1 files changed, 3 insertions, 16 deletions
diff --git a/libbuild2/cc/pkgconfig-libpkg-config.cxx b/libbuild2/cc/pkgconfig-libpkg-config.cxx
index ee5a11f..0a9165a 100644
--- a/libbuild2/cc/pkgconfig-libpkg-config.cxx
+++ b/libbuild2/cc/pkgconfig-libpkg-config.cxx
@@ -73,22 +73,9 @@ namespace build2
//
if (opt != nullptr)
{
- // @@ TMP (hopefully).
- //
- // Note that we should restore the directory path that was
- // (mis)interpreted as an option, for example:
- //
- // -I -Ifoo
- //
- // In the above example option '-I' is followed by directory
- // '-Ifoo', which is represented by libpkgconf library as fragment
- // 'foo' with type 'I'.
- //
- if (!pkgconf_path_match_list (
- frag->type == '\0'
- ? frag->data
- : (string ({'-', frag->type}) + frag->data).c_str (),
- &sysdirs))
+ assert (frag->type == '\0'); // See pkgconf_fragment_add().
+
+ if (!pkgconf_path_match_list (frag->data, &sysdirs))
{
add (opt);
add (frag);