Module: xenomai-2.6
Branch: master
Commit: 9f381657037e9b3585405063f06532a1ddd39040
URL:    
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=9f381657037e9b3585405063f06532a1ddd39040

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Tue Dec 18 09:02:24 2012 +0100

doc: start moving manual pages to asciidoc

---

 configure                                 |    3 +-
 configure.in                              |    1 -
 doc/Makefile.am                           |    2 +
 doc/Makefile.in                           |    1 +
 doc/asciidoc.rules                        |   36 +++++
 doc/asciidoc/Makefile.am                  |   34 +-----
 doc/asciidoc/Makefile.in                  |   63 +++++----
 doc/man/Makefile.am                       |   27 ++++
 doc/man/Makefile.in                       |  205 ++++++++++++++++++++++++-----
 doc/man/clocktest.adoc                    |   43 ++++++
 doc/man/clocktest.man.in                  |   36 -----
 doc/{asciidoc => }/plaintext.conf         |    0
 doc/{asciidoc => }/plaintext.xsl          |    0
 doc/{asciidoc => }/plaintext_postproc.awk |    0
 14 files changed, 320 insertions(+), 131 deletions(-)

diff --git a/configure b/configure
index 60f94f0..15ec9e7 100755
--- a/configure
+++ b/configure
@@ -13881,7 +13881,7 @@ if test x"$LD_FILE_OPTION" = x"yes" ; then
 fi
 
 if test \! x$XENO_MAYBE_DOCDIR = x ; then
-      ac_config_files="$ac_config_files doc/Makefile doc/txt/Makefile 
doc/man/Makefile doc/man/clocktest.man doc/man/cyclictest.man 
doc/man/irqbench.man doc/man/irqloop.man doc/man/klatency.man 
doc/man/latency.man doc/man/rtcanconfig.man doc/man/rtcanrecv.man 
doc/man/rtcansend.man doc/man/switchbench.man doc/man/switchtest.man 
doc/man/xeno.man doc/man/xeno-config.man doc/doxygen/Makefile 
doc/doxygen/Doxyfile-common doc/doxygen/Doxyfile doc/doxygen/Doxyfile-native 
doc/doxygen/Doxyfile-nucleus doc/doxygen/Doxyfile-posix 
doc/doxygen/Doxyfile-rtdm doc/asciidoc/Makefile doc/docbook/Makefile 
doc/docbook/catalog doc/docbook/custom-stylesheets/Makefile 
doc/docbook/custom-stylesheets/xsl/Makefile 
doc/docbook/custom-stylesheets/xsl/common/Makefile 
doc/docbook/custom-stylesheets/xsl/fo/Makefile 
doc/docbook/custom-stylesheets/xsl/html/Makefile 
doc/docbook/custom-stylesheets/xsl/html/chunk.xsl 
doc/docbook/custom-stylesheets/xsl/html/onechunk.xsl 
doc/docbook/xenomai/Makefile"
+      ac_config_files="$ac_config_files doc/Makefile doc/txt/Makefile 
doc/man/Makefile doc/man/cyclictest.man doc/man/irqbench.man 
doc/man/irqloop.man doc/man/klatency.man doc/man/latency.man 
doc/man/rtcanconfig.man doc/man/rtcanrecv.man doc/man/rtcansend.man 
doc/man/switchbench.man doc/man/switchtest.man doc/man/xeno.man 
doc/man/xeno-config.man doc/doxygen/Makefile doc/doxygen/Doxyfile-common 
doc/doxygen/Doxyfile doc/doxygen/Doxyfile-native doc/doxygen/Doxyfile-nucleus 
doc/doxygen/Doxyfile-posix doc/doxygen/Doxyfile-rtdm doc/asciidoc/Makefile 
doc/docbook/Makefile doc/docbook/catalog 
doc/docbook/custom-stylesheets/Makefile 
doc/docbook/custom-stylesheets/xsl/Makefile 
doc/docbook/custom-stylesheets/xsl/common/Makefile 
doc/docbook/custom-stylesheets/xsl/fo/Makefile 
doc/docbook/custom-stylesheets/xsl/html/Makefile 
doc/docbook/custom-stylesheets/xsl/html/chunk.xsl 
doc/docbook/custom-stylesheets/xsl/html/onechunk.xsl 
doc/docbook/xenomai/Makefile"
 
 fi
 
@@ -15012,7 +15012,6 @@ do
     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
     "doc/txt/Makefile") CONFIG_FILES="$CONFIG_FILES doc/txt/Makefile" ;;
     "doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile" ;;
-    "doc/man/clocktest.man") CONFIG_FILES="$CONFIG_FILES 
doc/man/clocktest.man" ;;
     "doc/man/cyclictest.man") CONFIG_FILES="$CONFIG_FILES 
