chiark / gitweb /
Makefile: build and clean prospective *.7.pod
authorSean Whitton <spwhitton@spwhitton.name>
Wed, 19 Oct 2016 00:20:27 +0000 (17:20 -0700)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 20 Oct 2016 19:06:44 +0000 (20:06 +0100)
Build the pod section 7 manpages in "make all"; and install them,

There aren't any yet, so this does nothing.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Makefile

index 6fcc9bd27b93f585ae250423d671e22fdd610959..27347d9124b78b2a1f9e025f81fe6a00266bc370 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -46,9 +46,9 @@ INFRA_PERLMODULES= \
        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)
@@ -80,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,,$@) \
+               $^ $@