summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-05-16 05:04:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-05-16 05:04:29 +0000
commit7e2c3c0331aaf8e7bf9201a84e76cc43f6c0a26b (patch)
treeae686c49a9f962e00d86b813228c173b07445ac9
parentReleasing progress-linux version 17-0+dschinn1. (diff)
downloaddh-autoreconf-7e2c3c0331aaf8e7bf9201a84e76cc43f6c0a26b.zip
dh-autoreconf-7e2c3c0331aaf8e7bf9201a84e76cc43f6c0a26b.tar.xz
Merging upstream version 18.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rwxr-xr-xdh_autoreconf27
1 files changed, 24 insertions, 3 deletions
diff --git a/dh_autoreconf b/dh_autoreconf
index 6fbb3d0..c411190 100755
--- a/dh_autoreconf
+++ b/dh_autoreconf
@@ -95,6 +95,15 @@ shall not be run:
=cut
+# Check if a configure line matches a certain regular expression
+sub grep_configure {
+ my $expr = shift;
+ foreach my $configure (("configure.ac", "configure.in")) {
+ return eval { doit("grep", "-q", $expr, $configure) } if (-e $configure);
+ }
+ return 0;
+}
+
my $opt_sourcedir;
init(options => { "mode=s" => \$dh{MODE},
@@ -152,19 +161,31 @@ my $find = $modes{$dh{MODE} || "md5"} ||
complex_doit("$find > debian/autoreconf.before");
+my $pwd = getcwd();
+
eval {
# Run autoreconf to recreate the needed files.
- my $pwd = getcwd();
chdir $opt_sourcedir if (defined($opt_sourcedir) && !compat(9));
- @ARGV ? doit(@ARGV, @{$dh{U_PARAMS}}) : doit('autoreconf', '-f', '-i', @directories);
+ if (@ARGV) {
+ doit(@ARGV, @{$dh{U_PARAMS}})
+ } else {
+ doit("gtkdocize", "--copy") if (grep_configure("^GTK_DOC_CHECK"));
- chdir $pwd;
+ if (grep_configure("^XDT_")) {
+ $ENV{NOCONFIGURE}='1';
+ doit('xdt-autogen', @directories);
+ } else {
+ doit('autoreconf', '-f', '-i', @directories);
+ }
+ }
1;
} or do {
$exception = $@;
};
+chdir $pwd;
+
complex_doit("$find > debian/autoreconf.after");
# Let's fail here if autoreconf failed.