man: Suggest using shell function from make to process pkg-config output correctly.
Submitted by Tomasz Miąsko
Assigned to pkg..@..op.org
Created attachment 138029 [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
<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
<tab> in POSIX locale).
Patch 138029, "[PATCH] man: Use shell function from make to process pkg-config":