diff options
Diffstat (limited to 'ares/maketgz')
-rwxr-xr-x | ares/maketgz | 93 |
1 files changed, 15 insertions, 78 deletions
diff --git a/ares/maketgz b/ares/maketgz index 25eced97c..f1e4969a2 100755 --- a/ares/maketgz +++ b/ares/maketgz @@ -2,8 +2,6 @@ $version = $ARGV[0]; -$name="c-ares"; - if($version eq "") { print "Enter version number!\n"; exit; @@ -15,86 +13,25 @@ if(!-f "ares.h") { } if(!-f "configure") { - `autoconf`; -} - -@files=`find . -name FILES`; - -my @entries; - -sub dirpart { - my ($file)=@_; - my @p=split("/", $file); - $p[$#p]=""; # blank the last one - my $dir=join("/", @p); - - $dir =~ s/^\.\///; # cut off ./ beginnings - - $dir =~ s/\/$//; # off / trailers - - if(!$dir) { - $dir = "."; - } - - return $dir; -} - -sub add { - my ($file)=@_; - - my $dir=dirpart($file); - - open(FILE, "<$file"); - while(<FILE>) { - if($_ =~ /^ *\#/) { - next; - } - chomp; - push @entries, "$dir/$_"; - } - close(FILE); -} - -for(@files) { - chomp; - add($_); + print "running buildconf\n"; + `./buildconf`; } +print "adding $version in the configure.ac file\n"; +`sed -e 's/AM_INIT_AUTOMAKE(c-ares, CVS)/AM_INIT_AUTOMAKE(c-ares, $version)/' < configure.ac > configure.ac-rel`; -sub mkalldir { - my ($dir) = @_; +# now make a new configure script with this +print "makes a new configure script\n"; +`autoconf configure.ac-rel`; - my @parts = split("/", $dir); +# now run this new configure to get a fine makefile +print "running configure\n"; +`./configure`; - #print "IN: $dir\n"; - - my $sub=""; - for(@parts) { - #print "PART: $_\n"; - - $sub .= "$_"; - if($_ eq "") { - next; - } - mkdir($sub, 0777); - #print "make $sub\n"; - $sub .= "/"; - } - -} - -for(@entries) { - my $dir = dirpart("$name-$version/$_"); - # print "Create $dir\n"; - mkalldir($dir); - # print "Copy $_ to $dir\n"; - `cp -p $_ $dir`; -} +# now make the actual tarball +print "running make dist\n"; +`make dist`; -# make a tarball -`tar -cf $name-$version.tar $name-$version`; -# gzip the tarball -`gzip -9 $name-$version.tar`; -# remove the dir -`rm -rf $name-$version`; +print "removing temporary configure.ac file\n"; +`rm configure.ac-rel`; print "NOTE: now cvs tag this release!\n"; |