chiark / gitweb /
cprogs: Generalise watershed.txt doc generation
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 29 Mar 2016 21:41:43 +0000 (22:41 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 29 Mar 2016 21:41:43 +0000 (22:41 +0100)
cprogs/Makefile

index 496b33e..850193d 100644 (file)
@@ -35,7 +35,8 @@ DAEMONS=              trivsoundd
 MAN1PAGES=             readbuffer.1 writebuffer.1 with-lock-ex.1 \
                        xduplic-copier.1
 MAN8PAGES=             trivsoundd.8 really.8
-BUILTTXTDOCS=          watershed.txt
+SEDDERYDOCS=           watershed.txt
+BUILTTXTDOCS=          $(SEDDERYDOCS)
 TXTDOCS=               $(BUILTTXTDOCS)
 
 acctdump_cc_out:=$(shell \
@@ -79,7 +80,7 @@ watershed:    LDLIBS += -lnettle -lgmp
 cgi-fcgi-interp:       cgi-fcgi-interp.o       myopt.o common.o
 cgi-fcgi-interp:       LDLIBS += -lnettle -lgmp
 
-watershed.txt: watershed.c
+$(SEDDERYDOCS): %.txt: %.c
                sed '/^$$/,$$d' <$^ >$@.new && mv -f $@.new $@
 
 install:               all
@@ -89,7 +90,7 @@ install:              all
                $(INSTALL) -m 4774 -o root -g $(SYSTEM_GROUP) \
                        $(SUIDSBINPROGRAMS) $(sbindir)
 
-install-docs:  watershed.txt
+install-docs:  $(TXTDOCS)
                $(INSTALL_DIRECTORY) $(man1dir) $(man8dir) $(txtdocdir)
                $(INSTALL) -m 644 $(MAN1PAGES) ${man1dir}/.
                $(INSTALL) -m 644 $(MAN8PAGES) ${man8dir}/.