Make 'make distcheck' work
[metaproxy-moved-to-github.git] / doc / Makefile.am
index 82bb4e9..d3dfa31 100644 (file)
@@ -1,47 +1,81 @@
-## $Id: Makefile.am,v 1.1 2006-02-02 18:22:47 mike Exp $
+## $Id: Makefile.am,v 1.9 2006-04-22 13:29:37 adam Exp $
 docdir=$(datadir)/doc/@PACKAGE@
 
-SUPPORTFILES = \
- yp2html.dsl \
- yp2php.dsl \
- yp2print.dsl \
- tkl.xsl \
- xml.dcl
+SUBDIRS = common
 
-XMLFILES = yp2.xml.in
+SUFFIXES=.3mp .1
 
-HTMLFILES = yp2.html 
+XMLFILES = main.xml.in book.xml manref.xml progref.xml copyright.xml \
+       metaproxy.xml
 
+MAINXML = main.xml
 
+XMLMAN   = auth_simple.xml backend_test.xml frontend_net.xml \
+       http_file.xml log.xml multi.xml query_rewrite.xml \
+       session_shared.xml template.xml virt_db.xml z3950_client.xml
+MANFILES = auth_simple.3mp backend_test.3mp frontend_net.3mp \
+       http_file.3mp log.3mp multi.3mp query_rewrite.3mp \
+       session_shared.3mp template.3mp virt_db.3mp z3950_client.3mp \
+       metaproxy.1
+
+HTMLFILES = architecture.html \
+       classes.html \
+       configuration.html \
+       example.configuration.html \
+       extensions.html \
+       filterref.html \
+       filters.html \
+       future.directions.html \
+       individual.classes.html \
+       introduction.html \
+       licence.html \
+       metaproxy.html \
+       multidb.html \
+       other.source.files.html \
+       overview.filter.types.html \
+       overview.xml.structure.html \
+       refguide.html
 
 PNGFILES=
 EPSFILES=
 
-REFFILES= 
-
-doc_DATA = $(HTMLFILES) yp2.pdf $(PNGFILES)
+doc_DATA = $(HTMLFILES) metaproxy.pdf $(PNGFILES)
 man_MANS = $(MANFILES)
 
-EXTRA_DIST = $(XMLFILES) $(SUPPORTFILES) $(REFFILES) \
-       $(doc_DATA) $(EPSFILES) $(man_MANS) $(REFFILES)
+EXTRA_DIST = $(XMLFILES) $(XMLMAN) $(doc_DATA) $(EPSFILES) $(man_MANS)
 
 $(HTMLFILES): $(XMLFILES)
-       jade -E14 -D $(srcdir) -d yp2html.dsl -t sgml $(srcdir)/xml.dcl yp2.xml
+       jade -E14 -D $(srcdir) -d common/html.dsl -t sgml $(srcdir)/common/xml.dcl $(MAINXML)
+
+.xml.3mp:
+       docbook2man $<
 
-yp2.php: $(XMLFILES)
-       jade -E14 -D $(srcdir) -d yp2php.dsl -t sgml $(srcdir)/xml.dcl yp2.xml
+.xml.1:
+       docbook2man $<
 
-yp2.pdf: $(XMLFILES)
-       for i in $(PNGFILES); do \
+metaproxy.pdf: $(XMLFILES)
+       for i in $(PNGFILES) $(EPSFILES); do \
                if test ! -f $$i; then ln -s $(srcdir)/$$i .; fi; \
        done
-       jade -E14 -D $(srcdir) -d yp2print.dsl -t tex $(srcdir)/xml.dcl yp2.xml
-       pdfjadetex yp2.tex >/dev/null
-       pdfjadetex yp2.tex >/dev/null
-       pdfjadetex yp2.tex >/dev/null
+       jade -E14 -D $(srcdir) -d common/print.dsl -t tex $(srcdir)/common/xml.dcl $(MAINXML)
+       rm -f metaproxy.tex
+       mv main.tex metaproxy.tex
+       pdfjadetex metaproxy.tex >/dev/null
+       pdfjadetex metaproxy.tex >/dev/null
+       pdfjadetex metaproxy.tex >/dev/null
+
+index.tkl: $(XMLFILES) common/tkl.xsl
+       xsltproc common/tkl.xsl $(MAINXML)
+
+manref.xml: $(XMLMAN) $(srcdir)/common/ref2dbinc.xsl
+       rm -f manref.xml
+       for i in $(XMLMAN); do \
+               xsltproc $(srcdir)/common/ref2dbinc.xsl $$i | sed 1d >> manref.xml; \
+       done
 
-index.tkl: $(XMLFILES) tkl.xsl
-       xsltproc tkl.xsl yp2.xml
+progref.xml: metaproxy.xml
+       rm -f $@
+       xsltproc $(srcdir)/common/ref2dbinc.xsl $? | sed 1d >> $@
 
 clean-data-hook:
        rm -f [0-9]* *.bak