summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-07-09 16:46:23 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-07-10 18:57:25 +0200
commitf58ca083397114991939c2db495ce6bfab99c42a (patch)
tree2fd91359ba5a6fc92737eff66cbdb8e2d515ede7 /Makefile
parentc9c9cb509f3718e6581f8789c2ae6efe57b189b1 (diff)
downloadmkinitcpio-working.tar.gz
mkinitcpio-working.tar.xz
harden version generationworking
If you run make dist, extract that tarball somewhere else and try to run makepkg it will fail because it can't find the git tree anymore. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 18df47f..a4bc024 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
# Makefile for mkinitcpio
-VERSION = $(shell if test -f VERSION; then cat VERSION; else git describe; fi)
+VERSION = $(shell if test -f VERSION; then cat VERSION; else git describe --dirty | sed 's/-/./g'; fi)
DIRS = \
/bin \
@@ -68,4 +68,7 @@ dist: clean doc
${RM} -r mkinitcpio-${VERSION}
gzip -9 mkinitcpio-${VERSION}.tar
-.PHONY: clean dist install tarball
+version:
+ @echo ${VERSION}
+
+.PHONY: clean dist install tarball version