summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-03-10 12:32:29 +0100
committertv <tv@krebsco.de>2016-03-10 12:35:41 +0100
commit37ff2437476bf8752643f3735ed3f2b19dbddb40 (patch)
tree47e34cbd08ad8ca3d5ad183f106054c0e5de8a4f
parent20ad35c90045b51bc2e83587d0650a33467ea896 (diff)
Makefile: ifndef HOSTNAME, def it
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 226c0f2..bd45440 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,10 @@
stockholm ?= .
+export HOSTNAME ?= $(shell cat /proc/sys/kernel/hostname)
+
export STOCKHOLM_VERSION ?= $(shell \
version=git.$$(git describe --always --dirty); \
- case $$version in (*-dirty) version=$$version@$$(hostname); esac; \
+ case $$version in (*-dirty) version=$$version@$$HOSTNAME; esac; \
date=$$(date +%y.%m); \
printf '%s' "$$date.$$version"; \
)