]> sjero.net Git - wget/commitdiff
Automated merge with file:/home/micah/devel/wget/mainline
authorMicah Cowan <micah@cowan.name>
Wed, 10 Oct 2007 03:50:49 +0000 (20:50 -0700)
committerMicah Cowan <micah@cowan.name>
Wed, 10 Oct 2007 03:50:49 +0000 (20:50 -0700)
.hgignore
configure.ac
src/Makefile.am
src/version.c [deleted file]

index 9dd951df907c75b2bacfe2b7b7393388db6f69a2..3a6b01c6a290959656756ec09e724f48ba2e1d63 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -23,6 +23,7 @@ src/wget
 src/tags
 src/TAGS
 src/libunittest.a
+src/version.c
 doc/stamp-vti
 doc/wget.1
 doc/wget.pod
index 6a00b79c5dc6e6a4e63c71bee56953896e41c0c0..33df20a272a78232319ca9994e716b4366277ea8 100644 (file)
@@ -29,13 +29,10 @@ dnl Process this file with autoconf to produce a configure script.
 dnl
 
 AC_INIT([wget], 
-       [m4_normalize(esyscmd([sed -e 's/^.*"\(.*\)";$/\1/' src/version.c]))],
+       [1.12-devel],
        [bug-wget@gnu.org])
 AC_PREREQ(2.61)
 
-# Make configure depend on the VERSION file, since it's used in AC_INIT
-AC_SUBST([CONFIGURE_DEPENDENCIES], ['$(top_srcdir)/src/version.c'])
-
 dnl
 dnl What version of Wget are we building?
 dnl
index f0f2214c511d76fbf7317c63e51350fdb55c7182..dcc19c816d0f31cf7f1afdf0046b045986a80a26 100644 (file)
@@ -47,6 +47,17 @@ wget_SOURCES = cmpt.c connect.c convert.c cookies.c ftp.c ftp-basic.c        \
 EXTRA_wget_SOURCES = mswindows.c
 LDADD = $(ALLOCA) $(LIBOBJS)
 
+# version.c's not really _phony_, but it does need to be generated each run.
+.PHONY: version.c
+version.c: hg-id
+       printf '%s' 'const char *version_string = "@VERSION@' > $@
+       -HG_ID=$$(cat hg-id); [ "$$HG_ID" ] && printf '%s' " ($${HG_ID})" >> $@
+       printf '%s\n' '";' >> $@
+
+.INTERMEDIATE: hg-id
+hg-id:
+       -( hg id | cut -f 1 -d ' ' ) 2>/dev/null > $@
+
 check_LIBRARIES = libunittest.a
 libunittest_a_SOURCES = $(wget_SOURCES) test.c test.h
 libunittest_a_CPPFLAGS = -DTESTING
diff --git a/src/version.c b/src/version.c
deleted file mode 100644 (file)
index 87fdbae..0000000
+++ /dev/null
@@ -1 +0,0 @@
-char *version_string = "1.10+devel";