Created attachment 138029 [details] [review] [PATCH] man: Use shell function from make to process pkg-config pkg-config uses backslashes to escape special characters (including spaces among others) in its --cflags and --libs output. This is incompatible with command substitution as used in POSIX shell, i.e., $(cmd ...) or `cmd ...`, because field splitting following such substitution splits the result using sequences of <space>, <tab>, and <newline> characters as separators (supposing default value of IFS). Backslash does not have any special meaning in this process, and thus escaping for those characters is ineffective. Suggest using shell make function instead, which will expand the results into the command output (converting newlines into spaces, but not processing it further), and then when final command is executed by POSIX shell, the shell tokenization rules will take into effect which do respect backquotes and split input using unquoted <blank> (<space> or <tab> in POSIX locale).
Created attachment 138030 [details] [review] [PATCH] man: Use shell function from make to process pkg-config In last sentence of my previous comment backquotes should be backslash instead.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pkg-config/pkg-config/issues/32.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.