dect
/
libpcap
Archived
13
0
Fork 0

Put date into version.h for Git versions, too.

This commit is contained in:
Guy Harris 2010-02-08 02:49:42 -08:00
parent 916b450e31
commit a6942e7596
1 changed files with 7 additions and 1 deletions

View File

@ -454,7 +454,13 @@ version.c: $(srcdir)/VERSION
#
version.h: $(srcdir)/VERSION
@rm -f $@
sed -e 's/.*/static const char pcap_version_string[] = "libpcap 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/.*/static const char pcap_version_string[] = "libpcap version &";/' > $@
bpf_filter.c: $(srcdir)/bpf/net/bpf_filter.c
rm -f bpf_filter.c