git://git.jankratochvil.net
/
macros.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed rpm build if '%configure' specified in .spec file w/o any arguments.
[macros.git]
/
AutoGen.pm
diff --git
a/AutoGen.pm
b/AutoGen.pm
index
ec5c50e
..
a7f223f
100644
(file)
--- a/
AutoGen.pm
+++ b/
AutoGen.pm
@@
-159,7
+159,7
@@
my($class,%args)=@_;
$spec=~s/\\\n/ /gs;
$class->run(%Options,
"ARGV"=>["--copy"],
$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";
);
_remove "ChangeLog"; # force its rebuild by Makefile/rcs2log
_system "make dist $name.spec";
@@
-173,7
+173,7
@@
my($class,%args)=@_;
));
_system "make dist-tarZ" if $Options{"dist-tarZ"};
_move _rpmeval("_srcrpmdir")."/$name-*.src.rpm",".";
));
_system "make dist-tarZ" if $Options{"dist-tarZ"};
_move _rpmeval("_srcrpmdir")."/$name-*.src.rpm",".";
- _move _rpmeval("_rpmdir")."/"._rpmeval("_
arch")."/$name-*."._rpmeval("_arch
").".rpm",".";
+ _move _rpmeval("_rpmdir")."/"._rpmeval("_
target_cpu")."/$name-*."._rpmeval("_target_cpu
").".rpm",".";
_system "ls -l $name-*";
exit 0; # should never return
}
_system "ls -l $name-*";
exit 0; # should never return
}
@@
-219,7
+219,7
@@
sub _cleanfiles
./stamp-h ./stamp-h.in ./stamp-h1
./install-sh
./aclocal.m4
./stamp-h ./stamp-h.in ./stamp-h1
./install-sh
./aclocal.m4
- ./autom4te-*.cache
+ ./autom4te
.cache ./autom4te
-*.cache
./m4
./missing
./mkinstalldirs
./m4
./missing
./mkinstalldirs
@@
-376,6
+376,8
@@
my($class,%options)=@_;
my $configure_in=_readfile("configure.in");
do { $$_=1 if !defined($$_) && $configure_in=~/^AM_GNU_GETTEXT\b/m; }
for (\$Options{"want-gettextize"});
my $configure_in=_readfile("configure.in");
do { $$_=1 if !defined($$_) && $configure_in=~/^AM_GNU_GETTEXT\b/m; }
for (\$Options{"want-gettextize"});
+ do { $$_=1 if !defined($$_) && $configure_in=~/^AM_GLIB_GNU_GETTEXT\b/m; }
+ for (\$Options{"want-glib-gettextize"});
do { $$_=1 if !defined($$_) && $configure_in=~/^AM_PROG_LIBTOOL\b/m; }
for (\$Options{"want-libtoolize"});
do { $$_=1 if !defined($$_) && $configure_in=~/^A[CM]_CONFIG_HEADER\b/m; }
do { $$_=1 if !defined($$_) && $configure_in=~/^AM_PROG_LIBTOOL\b/m; }
for (\$Options{"want-libtoolize"});
do { $$_=1 if !defined($$_) && $configure_in=~/^A[CM]_CONFIG_HEADER\b/m; }
@@
-427,6
+429,11
@@
my($class,%options)=@_;
_writefile $Makefile_in_in,$file;
}
}
_writefile $Makefile_in_in,$file;
}
}
+ 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"};
_system "aclocal",map((!$_ ? () : @$_),$Options{"aclocal_args"});
_system qw(libtoolize),@copy_arg if $Options{"want-libtoolize"};
_system qw(autoheader) if $Options{"want-autoheader"};
@@
-440,9
+447,12
@@
my($class,%options)=@_;
return if $Options{"ARGV_dist"};
return if $Options{"ARGV_dist"};
+ # 'configure' defaults to CFLAGS '-g -O2' but our --enable-maintainer-mode
+ # should force '-ggdb3'
+ $ENV{"CFLAGS"}||="";
# shared/static switching cannot be based on maintainer-mode in configure
_system(qw(./configure --enable-maintainer-mode),
# 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"}),
);
}
map((!$_ ? () : @$_),$Options{"configure_args"}),
);
}