diff Makefile @ 36:82a31628a26d

Use pax to generate tarballs Use pax instead of tar to generate tarballs which allows direct manipulation of paths without any hacks.
author Guido Berhoerster <gber@opensuse.org>
date Fri, 07 Feb 2014 18:10:41 +0100
parents b84b4ae937e3
children 7e44a0a8dc2c
line wrap: on
line diff
--- a/Makefile	Fri Feb 07 17:55:13 2014 +0100
+++ b/Makefile	Fri Feb 07 18:10:41 2014 +0100
@@ -32,7 +32,7 @@
 INSTALL :=	install
 INSTALL.exec :=	$(INSTALL) -D -m 0755
 INSTALL.data :=	$(INSTALL) -D -m 0644
-TAR :=		tar
+PAX :=		pax
 GZIP :=		gzip
 SED :=		sed
 MSGFMT :=	msgfmt
@@ -108,8 +108,7 @@
 	rm -f $(patsubst %.o,%.d,$(OBJS))
 
 dist: clobber
-	rm -f $(DISTNAME)
-	ln -s -f . $(DISTNAME)
-	$(TAR) cv $(DISTNAME)/* | $(GZIP) > $(DISTNAME).tar.gz
+	$(PAX) -w -x ustar -s ',.*/\..*,,' -s ',./[^/]*\.tar\.gz,,' \
+	    -s ',\./,$(DISTNAME)/,' . | $(GZIP) > $(DISTNAME).tar.gz
 
 -include $(patsubst %.o,%.d,$(OBJS))