Add 'make dist' target to get a tarball to test in addition to the upload target.
authorPetter Reinholdtsen <pere@hungry.com>
Fri, 7 Feb 2014 19:13:52 +0000 (19:13 +0000)
committerPetter Reinholdtsen <pere@hungry.com>
Fri, 7 Feb 2014 19:13:52 +0000 (19:13 +0000)
git-svn-id: svn://svn.sv.gnu.org/sysvinit/sysvinit/trunk@155 456724a4-4300-0410-8514-c89748c515a2

Makefile

index 2d8ed5d26b708edc4858a2f5f02c4abf5c4ecf94..200291decbb9b32edf9907d78bcafaf687df0dcf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,20 @@
 all install clean distclean:
        $(MAKE) -C src $@
 
 all install clean distclean:
        $(MAKE) -C src $@
 
-ifeq ($(MAKECMDGOALS),upload)
 PACKAGE=sysvinit
 VERSION=$(shell sed -rn '1s/.*[[:blank:]]\((.*)\)[[:blank:]].*/\1/p' doc/Changelog)
 SVLOGIN=$(shell svn info | sed -rn '/Repository Root:/{ s|.*//(.*)\@.*|\1|p }')
 PACKAGE=sysvinit
 VERSION=$(shell sed -rn '1s/.*[[:blank:]]\((.*)\)[[:blank:]].*/\1/p' doc/Changelog)
 SVLOGIN=$(shell svn info | sed -rn '/Repository Root:/{ s|.*//(.*)\@.*|\1|p }')
-ifeq (,$(findstring dsf,$(VERSION)))
-       override VERSION := $(VERSION)dsf
-endif
 override TMP:=$(shell mktemp -d $(VERSION).XXXXXXXX)
 override TARBALL:=$(TMP)/$(PACKAGE)-$(VERSION).tar.bz2
 override SFTPBATCH:=$(TMP)/$(VERSION)-sftpbatch
 
 override TMP:=$(shell mktemp -d $(VERSION).XXXXXXXX)
 override TARBALL:=$(TMP)/$(PACKAGE)-$(VERSION).tar.bz2
 override SFTPBATCH:=$(TMP)/$(VERSION)-sftpbatch
 
+dist: $(TARBALL)
+       @cp $(TARBALL) .
+       @echo "tarball $(PACKAGE)-$(VERSION).tar.bz2 ready"
+       rm -rf $(TMP)
+
 upload: $(SFTPBATCH)
 upload: $(SFTPBATCH)
-       @sftp -b $< $(SVLOGIN)@dl.sv.nongnu.org:/releases/$(PACKAGE)
+       echo @sftp -b $< $(SVLOGIN)@dl.sv.nongnu.org:/releases/$(PACKAGE)
        rm -rf $(TMP)
 
 $(SFTPBATCH): $(TARBALL).sig
        rm -rf $(TMP)
 
 $(SFTPBATCH): $(TARBALL).sig
@@ -30,10 +31,9 @@ $(TARBALL).sig: $(TARBALL)
        @gpg -q -ba --use-agent -o $@ $<
 
 $(TARBALL): $(TMP)/$(PACKAGE)-$(VERSION)
        @gpg -q -ba --use-agent -o $@ $<
 
 $(TARBALL): $(TMP)/$(PACKAGE)-$(VERSION)
-       @tar --bzip2 --owner=nobody --group=nobody -cf $@ -C $(TMP) $(PACKAGE)-$(VERSION)
+       @tar --bzip2 --owner=nobody --group=nogroup -cf $@ -C $(TMP) $(PACKAGE)-$(VERSION)
 
 $(TMP)/$(PACKAGE)-$(VERSION): .svn
        svn export . $@
        @chmod -R a+r,u+w,og-w $@
        @find $@ -type d | xargs -r chmod a+rx,u+w,og-w
 
 $(TMP)/$(PACKAGE)-$(VERSION): .svn
        svn export . $@
        @chmod -R a+r,u+w,og-w $@
        @find $@ -type d | xargs -r chmod a+rx,u+w,og-w
-endif