From: Tilman Sauerbeck Date: Sat, 21 Apr 2007 10:31:09 +0000 (+0200) Subject: Improved "dist" target. X-Git-Url: http://gitweb/?a=commitdiff_plain;h=86830d3c84fef2d68fee2def7a276caaa94d72f4;p=pkgutils-cross.git Improved "dist" target. --- diff --git a/Makefile b/Makefile index 958f08d..67c334c 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ MANDIR = /usr/man ETCDIR = /etc VERSION = 5.30.0 +NAME = pkgutils-$(VERSION) CXXFLAGS += -DNDEBUG CXXFLAGS += -O2 -Wall -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" \ @@ -66,12 +67,11 @@ endif .PHONY: install clean distclean dist dist: distclean - rm -rf /tmp/pkgutils-$(VERSION) - mkdir -p /tmp/pkgutils-$(VERSION) - git-log > ChangeLog - cp -rf . /tmp/pkgutils-$(VERSION) - tar -C /tmp --exclude .git -czvf ../pkgutils-$(VERSION).tar.gz pkgutils-$(VERSION) - rm -rf /tmp/pkgutils-$(VERSION) + rm -rf $(NAME) $(NAME).tar.gz + git archive --format=tar --prefix=$(NAME)/ HEAD | tar -x + git log > $(NAME)/ChangeLog + tar czvf $(NAME).tar.gz $(NAME) + rm -rf $(NAME) install: all install -D -m0755 pkgadd $(DESTDIR)$(BINDIR)/pkgadd