doc/man/cyclictest.man" ;;
     "doc/man/irqbench.man") CONFIG_FILES="$CONFIG_FILES doc/man/irqbench.man" 
;;
     "doc/man/irqloop.man") CONFIG_FILES="$CONFIG_FILES doc/man/irqloop.man" ;;
diff --git a/configure.in b/configure.in
index 7522b51..edb47df 100644
--- a/configure.in
+++ b/configure.in
@@ -785,7 +785,6 @@ if test \! x$XENO_MAYBE_DOCDIR = x ; then
        doc/Makefile \
        doc/txt/Makefile \
        doc/man/Makefile \
-       doc/man/clocktest.man \
        doc/man/cyclictest.man \
        doc/man/irqbench.man \
        doc/man/irqloop.man \
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 75a29f7..1db541d 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,5 +1,7 @@
 SUBDIRS=asciidoc docbook doxygen man txt
 
+EXTRA_DIST = plaintext.conf plaintext_postproc.awk plaintext.xsl
+
 GENERATE_DOC=$(top_srcdir)/scripts/maint/generate-doc
 
 generate-doc:
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 7ef2e99..fe22a9f 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -279,6 +279,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 SUBDIRS = asciidoc docbook doxygen man txt
+EXTRA_DIST = plaintext.conf plaintext_postproc.awk plaintext.xsl
 GENERATE_DOC = $(top_srcdir)/scripts/maint/generate-doc
 all: all-recursive
 
diff --git a/doc/asciidoc.rules b/doc/asciidoc.rules
new file mode 100644
index 0000000..dcba8cb
--- /dev/null
+++ b/doc/asciidoc.rules
@@ -0,0 +1,36 @@
+ASCIIDOC_HTML_OPTS=-a icons -a iconsdir=../asciidoc-icons \
+       -a linkcss -a stylesdir=../asciidoc-css -a scriptsdir=../asciidoc-js \
+       -a toc -a toclevels=3 -a max-width=55em -a xenover=$(PACKAGE_VERSION)
+
+ASCIIDOC_PDF_OPTS=-a icons -a toc -a toclevels=3 -a xenover=$(PACKAGE_VERSION)
+
+ASCIIDOC_MAN_OPTS=-a xenover=$(PACKAGE_VERSION)
+
+ASCIIDOC_TXT_OPTS=-a xenover=$(PACKAGE_VERSION) -a encoding=ascii
+
+tmpdir=adoc_plaintext
+
+%: %.adoc Makefile
+       @$(mkdir_p) $@
+       $(ASCIIDOC) -n -b xhtml11 $(ASCIIDOC_HTML_OPTS) -o $@/index.html $<
+
+%.man: %.adoc Makefile
+       $(A2X) -f manpage -D . $(ASCIIDOC_MAN_OPTS) $<       
+
+%.pdf: %.adoc Makefile
+       $(A2X) -f pdf -D . $(ASCIIDOC_PDF_OPTS) $<
+
+$(tmpdir)/%.txt: %.adoc Makefile $(top_srcdir)/doc/plaintext.conf 
$(top_srcdir)/doc/plaintext.xsl
+       @$(mkdir_p) $(tmpdir)
+       $(ASCIIDOC) --backend docbook -f $(top_srcdir)/doc/plaintext.conf \
+               --doctype article $(ASCIIDOC_TXT_OPTS) \
+               --out-file $(tmpdir)/$*.xml $<
+       xsltproc --stringparam toc.section.depth 3 --nonet \
+               --output $(tmpdir)/$*.html $(top_srcdir)/doc/plaintext.xsl \
+               $(tmpdir)/$*.xml
+       w3m -cols 80 -dump -T text/html -no-graph $(tmpdir)/$*.html > $@
+
+%.txt: $(tmpdir)/%.txt Makefile $(top_srcdir)/doc/plaintext_postproc.awk
+       awk -f $(top_srcdir)/doc/plaintext_postproc.awk $(tmpdir)/$*.txt > $@
+
+include $(top_srcdir)/doc/install-dist.rules
diff --git a/doc/asciidoc/Makefile.am b/doc/asciidoc/Makefile.am
index 5369d59..9f8c6e6 100644
--- a/doc/asciidoc/Makefile.am
+++ b/doc/asciidoc/Makefile.am
@@ -1,7 +1,7 @@
 HTML_DOCS=README.INSTALL TROUBLESHOOTING \
        asciidoc-icons asciidoc-icons/callouts asciidoc-css asciidoc-js
 PDF_DOCS=README.INSTALL.pdf TROUBLESHOOTING.pdf
-EXTRA_DIST=README.INSTALL.adoc TROUBLESHOOTING.adoc plaintext.conf 
plaintext_postproc.awk plaintext.xsl
+EXTRA_DIST=README.INSTALL.adoc TROUBLESHOOTING.adoc
 
 if !CONFIG_XENO_ASCIIDOC
 HTML_DOCSDIR = $(srcdir)/../generated/html/
