2
# This script reads configure.ac, and replaces all occurences of
3
# @.+@ in script and manpage with values.
4
# It returns 0 on success, 1 if it missed something.
6
# St�phane (kwisatz) Jourdois <kwisatz@rubis.org>
7
# Mon, 16 Aug 2004 15:22:24 +0200
12
'PERL' => '/usr/bin/perl',
15
my ($from, $to) = @ARGV;
17
open AC, '<configure.ac' or die "Cannot read configure.ac: $!\n";
20
if (/^AC_INIT\((\w+), ([0-9.]+), .+\)/) {
21
$vars{'PACKAGE_NAME'} = $1;
22
$vars{'PACKAGE_VERSION'} = $2;
24
# Remove this line if there is are
25
# other interesting lines in configure.ac
26
# For now there isn't.
32
open FROM, "<$from" or die "Cannot read $from: $!\n";
33
open TO, ">$to" or die "Cannot write $to: $!\n";
36
for my $var (keys %vars) {
37
s/\@$var\@/$vars{$var}/g;