From 69a93873e124fed7fa4d6aaf7f76090f81433954 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 24 Mar 2012 10:55:08 -0400 Subject: Makefile: simplify 'make dist' target - Use git-ls-files and bsdtar to create the archive rather than using git-archive and an temporary directory. - Remove the tarball target. 'dist' is more common. - Remove the 'clean' dependency from dist. Our dependencies are sufficient higher up that touching the Makefile or the asciidoc input will trigger a doc rebuild on changes. Signed-off-by: Dave Reisner --- Makefile | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 9eac07e..46b0b09 100644 --- a/Makefile +++ b/Makefile @@ -57,15 +57,12 @@ clean: ${RM} -r build mkinitcpio-${VERSION} ${RM} mkinitcpio-${VERSION}.tar.gz mkinitcpio.8 mkinitcpio.8.gz -tarball: dist -dist: clean doc - git archive --prefix=mkinitcpio-${VERSION}/ -o mkinitcpio-${VERSION}.tar HEAD - mkdir mkinitcpio-${VERSION}; \ - cp -t mkinitcpio-${VERSION} ${DIST_EXTRA}; \ - echo ${VERSION} > mkinitcpio-${VERSION}/VERSION; \ - tar uf mkinitcpio-${VERSION}.tar mkinitcpio-${VERSION}; \ - ${RM} -r mkinitcpio-${VERSION} - gzip -9 mkinitcpio-${VERSION}.tar +dist: doc + echo ${VERSION} > VERSION + git ls-files -z | xargs -0 \ + bsdtar -czf mkinitcpio-${VERSION}.tar.gz -s ,^,mkinitcpio-${VERSION}/, VERSION ${DIST_EXTRA} + ${RM} VERSION + version: @echo ${VERSION} -- cgit v1.2.3-24-g4f1b