2003-10-08 16:18:15 -04:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
$version = $ARGV[0];
|
|
|
|
|
|
|
|
if($version eq "") {
|
|
|
|
print "Enter version number!\n";
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!-f "ares.h") {
|
|
|
|
print "run this script in the ares source root dir\n";
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2004-10-24 09:02:09 -04:00
|
|
|
my ($major, $minor, $patch)=split(/\./, $version);
|
|
|
|
|
|
|
|
$major += 0;
|
|
|
|
$minor += 0;
|
|
|
|
$patch += 0;
|
|
|
|
|
|
|
|
open(VER, "<ares_version.h") ||
|
|
|
|
die "can't open ares_version.h";
|
|
|
|
open(NEWV, ">ares_version.h.dist");
|
|
|
|
while(<VER>) {
|
|
|
|
$_ =~ s/^\#define ARES_VERSION_MAJOR .*/\#define ARES_VERSION_MAJOR $major/;
|
|
|
|
$_ =~ s/^\#define ARES_VERSION_MINOR .*/\#define ARES_VERSION_MINOR $minor/;
|
|
|
|
$_ =~ s/^\#define ARES_VERSION_PATCH .*/\#define ARES_VERSION_PATCH $patch/;
|
|
|
|
$_ =~ s/^\#define ARES_VERSION_STR .*/\#define ARES_VERSION_STR \"$version\"/;
|
|
|
|
|
|
|
|
print NEWV $_;
|
|
|
|
}
|
|
|
|
close(VER);
|
|
|
|
close(NEWV);
|
|
|
|
print "ares_version.h.dist created\n";
|
|
|
|
|
2003-10-08 16:25:37 -04:00
|
|
|
if(!-f "configure") {
|
2004-07-22 18:18:45 -04:00
|
|
|
print "running buildconf\n";
|
|
|
|
`./buildconf`;
|
2003-10-08 16:18:15 -04:00
|
|
|
}
|
2004-07-22 18:18:45 -04:00
|
|
|
print "adding $version in the configure.ac file\n";
|
2008-07-06 22:11:21 -04:00
|
|
|
`sed -e 's/AC_INIT.*/AC_INIT([c-ares], [$version],/' < configure.ac > configure.ac.dist`;
|
2003-10-08 16:18:15 -04:00
|
|
|
|
2004-07-22 18:18:45 -04:00
|
|
|
# now make a new configure script with this
|
|
|
|
print "makes a new configure script\n";
|
2008-05-22 13:41:29 -04:00
|
|
|
`autoconf configure.ac.dist >configure`;
|
2003-10-08 16:18:15 -04:00
|
|
|
|
2004-07-22 18:18:45 -04:00
|
|
|
# now run this new configure to get a fine makefile
|
|
|
|
print "running configure\n";
|
|
|
|
`./configure`;
|
2003-10-08 16:18:15 -04:00
|
|
|
|
2009-05-21 13:40:55 -04:00
|
|
|
# generate HTML versions of man pages
|
|
|
|
# Deactivated for now. It seems that man pages need some adjustments
|
|
|
|
# relative to paragraph and/or line breaks for proper html formatting.
|
|
|
|
# EXTRA_DIST will need $(HTMLPAGES) when this is fully activated.
|
|
|
|
# print "running make html\n";
|
|
|
|
# `make -s html`;
|
|
|
|
|
|
|
|
# generate PDF versions of man pages
|
|
|
|
print "running make pdf\n";
|
|
|
|
`make -s pdf`;
|
|
|
|
|
2004-07-22 18:18:45 -04:00
|
|
|
# now make the actual tarball
|
|
|
|
print "running make dist\n";
|
2008-08-20 20:13:48 -04:00
|
|
|
`make dist VERSION=$version`;
|
2003-10-08 16:18:15 -04:00
|
|
|
|
2009-05-21 13:40:55 -04:00
|
|
|
# remove temporay sourced man pages
|
|
|
|
`make -s clean-sourced-manpages`;
|
|
|
|
|
2004-07-22 18:18:45 -04:00
|
|
|
print "removing temporary configure.ac file\n";
|
2008-05-22 13:41:29 -04:00
|
|
|
`rm configure.ac.dist`;
|
2008-07-06 22:11:21 -04:00
|
|
|
print "removing temporary ares_version.h file\n";
|
|
|
|
`rm ares_version.h.dist`;
|
2004-04-01 03:23:26 -05:00
|
|
|
|
|
|
|
print "NOTE: now cvs tag this release!\n";
|