aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-02-08 02:40:11 -0800
committerGuy Harris <guy@alum.mit.edu>2010-02-08 02:40:11 -0800
commit916b450e310e472865fe1ff779ea21b74df8096a (patch)
treedddfeb844548dadfe9d01d8ae60d1ab3b9100906
parent3da6116350d3d2347d71b2bbf94dfb548bf6b9fb (diff)
For PRE-GIT releases, put a date stamp in the version string.
This is similar to what we do for tcpdump.
-rw-r--r--Makefile.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index 3c993cb..29228f1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -437,7 +437,13 @@ snprintf.o: $(srcdir)/missing/snprintf.c
version.c: $(srcdir)/VERSION
@rm -f $@
- sed -e 's/.*/char pcap_version[] = "&";/' $(srcdir)/VERSION > $@
+ if grep GIT ${srcdir}/VERSION >/dev/null; then \
+ read ver <${srcdir}/VERSION; \
+ echo $$ver | tr -d '\012'; \
+ date +_%Y_%m_%d; \
+ else \
+ cat ${srcdir}/VERSION; \
+ fi | sed -e 's/.*/char pcap_version[] = "&";/' > $@
#
# NOTE: this really is supposed to be static; importing a string