From: Micah Cowan Date: Wed, 10 Oct 2007 03:03:18 +0000 (-0700) Subject: Use portable method to obtain hg id's output. X-Git-Tag: v1.13~516^2~1 X-Git-Url: http://sjero.net/git/?a=commitdiff_plain;h=45e439a135bcb45a0740c06f1fa011166ea0f270;hp=2681148154e8f3225140bb6048145d7ea5fb430c;p=wget Use portable method to obtain hg id's output. --- diff --git a/src/Makefile.am b/src/Makefile.am index 3737088b..97803a9a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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