@@ -12,38 +12,8 @@ PDF_DOCSDIR = ./
 
 TXT_DOCS=README.INSTALL.txt TROUBLESHOOTING.txt
 
-ASCIIDOC_HTML_OPTS=-a icons -a iconsdir=../asciidoc-icons \
-       -a linkcss -a stylesdir=../asciidoc-css -a scriptsdir=../asciidoc-js \
-       -a toc -a toclevels=3 -a max-width=55em -a xenover=$(PACKAGE_VERSION)
-
-ASCIIDOC_PDF_OPTS=-a icons -a toc -a toclevels=3 -a xenover=$(PACKAGE_VERSION)
-
-ASCIIDOC_TXT_OPTS=-a xenover=$(PACKAGE_VERSION) -a encoding=ascii
-
-tmpdir=adoc_plaintext
-
 all-local: $(HTML_DOCS) $(PDF_DOCS) $(TXT_DOCS)
 
-%: %.adoc Makefile
-       @$(mkdir_p) $@
-       $(ASCIIDOC) -n -b xhtml11 $(ASCIIDOC_HTML_OPTS) -o $@/index.html $<
-
-%.pdf: %.adoc Makefile
-       $(A2X) -f pdf -D . $(ASCIIDOC_PDF_OPTS) $<
-
-$(tmpdir)/%.txt: %.adoc Makefile plaintext.conf plaintext.xsl
-       @$(mkdir_p) $(tmpdir)
-       $(ASCIIDOC) --backend docbook -f $(srcdir)/plaintext.conf \
-               --doctype article $(ASCIIDOC_TXT_OPTS) \
-               --out-file $(tmpdir)/$*.xml $<
-       xsltproc --stringparam toc.section.depth 3 --nonet \
-               --output $(tmpdir)/$*.html $(srcdir)/plaintext.xsl \
-               $(tmpdir)/$*.xml
-       w3m -cols 80 -dump -T text/html -no-graph $(tmpdir)/$*.html > $@
-
-%.txt: $(tmpdir)/%.txt Makefile plaintext_postproc.awk
-       awk -f $(srcdir)/plaintext_postproc.awk $(tmpdir)/$*.txt > $@
-
 asciidoc-icons asciidoc-icons/callouts:
        @$(RM) -R asciidoc-icons
        @cp -a /usr/share/asciidoc/icons asciidoc-icons
@@ -60,7 +30,7 @@ asciidoc-js:
 
 endif
 
-include $(top_srcdir)/doc/install-dist.rules
+include $(top_srcdir)/doc/asciidoc.rules
 
 install-data-local: install-docs-local
 
diff --git a/doc/asciidoc/Makefile.in b/doc/asciidoc/Makefile.in
index 104c3f1..3b7fe6d 100644
--- a/doc/asciidoc/Makefile.in
+++ b/doc/asciidoc/Makefile.in
@@ -52,6 +52,7 @@ build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(top_srcdir)/doc/asciidoc.rules \
        $(top_srcdir)/doc/install-dist.rules
 subdir = doc/asciidoc
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -256,25 +257,26 @@ HTML_DOCS = README.INSTALL TROUBLESHOOTING \
        asciidoc-icons asciidoc-icons/callouts asciidoc-css asciidoc-js
 
 PDF_DOCS = README.INSTALL.pdf TROUBLESHOOTING.pdf
-EXTRA_DIST = README.INSTALL.adoc TROUBLESHOOTING.adoc plaintext.conf 
plaintext_postproc.awk plaintext.xsl
+EXTRA_DIST = README.INSTALL.adoc TROUBLESHOOTING.adoc
 @CONFIG_XENO_ASCIIDOC_FALSE@HTML_DOCSDIR = $(srcdir)/../generated/html/
 @CONFIG_XENO_ASCIIDOC_TRUE@HTML_DOCSDIR = ./
 @CONFIG_XENO_ASCIIDOC_FALSE@PDF_DOCSDIR = $(srcdir)/../generated/pdf/
 @CONFIG_XENO_ASCIIDOC_TRUE@PDF_DOCSDIR = ./
 @CONFIG_XENO_ASCIIDOC_TRUE@TXT_DOCS = README.INSTALL.txt TROUBLESHOOTING.txt
