chiark / gitweb /
Makefile: build and clean prospective *.7.pod
[dgit.git] / Makefile
index d3e26b1e1d2b70d7966dea1a195e94c0be4163fa..27347d9124b78b2a1f9e025f81fe6a00266bc370 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -41,11 +41,14 @@ INFRA_PROGRAMS=dgit-repos-server dgit-ssh-dispatch \
        dgit-repos-policy-debian dgit-repos-admin-debian \
        dgit-repos-policy-trusting dgit-mirror-rsync
 INFRA_EXAMPLES=get-dm-txt ssh-wrap drs-cron-wrap get-suites
-INFRA_PERLMODULES=Debian/Dgit/Policy/Debian.pm
+INFRA_PERLMODULES= \
+       Debian/Dgit.pm \
+       Debian/Dgit/Infra.pm \
+       Debian/Dgit/Policy/Debian.pm
 
-all:
+all:   $(MAN7PAGES)
 
-install:       installdirs
+install:       installdirs $(MAN7PAGES)
        $(INSTALL_PROGRAM) $(PROGRAMS) $(DESTDIR)$(bindir)
        $(INSTALL_DATA) $(MAN1PAGES) $(DESTDIR)$(man1dir)
        $(INSTALL_DATA) $(MAN7PAGES) $(DESTDIR)$(man7dir)
@@ -77,3 +80,11 @@ check installcheck:
 
 clean distclean mostlyclean maintainer-clean:
        rm -rf tests/tmp
+       set -e; for m in $(MAN7PAGES); do \
+               test -e $$m.pod && rm -f $$m; \
+       done
+
+%.7: %.7.pod
+       pod2man --section=7 --date="Debian Project" --center="dgit" \
+               --name=$(subst .7,,$@) \
+               $^ $@