blob: 147f0e59eb16b61c871ae13ff7e99cbec737452b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
#!/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;
}
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";
if(!-f "configure") {
print "running buildconf\n";
`./buildconf`;
}
print "adding $version in the configure.ac file\n";
`sed -e 's/AC_INIT.*/AC_INIT([c-ares], [$version],/' < configure.ac > configure.ac.dist`;
# now make a new configure script with this
print "makes a new configure script\n";
`autoconf configure.ac.dist >configure`;
# now run this new configure to get a fine makefile
print "running configure\n";
`./configure`;
# 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`;
# now make the actual tarball
print "running make dist\n";
`make dist VERSION=$version`;
# remove temporay sourced man pages
`make -s clean-sourced-manpages`;
print "removing temporary configure.ac file\n";
`rm configure.ac.dist`;
print "removing temporary ares_version.h file\n";
`rm ares_version.h.dist`;
print "NOTE: now cvs tag this release!\n";
|