1include ../Makefile.settings 2DOCS = ctrlproxy.1 ctrlproxyd.8 ctrlproxy-admin.1 ctrlproxy_config.5 user-guide.html user-guide/index.html ctrlproxy.1.html ctrlproxyd.8.html ctrlproxy-admin.1.html ctrlproxy_config.5.html help.txt 3 4.PHONY: all manpages clean distclean 5 6all: $(DOCS) 7 8dist: all 9 10manpages: ctrlproxy.1 ctrlproxyd.8 ctrlproxy_config.5 ctrlproxy-admin.1 11 12%.tmp.xml: %.xml 13 $(XSLTPROC) --xinclude docbook.xsl $< > $@ 14 15%/index.html: %.tmp.xml 16 $(XSLTPROC) --stringparam base.dir "$(@D)/" http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $< 17 18%.html: %.tmp.xml 19 $(XSLTPROC) --xinclude http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > $@ 20 21%: %.tmp.xml 22 $(XSLTPROC) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< > $@ 23 24help.xml: admin.xml clients.xml 25 26help.txt: help.xml help.xsl 27 $(XSLTPROC) --stringparam extraparanewline "$(EXTRAPARANEWLINE)" --xinclude help.xsl $< | perl -0077 -pe 's/\n\n%/\n%/s; s/_b_/\002/g;' > $@ 28 29clean:: 30 @echo Removing documentation files 31 @rm -f *.html *.1 *.5 help.txt 32 @rm -rf user-guide 33 @rm -f *.tmp.xml 34 35distclean:: clean 36 37install: all 38 $(INSTALL) -d $(DESTDIR)$(mandir)/man1 39 $(INSTALL) -d $(DESTDIR)$(mandir)/man5 40 $(INSTALL) -d $(DESTDIR)$(mandir)/man8 41 $(INSTALL) -d $(DESTDIR)$(docdir) 42 $(INSTALL) -m 0644 ctrlproxy.1 $(DESTDIR)$(mandir)/man1 43 $(INSTALL) -m 0644 ctrlproxyd.8 $(DESTDIR)$(mandir)/man8 44 $(INSTALL) -m 0644 ctrlproxy-admin.1 $(DESTDIR)$(mandir)/man1 45 $(INSTALL) -d $(DESTDIR)$(cdatadir) 46 $(INSTALL) -m 0644 help.txt $(DESTDIR)$(HELPFILE) 47 $(INSTALL) -m 0644 ctrlproxy_config.5 $(DESTDIR)$(mandir)/man5 48 $(INSTALL) -m 0644 user-guide.html $(DESTDIR)$(docdir) 49 50uninstall: 51 rm -f $(DESTDIR)$(mandir)/man1/ctrlproxy.1 52 rm -f $(DESTDIR)$(mandir)/man8/ctrlproxy.8 53 rm -f $(DESTDIR)$(mandir)/man1/ctrlproxy-admin.1 54 rm -f $(DESTDIR)$(HELPFILE) 55 rm -f $(DESTDIR)$(mandir)/man5/ctrlproxy_config.5 56 rm -f $(DESTDIR)$(docdir)/user-guide.html 57 -rmdir $(DESTDIR)$(mandir)/man1 58 -rmdir $(DESTDIR)$(mandir)/man5 59 -rmdir $(DESTDIR)$(docdir) 60