From beeb92cf3306a84f65ac62a6ca49424c62a6412d Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 9 Jul 2011 16:46:23 +0200 Subject: harden version generation 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. [Dave: removed --dirty flag, as this breaks makepkg] Signed-off-by: Florian Pritz --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 18df47f..1a3a815 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 | 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 -- cgit v1.2.3-24-g4f1b