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