README: use file time for reproducable build
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>
Mon, 2 Mar 2015 17:44:02 +0000 (19:44 +0200)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Mon, 2 Mar 2015 19:11:59 +0000 (21:11 +0200)
https://bugs.debian.org/776622 asks to avoid using the build time in the
generated result to help make the build reproducable.

This fix uses the timestamp of README for generating the timestamp in
the footer of README.html.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Makefile

index 1cf2ccd..d246865 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -196,7 +196,8 @@ test:
 docs: $(GENERATED_DOCS)
 
 README.html: README
-       $(ASCIIDOC_CMD) -o $@ $<
+       date=`stat -c "%y" $<`
+       $(ASCIIDOC_CMD)  -a revdate="$$date" -o $@ $<
 
 dahdi-api.html: drivers/dahdi/dahdi-base.c
        build_tools/kernel-doc --kernel $(KSRC) $^ >$@