about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 23f3964..63209fd 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -38,9 +38,10 @@ mmime : slurp.o
 minc mlist : squeeze_slash.o
 
 museragent: FRC
-	@printf '#!/bin/sh\nprintf "User-Agent: mblaze/%s (%s)\\n"\n' \
+	@test -n "$$SOURCE_TIME_EPOCH" || BUILDDATE=$$(date '+ (%Y-%m-%d)'); \
+		printf '#!/bin/sh\nprintf "User-Agent: mblaze/%s%s\\n"\n' \
 		"$$({ git describe --always --dirty 2>/dev/null || cat VERSION; } | sed 's/^v//')" \
-		"$$(date +%Y-%m-%d)" >$@
+		"$$BUILDDATE" >$@
 	@chmod +x $@
 
 README: man/mblaze.7