From 1136049118af8dcc176a942e594948d64edcbd94 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 8 Oct 2004 21:06:20 +0000 Subject: [PATCH] - Handle autoconf/autoheader requirements better when asked to build. - Look for ./configure options specified in the opening comments and use it/them when asked to build. --- verify-patches | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/verify-patches b/verify-patches index e215b0d..29f48b3 100755 --- a/verify-patches +++ b/verify-patches @@ -114,8 +114,25 @@ foreach my $diff (@ARGV) { close IN; close OUT; } + my $need_autoconf; + my $conf_opts; + open(IN, "../$diff") or die $!; + while () { + if (!defined $conf_opts) { + $conf_opts = '' if /^---/; + if (m#^\s*\./configure( .+)#) { + $conf_opts = $1; + } + } + if (m#^--- orig/(configure\.in|/aclocal\.m4)#) { + $need_autoconf = 1; + last; + } + } + close IN; chdir('workdir') or die $!; - system "make gen; ./configure $CONF_OPTS; make"; + system "autoconf; autoheader" if $need_autoconf; + system "make proto; ./configure $CONF_OPTS $conf_opts; make"; chdir('..') or die $!; $default = '!make test'; next; -- 2.34.1