* Include limits.h in killall.c to enforce definition of PATH_MAX
[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 }')
7ifeq (,$(findstring dsf,$(VERSION)))
8 override VERSION := $(VERSION)dsf
9endif
10override TMP:=$(shell mktemp -d $(VERSION).XXXXXXXX)
11override TARBALL:=$(TMP)/$(PACKAGE)-$(VERSION).tar.bz2
12override SFTPBATCH:=$(TMP)/$(VERSION)-sftpbatch
13
14upload: $(SFTPBATCH)
15 @sftp -b $< $(SVLOGIN)@dl.sv.nongnu.org:/releases/$(PACKAGE)
16 rm -rf $(TMP)
17
18$(SFTPBATCH): $(TARBALL).sig
19 @echo progress > $@
20 @echo put $(TARBALL) >> $@
21 @echo chmod 644 $(TARBALL) >> $@
22 @echo put $(TARBALL).sig >> $@
23 @echo chmod 644 $(TARBALL).sig >> $@
24 @echo rm $(PACKAGE)-latest.tar.bz2 >> $@
25 @echo symlink $(TARBALL) $(PACKAGE)-latest.tar.bz2 >> $@
26 @echo quit >> $@
27
28$(TARBALL).sig: $(TARBALL)
29 @gpg -q -ba --use-agent -o $@ $<
30
31$(TARBALL): $(TMP)/$(PACKAGE)-$(VERSION)
32 @tar --bzip2 --owner=nobody --group=nobody -cf $@ -C $(TMP) $(PACKAGE)-$(VERSION)
33
34$(TMP)/$(PACKAGE)-$(VERSION): .svn
35 svn export . $@
36 @chmod -R a+r,u+w,og-w $@
37 @find $@ -type d | xargs -r chmod a+rx,u+w,og-w