X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/agedu/blobdiff_plain/1d3a7ff684c36162124901504e62a4c6d48ead2f..ee2c6904c083d5bc5cfbbf6fa377604c9c42b8f5:/Makefile.am diff --git a/Makefile.am b/Makefile.am index 6c549a8..6b9da2b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,3 +3,18 @@ agedu_SOURCES = agedu.c du.c alloc.c trie.c index.c html.c httpd.c \ fgetline.c licence.c agedu_LDADD = $(LIBOBJS) man1_MANS = agedu.1 + +# If Halibut is available to rebuild the man pages from their .but +# source, then man pages are treated as derived files in the obvious +# way, and deleted by 'make clean'. If Halibut is not available (the +# typical case if someone has downloaded the source archive and rerun +# mkauto.sh), the man pages are treated as source files by this +# makefile. +if HAVE_HALIBUT +BUILT_MANS = $(man1_MANS) +CLEANFILES = $(BUILT_MANS) +.SUFFIXES = .but .1 +.but.1: + halibut --man=$@ $< +doc: $(BUILT_MANS) +endif