matches generated file timestamps to source
authorDaniel <thefekete@gmail.com>
Tue, 23 Jun 2020 00:52:28 +0000 (02:52 +0200)
committerDaniel <thefekete@gmail.com>
Tue, 23 Jun 2020 00:52:28 +0000 (02:52 +0200)
Makefile

index dfea4f1..a5360e6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,10 +6,11 @@ all: $H
 
 build/%.html: %.md build/ Makefile
        { cat $<; echo; echo "<small><i>Last updated $$(date -u -d @$$(stat -c %Y $<))</i></small>"; } | markdown >$@
-       cp -a $L build/
+       touch -cr $< $@
 
-build/:
+build/: $L
        mkdir -p $@
+       cp -av $L build/
 
 view:
        xdg-open build/index.html