aboutsummaryrefslogtreecommitdiff
path: root/ares/maketgz
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-10-24 13:02:09 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-10-24 13:02:09 +0000
commit8e715af4806703230e3dab97b0d8865285d9151b (patch)
tree5be4cdb0200e7bd730bda472d8d2f1634af7ddcd /ares/maketgz
parent2730842559e4cb30a9997ca127c020c5857b97af (diff)
maketgz now creates a ares_version.h.dist file with the given version data
properly set, and the Makefile.am is now fixed to use that when building a new package with make dist.
Diffstat (limited to 'ares/maketgz')
-rwxr-xr-xares/maketgz21
1 files changed, 21 insertions, 0 deletions
diff --git a/ares/maketgz b/ares/maketgz
index 224079ae1..6abe3f1c3 100755
--- a/ares/maketgz
+++ b/ares/maketgz
@@ -12,6 +12,27 @@ if(!-f "ares.h") {
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`;