SVN devscripts commit: r529 - in trunk: . debian scripts
Stefano Zacchiroli
zack at alioth.debian.org
Sat Feb 24 12:18:09 CET 2007
Author: zack
Date: 2007-02-24 12:18:09 +0100 (Sat, 24 Feb 2007)
New Revision: 529
Modified:
trunk/README.newscripts
trunk/debian/changelog
trunk/scripts/Makefile
Log:
automatically guess script names in scripts/Makefile, simplified a step in script addition and reduced Makefile clutter
Modified: trunk/README.newscripts
===================================================================
--- trunk/README.newscripts 2007-02-23 14:35:06 UTC (rev 528)
+++ trunk/README.newscripts 2007-02-24 11:18:09 UTC (rev 529)
@@ -1,12 +1,13 @@
List of things to do when adding a new script to devscripts package:
-1. Add the script!
+1. Add the script under scripts/
+ - the script should have .sh or .pl extension, otherwise have a look at
+ scripts/Makefile and patch it
2. Add an entry in README
3. Add an entry in debian/control
4. Add any necessary entries to the Suggests: line in debian/control
-5. Add a scripts/Makefile entry (SH_FILES or PL_FILES)
-6. Modify conf.default.in and debian/postinst if necessary
-7. Add a changelog entry
+5. Modify conf.default.in and debian/postinst if necessary
+6. Add a changelog entry
Julian, 2 June 2005
last modified: $Id$
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2007-02-23 14:35:06 UTC (rev 528)
+++ trunk/debian/changelog 2007-02-24 11:18:09 UTC (rev 529)
@@ -32,8 +32,9 @@
* debian/manpages: delegated installation of (original and translated)
manpages to debhelpers
* moved scripts under scripts/, created subordinated Makefile there
+ * scripts/Makefile: removed the need of explicitly listing scripts
- -- Stefano Zacchiroli <zack at debian.org> Fri, 23 Feb 2007 11:21:15 +0100
+ -- Stefano Zacchiroli <zack at debian.org> Sat, 24 Feb 2007 12:13:56 +0100
devscripts (2.9.27) unstable; urgency=low
Modified: trunk/scripts/Makefile
===================================================================
--- trunk/scripts/Makefile 2007-02-23 14:35:06 UTC (rev 528)
+++ trunk/scripts/Makefile 2007-02-24 11:18:09 UTC (rev 529)
@@ -1,25 +1,16 @@
include ../Makefile.common
-
DESTDIR =
-PL_FILES = bts.pl checkbashisms.pl cvs-debuild.pl dd-list.pl debchange.pl \
- debcommit.pl debdiff.pl debi.pl debpkg.pl debuild.pl dget.pl \
- dpkg-depcheck.pl dscverify.pl grep-excuses.pl mass-bug.pl \
- plotchangelog.pl rc-alert.pl rmadison.pl svnpath.pl
+VERSION_FILE = ../version
+VERSION := $(shell cat $(VERSION_FILE))
-SH_FILES = annotate-output.sh archpath.sh cvs-debi.sh cvs-debrelease.sh \
- deb-reversion.sh debclean.sh debrelease.sh debrsign.sh debsign.sh \
- dpkg-genbuilddeps.sh mergechanges.sh nmudiff.sh pts-subscribe.sh \
- tagpending.sh uscan.sh uupdate.sh whodepends.sh who-uploads.sh \
- wnpp-alert.sh
-
+PL_FILES := $(wildcard *.pl)
+SH_FILES = $(wildcard *.sh)
LIBS = libvfork.so.0
-
CWRAPPERS = debpkg-wrapper
+SCRIPTS = $(patsubst %.pl,%,$(PL_FILES)) $(patsubst %.sh,%,$(SH_FILES))
-SCRIPTS = $(PL_FILES:.pl=) $(SH_FILES:.sh=)
-
GEN_MAN1S = bts.1 debcommit.1 deb-reversion.1 dget.1 mass-bug.1 \
rmadison.1 svnpath.1
@@ -29,37 +20,30 @@
all: $(SCRIPTS) $(GEN_MAN1S) $(LIBS) $(CWRAPPERS)
-%: %.sh ../version
- if grep -q '^#! */bin/sh' $<; then \
- echo "$< is a /bin/sh script, not a bash script!" >&2; \
- exit 1; \
- fi
- rm -f $@ $@.tmp
- VERSION=`cat ../version` && sed -e "s/###VERSION###/$$VERSION/" $< \
- > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
+%.tmp: %.sh $(VERSION_FILE)
+ sed -e "s/###VERSION###/$(VERSION)/" $< > $@
bash -n $@
-
-%: %.pl ../version
- rm -f $@ $@.tmp
- VERSION=`cat ../version` && sed -e "s/###VERSION###/$$VERSION/" $< \
- > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
+%.tmp: %.pl $(VERSION_FILE)
+ sed -e "s/###VERSION###/$(VERSION)/" $< > $@
perl -c $@
+%: %.tmp
+ cp $< $@
+ chmod +x $@
%.1: %.pl
pod2man --center=" " --release="Debian Utilities" $< > $@
-
%.1: %.dbk
xsltproc --nonet -o $@ \
/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl $<
libvfork.o: libvfork.c
$(CC) -fPIC -D_REENTRANT $(CFLAGS) -c $<
-
libvfork.so.0: libvfork.o
$(CC) -shared $< -lc -Wl,-soname -Wl,libvfork.so.0 -o $@
clean:
- rm -f $(SCRIPTS) $(GEN_MAN1S) $(SCRIPT_LIBS) $(CWRAPPERS) \
+ rm -f $(SCRIPTS) $(patsubst %,%.tmp,$(SCRIPTS)) \
+ $(GEN_MAN1S) $(SCRIPT_LIBS) $(CWRAPPERS) \
libvfork.o libvfork.so.0
install: all
More information about the Devscripts-devel
mailing list