summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog3
-rw-r--r--man/dpkg-buildflags.14
-rwxr-xr-xscripts/dpkg-buildflags.pl10
3 files changed, 13 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index 180a418..37b32ba 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -90,6 +90,9 @@ dpkg (1.16.1) UNRELEASED; urgency=low
LP: #797839
And it fails before installing the automatic patch in debian/patches/
Closes: #615899
+ * dpkg-buildflags now supports "--export=configure" to output compilation
+ flags on a single line with double quotes as delimiter of the various
+ values.
[ Guillem Jover ]
* Install deb-src-control(5) man pages in dpkg-dev. Closes: #620520
diff --git a/man/dpkg-buildflags.1 b/man/dpkg-buildflags.1
index 1977f44..e1fef4b 100644
--- a/man/dpkg-buildflags.1
+++ b/man/dpkg-buildflags.1
@@ -50,7 +50,9 @@ information about them.
.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 the \fIformat\fP value is not
+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
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.
diff --git a/scripts/dpkg-buildflags.pl b/scripts/dpkg-buildflags.pl
index 2564b57..80fe1ff 100755
--- a/scripts/dpkg-buildflags.pl
+++ b/scripts/dpkg-buildflags.pl
@@ -48,8 +48,10 @@ Actions:
--origin <flag> output the origin of the flag to stdout:
value is one of vendor, system, user, env.
--list output a list of the flags supported by the current vendor.
- --export=(sh|make) output commands to be executed in shell or make that export
- all the compilation flags as environment variables.
+ --export=(sh|make|configure)
+ output something convenient to import the
+ compilation flags in a shell script, in make,
+ or on a ./configure command line.
--dump output all compilation flags with their values
--help show this help message.
--version show the version.
@@ -66,7 +68,7 @@ while (@ARGV) {
$action = $1;
$param = shift(@ARGV);
usageerr(_g("%s needs a parameter"), $_) unless defined $param;
- } elsif (m/^--export(?:=(sh|make))?$/) {
+ } elsif (m/^--export(?:=(sh|make|configure))?$/) {
usageerr(_g("two commands specified: --%s and --%s"), "export", $action)
if defined($action);
my $type = $1 || "sh";
@@ -124,6 +126,8 @@ if ($action eq "get") {
} elsif ($export_type eq "make") {
$value =~ s/\$/\$\$/g;
print "export $flag := $value\n";
+ } elsif ($export_type eq "configure") {
+ print "$flag=\"$value\" ";
}
}
exit(0);