-@CONFIG_XENO_ASCIIDOC_TRUE@ASCIIDOC_HTML_OPTS = -a icons -a 
iconsdir=../asciidoc-icons \
-@CONFIG_XENO_ASCIIDOC_TRUE@    -a linkcss -a stylesdir=../asciidoc-css -a 
scriptsdir=../asciidoc-js \
-@CONFIG_XENO_ASCIIDOC_TRUE@    -a toc -a toclevels=3 -a max-width=55em -a 
xenover=$(PACKAGE_VERSION)
-
-@CONFIG_XENO_ASCIIDOC_TRUE@ASCIIDOC_PDF_OPTS = -a icons -a toc -a toclevels=3 
-a xenover=$(PACKAGE_VERSION)
-@CONFIG_XENO_ASCIIDOC_TRUE@ASCIIDOC_TXT_OPTS = -a xenover=$(PACKAGE_VERSION) 
-a encoding=ascii
-@CONFIG_XENO_ASCIIDOC_TRUE@tmpdir = adoc_plaintext
+ASCIIDOC_HTML_OPTS = -a icons -a iconsdir=../asciidoc-icons \
+       -a linkcss -a stylesdir=../asciidoc-css -a scriptsdir=../asciidoc-js \
+       -a toc -a toclevels=3 -a max-width=55em -a xenover=$(PACKAGE_VERSION)
+
+ASCIIDOC_PDF_OPTS = -a icons -a toc -a toclevels=3 -a 
xenover=$(PACKAGE_VERSION)
+ASCIIDOC_MAN_OPTS = -a xenover=$(PACKAGE_VERSION)
+ASCIIDOC_TXT_OPTS = -a xenover=$(PACKAGE_VERSION) -a encoding=ascii
+tmpdir = adoc_plaintext
 doc_top_distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)
 GEN_DOC_DIST_ROOT = $(doc_top_distdir)/doc/generated
 all: all-am
 
 .SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am 
