diff options
Diffstat (limited to 'specs/Makefile.am')
-rw-r--r-- | specs/Makefile.am | 71 |
1 files changed, 28 insertions, 43 deletions
diff --git a/specs/Makefile.am b/specs/Makefile.am index 74669fd..8ba5590 100644 --- a/specs/Makefile.am +++ b/specs/Makefile.am @@ -21,59 +21,44 @@ # DEALINGS IN THE SOFTWARE. # -EXTRA_DIST = macros.t recordlib.ms xtestlib.ms - if ENABLE_SPECS -if HAVE_GROFF_MS -doc_DATA = recordlib.txt recordlib.ps recordlib.html xtestlib.txt xtestlib.ps xtestlib.html -imagesdir = $(docdir)/images +doc_sources = xtestlib.xml +dist_doc_DATA = $(doc_sources) -CLEANFILES = $(doc_DATA) -MOSTLYCLEANFILES = index.* +if HAVE_XMLTO +doc_DATA = $(doc_sources:.xml=.html) -install-data-local: - test -z "$(imagesdir)" || $(mkdir_p) "$(DESTDIR)$(imagesdir)" - @d="$(srcdir)/images/"; \ - list=`ls $$d`; \ - for p in $$list; do \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(imagesdir)/$$p'"; \ - $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(imagesdir)/$$p"; \ - done; +if HAVE_FOP +doc_DATA += $(doc_sources:.xml=.ps) $(doc_sources:.xml=.pdf) +endif -uninstall-local: - @if test -n $(DESTDIR)$(imagesdir); then \ - if test -d $(DESTDIR)$(imagesdir); then \ - list=`ls $(DESTDIR)$(imagesdir)`; \ - for p in $$list; do \ - echo " rm -f '$(DESTDIR)$(imagesdir)/$$p'"; \ - rm -f "$(DESTDIR)$(imagesdir)/$$p"; \ - done \ - fi; \ - fi; +if HAVE_XMLTO_TEXT +doc_DATA += $(doc_sources:.xml=.txt) +endif -mostlyclean-local: - @rm -fr images +if HAVE_STYLESHEETS +XMLTO_FLAGS = -m $(XSL_STYLESHEET) -# Pass version string as a troff string for substitution -GROFF_DEFS = -dxV="$(PACKAGE_STRING)" +doc_DATA += xorg.css +xorg.css: $(STYLESHEET_SRCDIR)/xorg.css + $(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@ +endif -# -t to run through tbl -GROFF_FLAGS = -t -ms $(GROFF_DEFS) $(srcdir)/macros.t +CLEANFILES = $(doc_DATA) -SUFFIXES = .ms .ps .txt .html +SUFFIXES = .xml .ps .pdf .txt .html -.ms.ps: - -$(AM_V_GEN) $(GROFF) -Tps $(GROFF_FLAGS) $< 2> index.$@.raw > $@ - @if grep '^[^1-9.]' index.$@.raw | grep -v warning; then exit 1; \ - else test $$? -le 1; fi +.xml.txt: + $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $< -.ms.txt: - $(AM_V_GEN) env GROFF_NO_SGR=TRUE $(GROFF) -Tutf8 $(GROFF_FLAGS) \ - $< 2> index.$@.raw > $@ +.xml.html: + $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $< -.ms.html: - $(AM_V_GEN) $(GROFF) -Thtml -P-Dimages -P-I$*-image $(GROFF_FLAGS) $< 2> index.$@.raw > $@ +.xml.pdf: + $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $< -endif HAVE_GROFF_MS -endif ENABLE_SPECS +.xml.ps: + $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop ps $< +endif HAVE_XMLTO +endif ENABLE_SPECS |