mirror of
https://github.com/mirror/wget.git
synced 2025-01-10 12:20:47 +08:00
Use portable method to obtain hg id's output.
This commit is contained in:
parent
2681148154
commit
45e439a135
@ -48,13 +48,16 @@ EXTRA_wget_SOURCES = mswindows.c
|
|||||||
LDADD = $(ALLOCA) $(LIBOBJS)
|
LDADD = $(ALLOCA) $(LIBOBJS)
|
||||||
|
|
||||||
# version.c's not really _phony_, but it does need to be generated each run.
|
# 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
|
.PHONY: version.c
|
||||||
version.c:
|
version.c: hg-id
|
||||||
printf '%s' 'const char *version_string = "@VERSION@' > $@
|
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' '";' >> $@
|
printf '%s\n' '";' >> $@
|
||||||
|
|
||||||
|
.INTERMEDIATE: hg-id
|
||||||
|
hg-id:
|
||||||
|
-( hg id | cut -f 1 -d ' ' ) 2>/dev/null > $@
|
||||||
|
|
||||||
check_LIBRARIES = libunittest.a
|
check_LIBRARIES = libunittest.a
|
||||||
libunittest_a_SOURCES = $(wget_SOURCES) test.c test.h
|
libunittest_a_SOURCES = $(wget_SOURCES) test.c test.h
|
||||||
libunittest_a_CPPFLAGS = -DTESTING
|
libunittest_a_CPPFLAGS = -DTESTING
|
||||||
|
Loading…
Reference in New Issue
Block a user