diff options
author | Harald Hoyer <harald@redhat.com> | 2013-06-13 12:05:10 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2013-06-13 12:55:26 +0200 |
commit | 85b458d90dd67f75b5d0fad6d50488f1348a3983 (patch) | |
tree | 3b0ffd1c5bb137262fef733709e1e728076c7641 /Makefile | |
parent | 268ae2841b4506e81512758177aedea1f9e74fa7 (diff) | |
download | dracut-85b458d90dd67f75b5d0fad6d50488f1348a3983.tar.gz dracut-85b458d90dd67f75b5d0fad6d50488f1348a3983.tar.bz2 dracut-85b458d90dd67f75b5d0fad6d50488f1348a3983.zip |
Makefile: source dracut-version.sh and correct dist tarball
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -1,6 +1,7 @@ -RELEASEDVERSION = -- will be replaced by "make dist" -- -VERSION = $(shell [ -d .git ] && git describe --abbrev=0 --tags 2>/dev/null || echo $(RELEASEDVERSION)) -GITVERSION = $(shell [ -d .git ] && { v=$$(git describe --tags 2>/dev/null); echo -$${v\#*-}; } ) +-include dracut-version.sh + +VERSION = $(shell [ -d .git ] && git describe --abbrev=0 --tags 2>/dev/null || echo $(DRACUT_VERSION)) +GITVERSION = $(shell [ -d .git ] && { v=$$(git describe --tags 2>/dev/null); [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } ) -include Makefile.inc @@ -158,11 +159,11 @@ clean: dist: dracut-$(VERSION).tar.bz2 dracut-$(VERSION).tar.bz2: doc + @echo "DRACUT_VERSION=$(VERSION)" > dracut-version.sh git archive --format=tar $(VERSION) --prefix=dracut-$(VERSION)/ > dracut-$(VERSION).tar mkdir -p dracut-$(VERSION) - cp $(manpages) dracut.html dracut-$(VERSION) - git show $(VERSION):Makefile | sed 's/^RELEASEDVERSION =.*/RELEASEDVERSION = $(VERSION)/' > dracut-$(VERSION)/Makefile - tar --owner=root --group=root -rf dracut-$(VERSION).tar dracut-$(VERSION)/*.[0-9] dracut-$(VERSION)/dracut.html dracut-$(VERSION)/Makefile + for i in $(manpages) dracut.html dracut-version.sh; do [ "$${i%/*}" != "$$i" ] && mkdir -p "dracut-$(VERSION)/$${i%/*}"; cp "$$i" "dracut-$(VERSION)/$$i"; done + tar --owner=root --group=root -rf dracut-$(VERSION).tar $$(find dracut-$(VERSION) -type f) rm -fr dracut-$(VERSION).tar.bz2 dracut-$(VERSION) bzip2 -9 dracut-$(VERSION).tar rm -f dracut-$(VERSION).tar |