mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
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.
This commit is contained in:
parent
2730842559
commit
8e715af480
@ -55,3 +55,12 @@ libcares_la_SOURCES = $(CSOURCES) $(HHEADERS)
|
|||||||
libcares_ladir = $(includedir)
|
libcares_ladir = $(includedir)
|
||||||
# what headers to install on 'make install':
|
# what headers to install on 'make install':
|
||||||
libcares_la_HEADERS = ares.h ares_version.h
|
libcares_la_HEADERS = ares.h ares_version.h
|
||||||
|
|
||||||
|
# Make files named *.dist replace the file without .dist extension
|
||||||
|
dist-hook:
|
||||||
|
find $(distdir) -name "*.dist" -exec rm {} \;
|
||||||
|
(distit=`find $(srcdir) -name "*.dist"`; \
|
||||||
|
for file in $$distit; do \
|
||||||
|
strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
|
||||||
|
cp $$file $(distdir)$$strip; \
|
||||||
|
done)
|
||||||
|
21
ares/maketgz
21
ares/maketgz
@ -12,6 +12,27 @@ if(!-f "ares.h") {
|
|||||||
exit;
|
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") {
|
if(!-f "configure") {
|
||||||
print "running buildconf\n";
|
print "running buildconf\n";
|
||||||
`./buildconf`;
|
`./buildconf`;
|
||||||
|
Loading…
Reference in New Issue
Block a user