]> sjero.net Git - wget/blobdiff - src/Makefile.am
Automated merge with file:/home/micah/devel/wget/mainline
[wget] / src / Makefile.am
index ac52ee6008f259b7e253779c206ed5a3bf1beb6b..dcc19c816d0f31cf7f1afdf0046b045986a80a26 100644 (file)
@@ -31,7 +31,7 @@
 
 # The following line is losing on some versions of make!
 DEFS     = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
-LIBS     = @LIBS@ @LIBSSL@ @LIBGNUTLS@
+LIBS     = @LIBS@ @LIBSSL@ @LIBGNUTLS@ @LIBINTL@
 
 bin_PROGRAMS = wget
 wget_SOURCES = cmpt.c connect.c convert.c cookies.c ftp.c ftp-basic.c  \
@@ -48,13 +48,16 @@ EXTRA_wget_SOURCES = mswindows.c
 LDADD = $(ALLOCA) $(LIBOBJS)
 
 # version.c's not really _phony_, but it does need to be generated each run.
-HG_ID = $(shell hg id 2>/dev/null | cut -f 1 -d ' ')
 .PHONY: version.c
-version.c:
+version.c: hg-id
        printf '%s' 'const char *version_string = "@VERSION@' > $@
-       [ "$(HG_ID)" ] && printf '%s' ' ($(HG_ID))' >> $@
+       -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