The following commit has been merged in the master branch:
commit fd320a3ad53c2b395e122188a2ad431dcefe5b64
Author: Guillem Jover <[email protected]>
Date:   Mon Oct 29 08:51:34 2012 +0100

    dpkg-buildflags: Rename configure exporter to cmdline
    
    Rename to something generic and not tied to a single specific use
    pattern. Preserve configure as a legacy alias, because there's no
    reason to break the current users, and the name they are using is
    fine in case it's being used in a configure script call.

diff --git a/debian/changelog b/debian/changelog
index 70735b4..dc5ad5f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -43,6 +43,8 @@ dpkg (1.17.0) UNRELEASED; urgency=low
     Closes: #681470
   * Document dpkg-buildflags export mode usage in man page. Closes: #691449
     Thanks to Jonathan Nieder <[email protected]>.
+  * Rename dpkg-buildflags configure exporter to cmdline, but preserve
+    configure as a legacy alias.
 
  -- Guillem Jover <[email protected]>  Fri, 03 Aug 2012 13:21:00 +0200
 
diff --git a/man/dpkg-buildflags.1 b/man/dpkg-buildflags.1
index caca9e1..887280a 100644
--- a/man/dpkg-buildflags.1
+++ b/man/dpkg-buildflags.1
@@ -2,6 +2,7 @@
 .\"
 .\" Copyright © 2010-2011 Raphaël Hertzog <[email protected]>
 .\" Copyright © 2011 Kees Cook <[email protected]>
+.\" Copyright © 2011-2013 Guillem Jover <[email protected]>
 .\"
 .\" This is free software; you can redistribute it and/or modify
 .\" it under the terms of the GNU General Public License as published by
@@ -95,9 +96,13 @@ 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.
 .TP
+.B cmdline
+Arguments to pass to a build program's command line to use all the
+compilation flags (since dpkg 1.17.0). The flag values are quoted in
+shell syntax.
+.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.
+This is a legacy alias for \fBcmdline\fP.
 .TP
 .B make
 Make directives to set and export all the compilation flags in the
@@ -328,9 +333,9 @@ To pass build flags to a build command in a makefile:
 .PP
 .RS 4
 .nf
-$(MAKE) $(shell dpkg\-buildflags \-\-export=configure)
+$(MAKE) $(shell dpkg\-buildflags \-\-export=cmdline)
 
-\&./configure $(shell dpkg\-buildflags \-\-export=configure)
+\&./configure $(shell dpkg\-buildflags \-\-export=cmdline)
 .fi
 .RE
 .PP
@@ -347,7 +352,7 @@ or to set the positional parameters to pass to a command:
 .PP
 .RS 4
 .nf
-eval "set \-\- $(dpkg\-buildflags \-\-export=configure)"
+eval "set \-\- $(dpkg\-buildflags \-\-export=cmdline)"
 for dir in a b c; do (cd $dir && ./configure "$@" && make); done
 .fi
 .RE
diff --git a/scripts/dpkg-buildflags.pl b/scripts/dpkg-buildflags.pl
index a87dd42..f32dd46 100755
--- a/scripts/dpkg-buildflags.pl
+++ b/scripts/dpkg-buildflags.pl
@@ -3,6 +3,7 @@
 # dpkg-buildflags
 #
 # Copyright © 2010-2011 Raphaël Hertzog <[email protected]>
+# Copyright © 2012-2013 Guillem Jover <[email protected]>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -48,10 +49,9 @@ sub usage {
   --query-features <area>
                      output the status of features for the given area.
   --list             output a list of the flags supported by the current 
vendor.
-  --export=(sh|make|configure)
-                     output something convenient to import the
-                     compilation flags in a shell script, in make,
-                     or on a ./configure command line.
+  --export=(sh|make|cmdline|configure)
+                     output something convenient to import the compilation
+                     flags in a shell script, in make, or in a command line.
   --dump             output all compilation flags with their values
   --status           print a synopsis with all parameters affecting the
                      behaviour of dpkg-buildflags and the resulting flags
@@ -71,10 +71,12 @@ while (@ARGV) {
         $action = $1;
         $param = shift(@ARGV);
        usageerr(_g("%s needs a parameter"), $_) unless defined $param;
-    } elsif (m/^--export(?:=(sh|make|configure))?$/) {
+    } elsif (m/^--export(?:=(sh|make|cmdline|configure))?$/) {
         usageerr(_g("two commands specified: --%s and --%s"), "export", 
$action)
             if defined($action);
         my $type = $1 || "sh";
+        # Map legacy aliases.
+        $type = 'cmdline' if $type eq 'configure';
         $action = "export-$type";
     } elsif (m/^--(list|status|dump)$/) {
         usageerr(_g("two commands specified: --%s and --%s"), $1, $action)
@@ -136,7 +138,7 @@ if ($action eq "get") {
        } elsif ($export_type eq "make") {
            $value =~ s/\$/\$\$/g;
            print "export $flag := $value\n";
-       } elsif ($export_type eq "configure") {
+       } elsif ($export_type eq "cmdline") {
            print "$flag=\"$value\" ";
        }
     }

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to