summaryrefslogtreecommitdiff
path: root/specs/Makefile.am
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2010-06-26 14:29:04 -0400
committerGaetan Nadon <memsize@videotron.ca>2010-06-26 16:19:23 -0400
commit7a945c21ebe87cd0b3e91159f83059f55ed40006 (patch)
tree7cc21bef94c81b1a2aa6f636b18bd07fda55e500 /specs/Makefile.am
parent0860348104536fc3a6e7daa44079b7a58cbfe4e5 (diff)
downloadxorg-lib-libXext-7a945c21ebe87cd0b3e91159f83059f55ed40006.tar.gz
doc: replace groff input format with docbook xml format
Initial version of docbook xml. dbelib abd synclib are missing and will be added later. Requires util-macros 1.10 Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'specs/Makefile.am')
-rw-r--r--specs/Makefile.am76
1 files changed, 28 insertions, 48 deletions
diff --git a/specs/Makefile.am b/specs/Makefile.am
index 7d39c2a..26cec9a 100644
--- a/specs/Makefile.am
+++ b/specs/Makefile.am
@@ -21,64 +21,44 @@
# DEALINGS IN THE SOFTWARE.
#
-EXTRA_DIST = \
- macros.t \
- dbelib.tex \
- DPMSLib.ms \
- shapelib.ms \
- synclib.tex
-
if ENABLE_SPECS
-if HAVE_GROFF_MS
-doc_DATA = DPMSLib.txt DPMSLib.ps DPMSLib.html shapelib.txt shapelib.ps shapelib.html
-imagesdir = $(docdir)/images
+doc_sources = dpmslib.xml shapelib.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