Include -Wunreachable-code when building.
[sysvinit.git] / Makefile
CommitLineData
545897fa
PR
1all install clean distclean:
2 $(MAKE) -C src $@
60934bc1
DWF
3
4PACKAGE=sysvinit
5VERSION=$(shell sed -rn '1s/.*[[:blank:]]\((.*)\)[[:blank:]].*/\1/p' doc/Changelog)
6SVLOGIN=$(shell svn info | sed -rn '/Repository Root:/{ s|.*//(.*)\@.*|\1|p }')
60934bc1
DWF
7override TMP:=$(shell mktemp -d $(VERSION).XXXXXXXX)
8override TARBALL:=$(TMP)/$(PACKAGE)-$(VERSION).tar.bz2
9override SFTPBATCH:=$(TMP)/$(VERSION)-sftpbatch
10
d2ee08ea
PR
11dist: $(TARBALL)
12 @cp $(TARBALL) .
13 @echo "tarball $(PACKAGE)-$(VERSION).tar.bz2 ready"
14 rm -rf $(TMP)
15
60934bc1 16upload: $(SFTPBATCH)
d2ee08ea 17 echo @sftp -b $< $(SVLOGIN)@dl.sv.nongnu.org:/releases/$(PACKAGE)
60934bc1
DWF
18 rm -rf $(TMP)
19
20$(SFTPBATCH): $(TARBALL).sig
21 @echo progress > $@
22 @echo put $(TARBALL) >> $@
bcb21579 23 @echo chmod 664 $(notdir $(TARBALL)) >> $@
60934bc1 24 @echo put $(TARBALL).sig >> $@
bcb21579 25 @echo chmod 664 $(notdir $(TARBALL)).sig >> $@
60934bc1 26 @echo rm $(PACKAGE)-latest.tar.bz2 >> $@
bcb21579 27 @echo symlink $(notdir $(TARBALL)) $(PACKAGE)-latest.tar.bz2 >> $@
60934bc1
DWF
28 @echo quit >> $@
29
30$(TARBALL).sig: $(TARBALL)
31 @gpg -q -ba --use-agent -o $@ $<
32
33$(TARBALL): $(TMP)/$(PACKAGE)-$(VERSION)
d2ee08ea 34 @tar --bzip2 --owner=nobody --group=nogroup -cf $@ -C $(TMP) $(PACKAGE)-$(VERSION)
60934bc1
DWF
35
36$(TMP)/$(PACKAGE)-$(VERSION): .svn
37 svn export . $@
38 @chmod -R a+r,u+w,og-w $@
39 @find $@ -type d | xargs -r chmod a+rx,u+w,og-w