summaryrefslogtreecommitdiffstats
path: root/Makefile
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
commite58921e546e68366f2b294a01ab1afa262ab8b95 (patch)
treea18baa6cdff6e56a05c4cc7aa698f9eab585cf91 /Makefile
parent198407f70fdeacaae5dac6e4ec305629a5368410 (diff)
Makefile: ifndef HOSTNAME, def it
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 226c0f297..bd4544000 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"; \
)