summaryrefslogtreecommitdiff
path: root/pkg.h
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2012-11-19 10:45:41 -0800
committerDan Nicholson <dbn.lists@gmail.com>2012-12-04 13:04:57 -0800
commit9adfd9ebfcb8a9656999116307c15061364bf7df (patch)
tree221281c51f3906aa1490fc15b0b6dbd6505af017 /pkg.h
parent5b6ec1b6e92b9de070a36df11eb123338228a85b (diff)
downloadpkg-config-9adfd9ebfcb8a9656999116307c15061364bf7df.tar.gz
Only strip duplicate arguments when they appear consecutivelyflag-order-fixes
pkg-config strips all duplicate arguments from the flag output string. This is done for 2 reasons: 1. When a package shows up twice in the final package list after resolving all Requires, stripping was used to ensure it's flags only showed up once at the correct location. 2. An optimization so that the output string is not excessively long. Since commit c6ec7869, 1. is no longer necessary as the final package list only contains each package once. 2. causes problems when applied too aggressively since some arguments have different semantics depending on the prior or subsequent arguments. To keep a bit of optimization, the stripping is reduced to only removing consecutive duplicate arguments. This should ensure that the semantics are kept intact while removing obviously unnecessary arguments. The drawback is that some arguments will now appear multiple times in the output when they previously would have only appeared once. Here we have to rely on the tools using these arguments to handle the duplicates appropriately since there is no way for pkg-config to encode all the semantics of those arguments. Another thing that can help this situation is if pkg-config is used for all packages in the Requires chain so that the Libs/Cflags of each package only pertain to itself and don't encode the compiling/linking rules of a 3rd party package. Freedesktop #16101 (https://bugs.freedesktop.org/show_bug.cgi?id=16101)
Diffstat (limited to 'pkg.h')
0 files changed, 0 insertions, 0 deletions