X-Git-Url: http://git.jankratochvil.net/?p=macros.git;a=blobdiff_plain;f=AutoGen.pm;h=a7f223f1398ad725d717823bb166423b685b198e;hp=2a3ef7a04f943ea23014bc0b6628d94a24d594d8;hb=110202fa95e7c89bb49a271f706a3b7a175398a8;hpb=8b71216a65589c01347c04330c0904b0e8cf051a;ds=sidebyside diff --git a/AutoGen.pm b/AutoGen.pm index 2a3ef7a..a7f223f 100644 --- a/AutoGen.pm +++ b/AutoGen.pm @@ -159,7 +159,7 @@ my($class,%args)=@_; $spec=~s/\\\n/ /gs; $class->run(%Options, "ARGV"=>["--copy"], - "configure_args"=>[split /\s+/,($spec=~/^%configure\s+(.*)$/m)[0]], + "configure_args"=>[split /\s+/,($spec=~/^[%]configure\b[ \t]*(.*)$/m)[0]], ); _remove "ChangeLog"; # force its rebuild by Makefile/rcs2log _system "make dist $name.spec"; @@ -219,7 +219,7 @@ sub _cleanfiles ./stamp-h ./stamp-h.in ./stamp-h1 ./install-sh ./aclocal.m4 - ./autom4te-*.cache + ./autom4te.cache ./autom4te-*.cache ./m4 ./missing ./mkinstalldirs @@ -429,7 +429,11 @@ my($class,%options)=@_; _writefile $Makefile_in_in,$file; } } - _system "glib-gettextize",@copy_arg if $Options{"want-glib-gettextize"}; + if ($Options{"want-glib-gettextize"}) { + _system "glib-gettextize",@copy_arg; + # "po/ChangeLog" is somehow missing at this point + File::Touch->new("atime_only"=>1)->touch("po/ChangeLog"); + } _system "aclocal",map((!$_ ? () : @$_),$Options{"aclocal_args"}); _system qw(libtoolize),@copy_arg if $Options{"want-libtoolize"}; _system qw(autoheader) if $Options{"want-autoheader"}; @@ -448,7 +452,7 @@ my($class,%options)=@_; $ENV{"CFLAGS"}||=""; # shared/static switching cannot be based on maintainer-mode in configure _system(qw(./configure --enable-maintainer-mode), - ($Options{"want-libtoolize"} && qw(--enable-shared --disable-static)), + (!$Options{"want-libtoolize"} ? () : qw(--enable-shared --disable-static)), map((!$_ ? () : @$_),$Options{"configure_args"}), ); }