mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Generate version.c based on output of "hg id".
This commit is contained in:
parent
0b0893fabe
commit
181c613814
@ -22,6 +22,7 @@ src/wget
|
||||
src/tags
|
||||
src/TAGS
|
||||
src/libunittest.a
|
||||
src/version.c
|
||||
doc/stamp-vti
|
||||
doc/wget.1
|
||||
doc/wget.pod
|
||||
|
@ -47,6 +47,14 @@ 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.
|
||||
HG_ID = $(shell hg id 2>/dev/null | cut -f 1 -d ' ')
|
||||
.PHONY: version.c
|
||||
version.c:
|
||||
printf '%s' 'const char *version_string = "@VERSION@' > $@
|
||||
[ "$(HG_ID)" ] && printf '%s' ' ($(HG_ID))' >> $@
|
||||
printf '%s\n' '";' >> $@
|
||||
|
||||
check_LIBRARIES = libunittest.a
|
||||
libunittest_a_SOURCES = $(wget_SOURCES) test.c test.h
|
||||
libunittest_a_CPPFLAGS = -DTESTING
|
||||
|
Loading…
Reference in New Issue
Block a user