Guillem Jover wrote: > Yeah, one of the things I checked was if an EXAMPLE section was > present in the man page at all, or more detail about the quoting, > given the confusion. So I think this really makes sense. But the > QUOTING section seems a bit strange
That's fair. I first tried putting this in the description of the --export option but it felt too long. It didn't seem right in the examples section, either, because the examples don't illustrate other aspects of how to use dpkg-buildflags properly (for example, the text doesn't mention bug#327154). Here's another try at putting it in the description of --export. What do you think? Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- man/dpkg-buildflags.1 | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/man/dpkg-buildflags.1 b/man/dpkg-buildflags.1 index ea61306b..0ad1ff75 100644 --- a/man/dpkg-buildflags.1 +++ b/man/dpkg-buildflags.1 @@ -83,14 +83,37 @@ keeps a clear trace of the build flags used. This can be useful to diagnose problems related to them. .TP .BI \-\-export= format -Print to standard output shell (if \fIformat\fP is \fBsh\fP) or make -(if \fIformat\fP is \fBmake\fP) commands that can be used to export -all the compilation flags in the environment. If \fIformat\fP is -\fBconfigure\fP then the output can be used on a \fB./configure\fP -command-line. If the \fIformat\fP value is not +Print to standard output commands that can be used to export all the +compilation flags for some particular tool. If the \fIformat\fP value is not given, \fBsh\fP is assumed. Only compilation flags starting with an upper case character are included, others are assumed to not be suitable -for the environment. +for the environment. Supported formats: +.RS +.TP +.B sh +Shell commands to set and export all the compilation flags in the +environment. The flag values are quoted so the output is ready for +evaluation by a shell. Example (in a shell script): +\fBeval "$(dpkg-buildflags --export=sh)" && make\fP. +.TP +.B configure +Arguments to pass to a GNU-style configuration script to use all +the compilation flags. The flag values are quoted in shell syntax. +Example (in a makefile recipe): +\fB./configure $(shell dpkg-buildflags --export=configure)\fP. + +In a shell script, "eval" can be used to interpret the output. + +.nf + eval "set -- $(dpkg-buildflags --export=configure)" + for i in a b c; do (cd $i && ./configure "$@" && make); done +.fi +.TP +.B make +Make directives to set and export all the compilation flags in the +environment. Output can be written to a makefile fragment and +evaluated using an \fBinclude\fP directive. +.RE .TP .BI \-\-get " flag" Print the value of the flag on standard output. Exits with 0 -- 1.8.0 -- To UNSUBSCRIBE, email to debian-dpkg-bugs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org