]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
doc: draw date in kresd.8 from NEWS
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 20 Nov 2018 18:26:08 +0000 (13:26 -0500)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 20 Nov 2018 18:26:08 +0000 (13:26 -0500)
Ideally, we'll just use the datestamp in the first line of NEWS directly.

if we can't find that, then fall back to the timestamp of the file
(which might be different on different machines because of how git
applies updates).  In any event, choose the datestamp using UTC, to
avoid building a different kresd.8 depending on the TZ of the machine.

daemon/daemon.mk

index eef6e8e5b2da092e008e66f7ec4cfab594881894..e0d0000ce6561603ec6effa7fb18cbdf561e6fc7 100644 (file)
@@ -53,7 +53,7 @@ endif
 $(eval $(call make_sbin,kresd,daemon,yes))
 
 # Targets
-date := $(shell date -r NEWS +%F)
+date := $(shell head -n1 < NEWS | sed 's/.*(\(.*\)).*/\1/' | grep -E '^[0-9]{4}-[0-9]{2}-[0-9]{2}$$' || date -u -r NEWS +%F)
 daemon: $(kresd) $(kresd_DIST)
 daemon-install: kresd-install bindings-install
 ifneq ($(SED),)