}'
# Figure out the `current debhelper version.
-VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Version: \(.*\)')
+VERSION=$(shell expr "`dpkg-parsechangelog |grep Version:`" : '.*Version: \(.*\)')
PERLLIBDIR=$(shell perl -MConfig -e 'print $$Config{vendorlib}')
POD2MAN=pod2man -c Debhelper -r "$(VERSION)"
-build: test build-stamp
+# l10n to be built is determined from .po files
+LANGS=$(notdir $(basename $(wildcard man/po4a/po/*.po)))
+
+version:
+ printf "package Debian::Debhelper::Dh_Version;\n\$$version='$(VERSION)';\n1" > \
+ Debian/Debhelper/Dh_Version.pm
+
+build: version test build-stamp
build-stamp:
find . -maxdepth 1 -type f -perm +100 -name "dh_*" \
-exec $(POD2MAN) {} {}.1 \;
cat debhelper.pod | \
$(MAKEMANLIST) `find . -maxdepth 1 -type f -perm +100 -name "dh_*" | sort` | \
- $(POD2MAN) --section=7 > debhelper.7
- po4a po/po4a.cfg
+ $(POD2MAN) --name="debhelper" --section=7 > debhelper.7
+ po4a man/po4a/po4a.cfg
set -e; \
- for dir in man/*; do \
- lang=`basename $$dir`; \
+ for lang in $(LANGS); do \
+ dir=man/$$lang; \
for file in $$dir/dh_*.pod; do \
prog=`basename $$file | sed 's/.pod//'`; \
$(POD2MAN) $$file $$prog.$$lang.1; \
$(POD2MAN) --section=7 > debhelper.$$lang.7; \
done
- printf "package Debian::Debhelper::Dh_Version;\n\$$version='$(VERSION)';" > \
- Debian/Debhelper/Dh_Version.pm
touch build-stamp
clean:
./run dh_testdir
./run dh_testroot
./run dh_clean *.1 *.7 *-stamp Debian/Debhelper/Dh_Version.pm
- rm -rf man
+ po4a --rm-translations --rm-backups man/po4a/po4a.cfg
+ for lang in $(LANGS); do \
+ if [ -e man/$$lang ]; then rmdir man/$$lang; fi; \
+ done;
-test: test-stamp
+test: version test-stamp
test-stamp:
./run dh_clean
./run perl -MTest::Harness -e 'runtests grep { ! /CVS/ && ! /\.svn/ } @ARGV' t/*
./run dh_installexamples examples/*
./run dh_installman *.1 *.7
./run dh_installchangelogs
- ./run dh_shlibdeps
./run dh_link
./run dh_compress
./run dh_fixperms
./run dh_md5sums
./run dh_builddeb
-# Update the debhelper web page. Not intended for use by anyone except the
-# author.
-DIR=/home/web/kitenet.net/programs/debhelper
-installhook:
- cp debian/changelog $(DIR)/CHANGES
- echo -n $(VERSION) > $(DIR)/LATEST-VERSION-IS
+# Not intended for use by anyone except the author.
+announcedir:
+ @echo ${HOME}/src/joeywiki/code/debhelper/news
binary-arch:
binary: binary-indep binary-arch