-## $Id: Makefile.am,v 1.1 2006-02-02 18:22:47 mike Exp $
-docdir=$(datadir)/doc/@PACKAGE@
+## $Id: Makefile.am,v 1.31 2006-10-12 11:31:11 marc 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 .pdf .tkl .esp .xml
-HTMLFILES = yp2.html
+XMLFILES = book.xml manref.xml copyright.xml
+MAINXML = $(srcdir)/book.xml
+XMLMAN = metaproxy.xml \
+ auth_simple.xml backend_test.xml bounce.xml \
+ frontend_net.xml \
+ http_file.xml log.xml multi.xml query_rewrite.xml \
+ record_transform.xml\
+ sru_z3950.xml\
+ session_shared.xml template.xml virt_db.xml z3950_client.xml
-PNGFILES=
-EPSFILES=
+MANFILES = auth_simple.3mp backend_test.3mp bounce.3mp \
+ frontend_net.3mp \
+ http_file.3mp log.3mp multi.3mp query_rewrite.3mp \
+ record_transform.3mp\
+ sru_z3950.xml\
+ session_shared.3mp template.3mp virt_db.3mp z3950_client.3mp \
+ metaproxy.1
-REFFILES=
+HTMLFILES = index.html
-doc_DATA = $(HTMLFILES) yp2.pdf $(PNGFILES)
+# testing if this does the job of collecting up the unnamed '*.html' files
+#UNLISTEDHTML = $(wildcard *.html)
+
+PNGFILES = multi.png
+
+doc_DATA = $(HTMLFILES) $(PNGFILES)
man_MANS = $(MANFILES)
-EXTRA_DIST = $(XMLFILES) $(SUPPORTFILES) $(REFFILES) \
- $(doc_DATA) $(EPSFILES) $(man_MANS) $(REFFILES)
+EXTRA_DIST = $(XMLFILES) $(XMLMAN) $(doc_DATA) $(man_MANS) multi.svg
+
+$(HTMLFILES): $(XMLFILES) $(PNGFILES)
+ rm -f *.html
+ $(HTML_COMPILE) $(MAINXML)
+
+.xml.3mp:
+ $(MAN_COMPILE) $<
-$(HTMLFILES): $(XMLFILES)
- jade -E14 -D $(srcdir) -d yp2html.dsl -t sgml $(srcdir)/xml.dcl yp2.xml
+.xml.1:
+ $(MAN_COMPILE) $<
-yp2.php: $(XMLFILES)
- jade -E14 -D $(srcdir) -d yp2php.dsl -t sgml $(srcdir)/xml.dcl yp2.xml
+index.tkl: $(XMLFILES)
+ $(TKL_COMPILE) $(MAINXML)
-yp2.pdf: $(XMLFILES)
- for i in $(PNGFILES); do \
- if test ! -f $$i; then ln -s $(srcdir)/$$i .; fi; \
+metaproxy.pdf: $(XMLFILES) multi.pdf
+ for i in $(PNGFILES) common/id.png multi.pdf; do \
+ if test ! -f $$i; then cp $(srcdir)/$$i $$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 book.tex metaproxy.tex
+ pdfjadetex metaproxy.tex >/dev/null
+ pdfjadetex metaproxy.tex >/dev/null
+ pdfjadetex metaproxy.tex >/dev/null
+
+manref.xml: $(XMLMAN) $(srcdir)/common/stripref.xsl
+ rm -f manref.xml
+ for i in $(XMLMAN); do \
+ xsltproc $(srcdir)/common/stripref.xsl $(srcdir)/$$i | sed 1d >> manref.xml; \
+ done
+
+multi.png: multi.svg
+ inkscape --export-png=$@ --export-width=800 --export-area-drawing $?
+
+multi.eps: multi.svg
+ inkscape --export-eps=$@ --export-bbox-page $?
+
+.eps.pdf:
+ epstopdf -hires $?
-index.tkl: $(XMLFILES) tkl.xsl
- xsltproc tkl.xsl yp2.xml
clean-data-hook:
rm -f [0-9]* *.bak
dist-hook:
- for f in $(srcdir)/*.html; do \
- found=0; \
- b=`basename $$f`; \
- for h in $(HTMLFILES); do \
- if test "$$h" = "$$b"; then \
- found=1; \
- fi \
- done; \
- if test "$$found" = "0"; then \
- echo "$$f not found in HTMLFILES"; \
- exit 1; \
- fi \
+ if test -f index.html; then d=.; else d="$(srcdir)"; fi; \
+ for p in $$d/*.html; do \
+ cp $$p $(distdir); \
+ done
+
+install-data-hook:
+ if test -f index.html; then d=.; else d="$(srcdir)"; fi; \
+ for p in $$d/*.html; do \
+ $(docDATA_INSTALL) $$p $(DESTDIR)/$(docdir); \
done
+
+uninstall-hook:
+ rm -r $(DESTDIR)/$(docdir)
+