$(top_srcdir)/doc/install-dist.rules $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am 
$(top_srcdir)/doc/asciidoc.rules $(top_srcdir)/doc/install-dist.rules 
$(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -470,26 +472,6 @@ uninstall-am: uninstall-local
 
 @CONFIG_XENO_ASCIIDOC_TRUE@all-local: $(HTML_DOCS) $(PDF_DOCS) $(TXT_DOCS)
 
-@CONFIG_XENO_ASCIIDOC_TRUE@%: %.adoc Makefile
-@CONFIG_XENO_ASCIIDOC_TRUE@    @$(mkdir_p) $@
-@CONFIG_XENO_ASCIIDOC_TRUE@    $(ASCIIDOC) -n -b xhtml11 $(ASCIIDOC_HTML_OPTS) 
-o $@/index.html $<
-
-@CONFIG_XENO_ASCIIDOC_TRUE@%.pdf: %.adoc Makefile
-@CONFIG_XENO_ASCIIDOC_TRUE@    $(A2X) -f pdf -D . $(ASCIIDOC_PDF_OPTS) $<
-
-@CONFIG_XENO_ASCIIDOC_TRUE@$(tmpdir)/%.txt: %.adoc Makefile plaintext.conf 
plaintext.xsl
-@CONFIG_XENO_ASCIIDOC_TRUE@    @$(mkdir_p) $(tmpdir)
-@CONFIG_XENO_ASCIIDOC_TRUE@    $(ASCIIDOC) --backend docbook -f 
$(srcdir)/plaintext.conf \
-@CONFIG_XENO_ASCIIDOC_TRUE@            --doctype article $(ASCIIDOC_TXT_OPTS) \
-@CONFIG_XENO_ASCIIDOC_TRUE@            --out-file $(tmpdir)/$*.xml $<
-@CONFIG_XENO_ASCIIDOC_TRUE@    xsltproc --stringparam toc.section.depth 3 
--nonet \
-@CONFIG_XENO_ASCIIDOC_TRUE@            --output $(tmpdir)/$*.html 
$(srcdir)/plaintext.xsl \
-@CONFIG_XENO_ASCIIDOC_TRUE@            $(tmpdir)/$*.xml
-@CONFIG_XENO_ASCIIDOC_TRUE@    w3m -cols 80 -dump -T text/html -no-graph 
$(tmpdir)/$*.html > $@
-
-@CONFIG_XENO_ASCIIDOC_TRUE@%.txt: $(tmpdir)/%.txt Makefile 
plaintext_postproc.awk
-@CONFIG_XENO_ASCIIDOC_TRUE@    awk -f $(srcdir)/plaintext_postproc.awk 
$(tmpdir)/$*.txt > $@
-
 @CONFIG_XENO_ASCIIDOC_TRUE@asciidoc-icons asciidoc-icons/callouts:
 @CONFIG_XENO_ASCIIDOC_TRUE@    @$(RM) -R asciidoc-icons
 @CONFIG_XENO_ASCIIDOC_TRUE@    @cp -a /usr/share/asciidoc/icons asciidoc-icons
@@ -504,6 +486,29 @@ uninstall-am: uninstall-local
 @CONFIG_XENO_ASCIIDOC_TRUE@    @cp -a 
/usr/share/asciidoc/javascripts/asciidoc-xhtml11.js $@
 @CONFIG_XENO_ASCIIDOC_TRUE@    @cp -a /usr/share/asciidoc/javascripts/toc.js $@
 
+%: %.adoc Makefile
+       @$(mkdir_p) $@
+       $(ASCIIDOC) -n -b xhtml11 $(ASCIIDOC_HTML_OPTS) -o $@/index.html $<
+
+%.man: %.adoc Makefile
+       $(A2X) -f manpage -D . $(ASCIIDOC_MAN_OPTS) $<       
+
+%.pdf: %.adoc Makefile
+       $(A2X) -f pdf -D . $(ASCIIDOC_PDF_OPTS) $<
+
+$(tmpdir)/%.txt: %.adoc Makefile $(top_srcdir)/doc/plaintext.conf 
$(top_srcdir)/doc/plaintext.xsl
+       @$(mkdir_p) $(tmpdir)
+       $(ASCIIDOC) --backend docbook -f $(top_srcdir)/doc/plaintext.conf \
+               --doctype article $(ASCIIDOC_TXT_OPTS) \
+               --out-file $(tmpdir)/$*.xml $<
+       xsltproc --stringparam toc.section.depth 3 --nonet \
+               --output $(tmpdir)/$*.html $(top_srcdir)/doc/plaintext.xsl \
+               $(tmpdir)/$*.xml
+       w3m -cols 80 -dump -T text/html -no-graph $(tmpdir)/$*.html > $@
+
+%.txt: $(tmpdir)/%.txt Makefile $(top_srcdir)/doc/plaintext_postproc.awk
+       awk -f $(top_srcdir)/doc/plaintext_postproc.awk $(tmpdir)/$*.txt > $@
+
 install-htmldocs: $(HTML_DOCS:%=$(HTML_DOCSDIR)%)
        docs="$(HTML_DOCS)"; abs_builddir=$$PWD; \
        for dir in $$docs; do \
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index 4271bba..9f31229 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -1,3 +1,6 @@
+HTML_DOCS = clocktest
+EXTRA_DIST = clocktest.adoc
+
 man1_MANS = \
        clocktest.man \
        cyclictest.man \
@@ -12,3 +15,27 @@ man1_MANS = \
        switchtest.man \
        xeno.man \
        xeno-config.man
+
+if !CONFIG_XENO_ASCIIDOC
+HTML_DOCSDIR = $(srcdir)/../generated/html/
+PDF_DOCSDIR = $(srcdir)/../generated/pdf/
+else
+HTML_DOCSDIR = ./
+PDF_DOCSDIR = ./
+
+all-local: $(HTML_DOCS)
+
+endif
+
+include $(top_srcdir)/doc/asciidoc.rules
+
+install-data-local: install-docs-local
+
+dist-hook: dist-docs-hook
+
+uninstall-local: uninstall-docs
+
+clean-local:
+       $(RM) -R $(HTML_DOCS) $(PDF_DOCS) $(TXT_DOCS) $(tmpdir)
+
+distclean-local: clean-local
diff --git a/doc/man/Makefile.in b/doc/man/Makefile.in
index 108f032..bcbfeab 100644
--- a/doc/man/Makefile.in
+++ b/doc/man/Makefile.in
@@ -51,15 +51,16 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = doc/man
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/clocktest.man.in $(srcdir)/cyclictest.man.in \
-       $(srcdir)/irqbench.man.in $(srcdir)/irqloop.man.in \
-       $(srcdir)/klatency.man.in $(srcdir)/latency.man.in \
-       $(srcdir)/rtcanconfig.man.in $(srcdir)/rtcanrecv.man.in \
-       $(srcdir)/rtcansend.man.in $(srcdir)/switchbench.man.in \
-       $(srcdir)/switchtest.man.in $(srcdir)/xeno-config.man.in \
-       $(srcdir)/xeno.man.in
+       $(srcdir)/cyclictest.man.in $(srcdir)/irqbench.man.in \
+       $(srcdir)/irqloop.man.in $(srcdir)/klatency.man.in \
+       $(srcdir)/latency.man.in $(srcdir)/rtcanconfig.man.in \
+       $(srcdir)/rtcanrecv.man.in $(srcdir)/rtcansend.man.in \
+       $(srcdir)/switchbench.man.in $(srcdir)/switchtest.man.in \
+       $(srcdir)/xeno-config.man.in $(srcdir)/xeno.man.in \
+       $(top_srcdir)/doc/asciidoc.rules \
+       $(top_srcdir)/doc/install-dist.rules
+subdir = doc/man
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/ac_prog_cc_for_build.m4 \
        $(top_srcdir)/config/docbook.m4 \
@@ -73,10 +74,10 @@ am__configure_deps = $(am__aclocal_m4_deps) 
$(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/include/xeno_config.h
-CONFIG_CLEAN_FILES = clocktest.man cyclictest.man irqbench.man \
-       irqloop.man klatency.man latency.man rtcanconfig.man \
-       rtcanrecv.man rtcansend.man switchbench.man switchtest.man \
-       xeno.man xeno-config.man
+CONFIG_CLEAN_FILES = cyclictest.man irqbench.man irqloop.man \
+       klatency.man latency.man rtcanconfig.man rtcanrecv.man \
+       rtcansend.man switchbench.man switchtest.man xeno.man \
+       xeno-config.man
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
@@ -244,6 +245,19 @@ build_vendor = @build_vendor@
 builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
+
+# -*- makefile -*-
+# Generic rules for installation and distribution of documentation.
+#
+# Parameters :
+# HTML_DOCS list of html documentation directories
+# PDF_DOCS list of pdf files
+# PS_DOCS list of ps files
+#
+# HTML_DOCSDIR: where directories listed in HTML_DOCS should be taken from 
(this
+# can be from . or from a directory containing pre-generated versions)
+#
+# PDF_DOCSDIR & PS_DOCSDIR: same thing for pdf and ps files.
 docdir = @docdir@
 dvidir = @dvidir@
 exec_prefix = @exec_prefix@
@@ -279,6 +293,8 @@ target_vendor = @target_vendor@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+HTML_DOCS = clocktest
+EXTRA_DIST = clocktest.adoc
 man1_MANS = \
        clocktest.man \
        cyclictest.man \
@@ -294,10 +310,24 @@ man1_MANS = \
        xeno.man \
        xeno-config.man
 
+@CONFIG_XENO_ASCIIDOC_FALSE@HTML_DOCSDIR = $(srcdir)/../generated/html/
+@CONFIG_XENO_ASCIIDOC_TRUE@HTML_DOCSDIR = ./
+@CONFIG_XENO_ASCIIDOC_FALSE@PDF_DOCSDIR = $(srcdir)/../generated/pdf/
+@CONFIG_XENO_ASCIIDOC_TRUE@PDF_DOCSDIR = ./
+ASCIIDOC_HTML_OPTS = -a icons -a iconsdir=../asciidoc-icons \
+       -a linkcss -a stylesdir=../asciidoc-css -a scriptsdir=../asciidoc-js \
+       -a toc -a toclevels=3 -a max-width=55em -a xenover=$(PACKAGE_VERSION)
+
+ASCIIDOC_PDF_OPTS = -a icons -a toc -a toclevels=3 -a 
xenover=$(PACKAGE_VERSION)
+ASCIIDOC_MAN_OPTS = -a xenover=$(PACKAGE_VERSION)
+ASCIIDOC_TXT_OPTS = -a xenover=$(PACKAGE_VERSION) -a encoding=ascii
+tmpdir = adoc_plaintext
+doc_top_distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)
+GEN_DOC_DIST_ROOT = $(doc_top_distdir)/doc/generated
 all: all-am
 
 .SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am 
$(top_srcdir)/doc/asciidoc.rules $(top_srcdir)/doc/install-dist.rules 
$(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -327,8 +357,6 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ 
$(am__configure_deps)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
-clocktest.man: $(top_builddir)/config.status $(srcdir)/clocktest.man.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 cyclictest.man: $(top_builddir)/config.status $(srcdir)/cyclictest.man.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 irqbench.man: $(top_builddir)/config.status $(srcdir)/irqbench.man.in
@@ -450,9 +478,13 @@ distdir: $(DISTFILES)
            || exit 1; \
          fi; \
        done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
 check-am: all-am
 check: check-am
-all-am: Makefile $(MANS)
+@CONFIG_XENO_ASCIIDOC_FALSE@all-local:
+all-am: Makefile $(MANS) all-local
 installdirs:
        for dir in "$(DESTDIR)$(man1dir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
@@ -489,11 +521,11 @@ maintainer-clean-generic:
        @echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool mostlyclean-am
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
 
 distclean: distclean-am
        -rm -f Makefile
-distclean-am: clean-am distclean-generic
+distclean-am: clean-am distclean-generic distclean-local
 
 dvi: dvi-am
 
@@ -507,7 +539,7 @@ info: info-am
 
 info-am:
 
-install-data-am: install-man
+install-data-am: install-data-local install-man
 
 install-dvi: install-dvi-am
 
@@ -551,24 +583,135 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-man
+uninstall-am: uninstall-local uninstall-man
 
 uninstall-man: uninstall-man1
 
 .MAKE: install-am install-strip
 
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       distclean distclean-generic distclean-libtool distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-dvi install-dvi-am \
-       install-exec install-exec-am install-html install-html-am \
-       install-info install-info-am install-man install-man1 \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       uninstall uninstall-am uninstall-man uninstall-man1
+.PHONY: all all-am all-local check check-am clean clean-generic \
+       clean-libtool clean-local dist-hook distclean \
+       distclean-generic distclean-libtool distclean-local distdir \
+       dvi dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-data-local install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-man1 install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am uninstall uninstall-am uninstall-local uninstall-man \
+       uninstall-man1
+
+
+@CONFIG_XENO_ASCIIDOC_TRUE@all-local: $(HTML_DOCS)
+
+%: %.adoc Makefile
+       @$(mkdir_p) $@
+       $(ASCIIDOC) -n -b xhtml11 $(ASCIIDOC_HTML_OPTS) -o $@/index.html $<
+
+%.man: %.adoc Makefile
+       $(A2X) -f manpage -D . $(ASCIIDOC_MAN_OPTS) $<       
+
+%.pdf: %.adoc Makefile
+       $(A2X) -f pdf -D . $(ASCIIDOC_PDF_OPTS) $<
+
+$(tmpdir)/%.txt: %.adoc Makefile $(top_srcdir)/doc/plaintext.conf 
$(top_srcdir)/doc/plaintext.xsl
+       @$(mkdir_p) $(tmpdir)
+       $(ASCIIDOC) --backend docbook -f $(top_srcdir)/doc/plaintext.conf \
+               --doctype article $(ASCIIDOC_TXT_OPTS) \
+               --out-file $(tmpdir)/$*.xml $<
+       xsltproc --stringparam toc.section.depth 3 --nonet \
+               --output $(tmpdir)/$*.html $(top_srcdir)/doc/plaintext.xsl \
+               $(tmpdir)/$*.xml
+       w3m -cols 80 -dump -T text/html -no-graph $(tmpdir)/$*.html > $@
+
+%.txt: $(tmpdir)/%.txt Makefile $(top_srcdir)/doc/plaintext_postproc.awk
+       awk -f $(top_srcdir)/doc/plaintext_postproc.awk $(tmpdir)/$*.txt > $@
+
+install-htmldocs: $(HTML_DOCS:%=$(HTML_DOCSDIR)%)
+       docs="$(HTML_DOCS)"; abs_builddir=$$PWD; \
+       for dir in $$docs; do \
+           dest=$(DESTDIR)$(docdir)/html/$$dir; \
+           $(mkinstalldirs) $$dest; \
+           abs_dest=`cd $$dest && pwd` ; \
+           cd $(HTML_DOCSDIR)$$dir || exit 1; \
+           for f in * ; do \
+               case $$f in \
+                   *~|CVS|.svn|[mM]akefile*|GNUmakefile*);; \
+                   *) $(INSTALL_DATA) $$f $$abs_dest/$$f;; \
+               esac; \
+           done; cd $$abs_builddir; \
+       done
+
+install-pdfdocs: $(PDF_DOCS:%=$(PDF_DOCSDIR)%)
+       docs="$^"; dest=$(DESTDIR)$(docdir)/pdf; \
+       $(mkinstalldirs) $$dest && \
+       for f in $$docs; do \
+           $(INSTALL_DATA) $$f $$dest; \
+       done
+
+install-psdocs: $(PS_DOCS:%=$(PS_DOCSDIR)%)
+       docs="$^"; dest=$(DESTDIR)$(docdir)/ps; \
+       $(mkinstalldirs) $$dest && \
+       for f in $$docs; do \
+           $(INSTALL_DATA) $$f $$dest; \
+       done
+
+install-docs-local: install-htmldocs install-psdocs install-pdfdocs
+
+dist-htmldocs: $(HTML_DOCS:%=$(HTML_DOCSDIR)%)
+       docs="$(HTML_DOCS)"; abs_builddir=$$PWD; \
+       for dir in $$docs; do \
+           dest=$(GEN_DOC_DIST_ROOT)/html/$$dir; \
+           $(mkinstalldirs) $$dest && abs_dest=`cd $$dest && pwd` && \
+           cd $(HTML_DOCSDIR)$$dir || exit 1; \
+           for f in * ; do \
+               case $$f in \
+                   *~|CVS|.svn|[mM]akefile*|GNUmakefile*);; \
+                   *) $(INSTALL_DATA) $$f $$abs_dest/$$f;; \
+               esac; \
+           done; cd $$abs_builddir; \
+       done
+
+dist-pdfdocs: $(PDF_DOCS:%=$(PDF_DOCSDIR)%)
+       docs="$^"; dest=$(GEN_DOC_DIST_ROOT)/pdf; \
+       $(mkinstalldirs) $$dest && \
+       for f in $$docs; do \
+           $(INSTALL_DATA) $$f $$dest; \
+       done
+
+dist-psdocs: $(PS_DOCS:%=$(PS_DOCSDIR)%)
+       docs="$^"; dest=$(GEN_DOC_DIST_ROOT)/ps; \
+       $(mkinstalldirs) $$dest && \
+       for f in $$docs; do \
+           $(INSTALL_DATA) $$f $$dest; \
+       done
+
+dist-docs-hook: all-local dist-htmldocs dist-pdfdocs dist-psdocs
+
+# To make distcheck happy.
+uninstall-docs:
+       if test -n "$(HTML_DOCS)" -o -n "$(PDF_DOCS)" -o -n "$(PS_DOCS)"; then \
+           targets="$(HTML_DOCS:%=$(DESTDIR)$(docdir)/html/%) \
+               $(PDF_DOCS:%=$(DESTDIR)$(docdir)/pdf/%) \
+               $(PS_DOCS:%=$(DESTDIR)$(docdir)/ps/%)"; \
+           for t in $$targets; do \
+               if test -d $$t; then $(RM) $$t/*; $(RM) -r $$t; \
+               else $(RM) $$t; fi; \
+           done; \
+       fi
+
+install-data-local: install-docs-local
+
+dist-hook: dist-docs-hook
+
+uninstall-local: uninstall-docs
+
+clean-local:
+       $(RM) -R $(HTML_DOCS) $(PDF_DOCS) $(TXT_DOCS) $(tmpdir)
 
+distclean-local: clean-local
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/doc/man/clocktest.adoc b/doc/man/clocktest.adoc
new file mode 100644
index 0000000..dd0eeda
--- /dev/null
+++ b/doc/man/clocktest.adoc
@@ -0,0 +1,43 @@
+CLOCKTEST(1)
+============
+:man date: 2008/04/01
+:doctype: manpage
+:man source: Xenomai
+:man version: {xenover}
+:man manual: Xenomai Manual
+
+NAME
+----
+clocktest - Xenomai Clock Test
+
+SYNOPSIS
+--------
+*clocktest* ['OPTIONS']
+
+DESCRIPTION
+-----------
+*clocktest* is part of the Xenomai test suite and tests the Clock. For each
+CPU, it repeatedly prints a time offset (compared to the reference
+gettimeofday()), a drift value, the number of warps and the maximum warp in
+microseconds.
+
+For this program to work, you need to run a suitable Xenomai enabled kernel
+with the respective module (xeno_posix).
+
+OPTIONS
+-------
+*-C <clock_id>*::
+     clock to be tested, default=0 (CLOCK_REALTIME=0, CLOCK_MONOTONIC=1, 
+CLOCK_HOST_REALTIME=42)
+
+*-T <test_duration_seconds>*::
+     default=0 (Never stop, ^C to end)
+
+*-D*::
+     print extra diagnostics for CLOCK_HOST_REALTIME
+
+AUTHOR
+------
+
+*clocktest* was written by Jan Kiszka <jan.kis...@web.de>. This man page
+was written by Roland Stigge <sti...@antcom.de>.
diff --git a/doc/man/clocktest.man.in b/doc/man/clocktest.man.in
deleted file mode 100644
index 290b307..0000000
--- a/doc/man/clocktest.man.in
+++ /dev/null
@@ -1,36 +0,0 @@
-'\" t
-.\" ** The above line should force tbl to be a preprocessor **
-.\" Man page for clocktest
-.\"
-.\" Copyright (C) 2008 Roland Stigge <sti...@antcom.de>
-.\"
-.\" You may distribute under the terms of the GNU General Public
-.\" License as specified in the file COPYING that comes with the
-.\" Xenomai distribution.
-.\"
-.pc
-.TH CLOCKTEST 1 "2008-04-01" "@PACKAGE_VERSION@" "Xenomai"
-.SH NAME
-clocktest \- Xenomai Clock Test
-.SH SYNOPSIS
-.\" The general command line
-.B clocktest
-.SH DESCRIPTION
-\fBclocktest\fP is part of the Xenomai test suite and tests the Clock. For each
-CPU, it repeatedly prints a time offset (compared to the reference
-gettimeofday()), a drift value, the number of warps and the maximum warp in
-microseconds.
-
-For this program to work, you need to run a suitable Xenomai enabled kernel
-with the respective module (xeno_posix).
-.SH OPTIONS
-\fBclocktest\fP accepts the following options:
-.TP
-.B \-C <clock_id>
-tested clock, default=0 (CLOCK_REALTIME)
-.TP
-.B \-T <test_duration_seconds>
-default=0, so ^C to end
-.SH AUTHOR
-\fBclocktest\fP was written by Jan Kiszka <jan.kis...@web.de>. This man page
-was written by Roland Stigge <sti...@antcom.de>.
diff --git a/doc/asciidoc/plaintext.conf b/doc/plaintext.conf
similarity index 100%
rename from doc/asciidoc/plaintext.conf
rename to doc/plaintext.conf
diff --git a/doc/asciidoc/plaintext.xsl b/doc/plaintext.xsl
similarity index 100%
rename from doc/asciidoc/plaintext.xsl
rename to doc/plaintext.xsl
diff --git a/doc/asciidoc/plaintext_postproc.awk b/doc/plaintext_postproc.awk
similarity index 100%
rename from doc/asciidoc/plaintext_postproc.awk
rename to doc/plaintext_postproc.awk


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to