Commit 6076f095 authored by Philippe Gerum's avatar Philippe Gerum

doc: stop prebuilding documentation

parent 0f1849eb
......@@ -8,18 +8,15 @@ about Xenomai 3.
Also, make sure to read the per-architecture README files, i.e.:
kernel/cobalt/arch/*/README
Built-in documentation
======================
The Xenomai 3.x documentation package for this release is directly
available from the source tree, in HTML and PDF formats:
doc/prebuilt/{html, pdf}/README.INSTALL
doc/prebuilt/{html, pdf}/README.APPLICATIONS
doc/prebuilt/{html, pdf}/MIGRATION
doc/prebuilt/{html, pdf}/TROUBLESHOOTING.COBALT
doc/prebuilt/{html, pdf}/TROUBLESHOOTING.MERCURY
doc/prebuilt/{html, pdf}/xeno3prm
Documentation
=============
The Xenomai 3.x documentation can be built then installed this way:
xenomai-3.x.y/configure --enable-doc-build --prefix=<install-dir>
Asciidoc, Doxygen, W3M and Dot packages are required for building the
documentation.
Online documentation
====================
......
......@@ -375,15 +375,15 @@ fi
dnl Documentation package.
XENO_BUILD_DOC=
XENO_DOC_GIT=
AC_MSG_CHECKING(whether to build documentation)
AC_ARG_ENABLE(doc-build,
AS_HELP_STRING([--enable-doc-build], [Build Xenomai documentation]),
[case "$enableval" in
y | yes) XENO_BUILD_DOC=y ;;
*) if test x$enableval = x; then
unset XENO_BUILD_DOC
else
n | no) ;;
*) if test \! x$enableval = x; then
XENO_BUILD_DOC=y
XENO_DOC_GIT=$enableval
fi
......@@ -392,17 +392,6 @@ AC_ARG_ENABLE(doc-build,
AM_CONDITIONAL(XENO_BUILD_DOC,[test "$XENO_BUILD_DOC" = y])
AC_SUBST(XENO_DOC_GIT)
XENO_INSTALL_DOC=y
AC_MSG_CHECKING(whether to install documentation)
AC_ARG_ENABLE(doc-install,
AS_HELP_STRING([--disable-doc-install], [Do not install documentation]),
[case "$enableval" in
y | yes);;
*) unset XENO_INSTALL_DOC;;
esac])
AC_MSG_RESULT(${XENO_INSTALL_DOC:-no})
AM_CONDITIONAL(XENO_INSTALL_DOC,[test "$XENO_INSTALL_DOC" = y])
AC_CHECK_PROG(DOXYGEN, doxygen, doxygen)
if test x${XENO_BUILD_DOC} = xy -a x"$DOXYGEN" = x ; then
......@@ -460,12 +449,6 @@ if test x$htmldir = x'${docdir}'; then
fi
AC_SUBST(htmldir)
XENO_RUN_DOC=y
if test x$XENO_BUILD_DOC = x -a x$XENO_INSTALL_DOC = x; then
unset XENO_RUN_DOC
fi
AM_CONDITIONAL(XENO_RUN_DOC,[test "$XENO_RUN_DOC" = y])
dnl Check for Valgrind client API support.
dnl Some GCC releases produce broken assembly code for Valgrind
dnl client calls, so we check this too. --disable-valgrind-client
......
SUBDIRS=gitdoc doxygen asciidoc
RESYNC_SCRIPT=$(top_srcdir)/scripts/maint/resync-doc
gitdoc doxygen asciidoc: FORCE
$(MAKE) -C $@
if XENO_BUILD_DOC
resync prebuild: $(SUBDIRS)
@srcdir=$(srcdir) $(RESYNC_SCRIPT)
else
resync prebuild: FORCE
@echo "build tree not configured for regenerating documentation"
@echo "reconfigure with --enable-doc-build"
@/bin/false
endif
.PHONY: FORCE
......@@ -61,11 +61,8 @@ EXTRA_DIST := \
plaintext_postproc.awk \
$(MAN1_DOCS:%.1=%.adoc)
if !XENO_BUILD_DOC
HTML_DOCSDIR = $(srcdir)/../prebuilt/
PDF_DOCSDIR = $(srcdir)/../prebuilt/pdf/
MAN_DOCSDIR = $(srcdir)/../prebuilt/man/
else
if XENO_BUILD_DOC
HTML_DOCSDIR = ./
PDF_DOCSDIR = ./
MAN_DOCSDIR = ./
......@@ -117,20 +114,16 @@ html/asciidoc-icons/callouts: html/asciidoc-icons
.PHONY: html/asciidoc-icons
endif
include $(top_srcdir)/doc/install-dist.rules
include $(top_srcdir)/doc/install.rules
if XENO_INSTALL_DOC
install-data-local: install-docs-local
uninstall-local: uninstall-docs
else
install-data-local:
uninstall-local:
endif
dist-hook: dist-docs-hook
distclean-local: clean-local
clean-local:
......
......@@ -633,15 +633,6 @@ client applications are running over a SMP-capable kernel.
based on the http://asciidoc.org/[Asciidoc markup language] is
produced too.
[normal]
A pre-built copy of the documentation is present in the source
tree, under the +doc/generated/+ file hierarchy.
*--disable-doc-install*::
Disables the copying of the pre-built documentation to the
installation directory.
_Cobalt_-specific configuration options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
......
......@@ -2,15 +2,8 @@ HTML_DOCS = html/xeno3prm html/xeno3prm/search
PDF_DOCS = xeno3prm.pdf
EXTRA_DIST = xeno3prm-common.conf.in xeno3prm-html.conf.in xeno3prm-latex.conf.in
if !XENO_BUILD_DOC
HTML_DOCSDIR = $(srcdir)/../prebuilt/
PDF_DOCSDIR = $(srcdir)/../prebuilt/pdf/
html pdf:
@echo "build tree not configured for regenerating documentation"
@echo "reconfigure with --enable-doc-build"
@/bin/false
else
if XENO_BUILD_DOC
HTML_DOCSDIR = ./
PDF_DOCSDIR = ./
......@@ -39,16 +32,12 @@ distclean-local:
.DELETE_ON_ERROR:
endif
include $(top_srcdir)/doc/install-dist.rules
include $(top_srcdir)/doc/install.rules
if XENO_INSTALL_DOC
install-data-local: install-docs-local
uninstall-local: uninstall-docs
else
install-data-local:
uninstall-local:
endif
dist-hook: dist-docs-hook
......@@ -6,15 +6,9 @@
# PDF_DOCS list of pdf files
# MAN1_DOCS list of man1 files
#
# HTML_DOCSDIR: where directories listed in HTML_DOCS should be taken from (this
# can be from . or from a directory containing pre-built versions)
# PDF_DOCSDIR: root of PDF files
# MAN_DOCSDIR: root of manN sub-directories
htmldir=@htmldir@
mandir=@mandir@
pdfdir=@pdfdir@
doc_top_distdir=$(top_builddir)/$(PACKAGE)-$(VERSION)
GEN_DOC_DIST_ROOT=$(doc_top_distdir)/doc/prebuilt
# HTML_DOCSDIR: root of generated HTML files
# PDF_DOCSDIR: root of generated PDF files
# MAN_DOCSDIR: root of generated manN sub-directories
install-htmldocs: $(HTML_DOCS:%=$(HTML_DOCSDIR)%)
docs="$(HTML_DOCS)"; abs_builddir=$$PWD; \
......@@ -49,38 +43,6 @@ install-mandocs: install-man1
install-docs-local: install-htmldocs install-pdfdocs install-mandocs
dist-htmldocs: $(HTML_DOCS:%=$(HTML_DOCSDIR)%)
docs="$(HTML_DOCS)"; abs_builddir=$$PWD; \
for dir in $$docs; do \
dest=$(GEN_DOC_DIST_ROOT)/$$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-man1: $(MAN1_DOCS:%=$(MAN_DOCSDIR)%)
docs="$^"; dest=$(GEN_DOC_DIST_ROOT)/man/man1; \
$(mkinstalldirs) $$dest && \
for f in $$docs; do \
$(INSTALL_DATA) $$f $$dest; \
done
dist-mandocs: dist-man1
dist-docs-hook: all-local dist-htmldocs dist-mandocs dist-pdfdocs
# To make distcheck happy.
uninstall-docs:
if test -n "$(HTML_DOCS)" -o -n "$(PDF_DOCS)" -o -n "$(MAN1_DOCS)"; then \
......
......@@ -114,9 +114,8 @@ o User space part:
Documentation:
-------------
The RTDM CAN profile is documented using Doxygen in Xenomai's
"doc/prebuilt/html/manual/index.html"
The RTDM CAN profile is documented at
http://www.xenomai.org/documentation/xenomai-3/html/xeno3prm/group__rtdm__can.html
Feedback:
--------
......
#!/bin/sh
set -e
repository=/home/git/repositories
tmpdir=/tmp/xenomai-documentation
USAGE="$0 [ -q | -v ] [ -d ] [ -h ] installdir dirs
Extract Xenomai documentation tree for directories "dirs". Where dirs
are taken as subdirectories of git repository root. Extracted
documentation trees are copied as subdirectories of "installdir".
Options:
-q, --quiet quiet, print only error messages, suitable for cron jobs.
-v, --verbose verbose, git and rsync operations print file names.
-d, --debug debug, print every command before actually running it.
-h, --help print usage and exit.
"
ECHO=echo
GIT_CLONE="git clone"
RSYNC="rsync"
# Parse command line arguments.
while :; do
case "$1" in
# Really verbose, output details
-v|--verbose) SVN=svn
RSYNC="rsync -v"
;;
# Really silent, for cron jobs
-q|--quiet) ECHO=:
RSYNC="rsync -q"
GIT_CLONE="git clone -q"
;;
# Debugging
-d|--debug) set -x
;;
-h|--help) cat <<EOF
$USAGE
EOF
exit 0
;;
*) break
;;
esac
shift
done
if test $# -lt 2; then
cat <<EOF
$USAGE
Error: not enough arguments.
EOF
exit 1
fi
installdir=$1; shift
if test "x$installdir" = x; then
cat <<EOF
$USAGE
Error: empty installation directory.
EOF
exit 1
fi
[ -d $tmpdir ] && rm -Rf $tmpdir
mkdir $tmpdir
cd $tmpdir
dir=$1
$ECHO Checking out Xenomai directory $dir documentation...
$GIT_CLONE -b next $repository/xenomai-forge.git $dir
$ECHO done.
$ECHO Changing files and directories modes...
find $dir/doc/prebuilt | xargs chmod u=rwX,g=rwX,o=rX
$ECHO done.
$ECHO Copying to $installdir/$dir...
mkdir -p $installdir/$dir
$RSYNC -e ssh -prltgDz --delete --delete-after \
$dir/doc/prebuilt/ $installdir/$dir/
$ECHO done.
cd ..
rm -Rf $tmpdir
#! /bin/bash
# set -x
set -e
die()
{
echo Error: ${1+"$@"}
exit 1
}
progname=`basename $0`
if ! [ -d "$srcdir/prebuilt" ]; then
die $progname must be run from the doc sub-directory of the build \
tree and passed a correct srcdir variable.
fi
builddir=`pwd`
abs_srcdir=`cd $srcdir && pwd`
echo 'Generating documentation in the build tree.'
[ -d tmp-dist ] && rm -Rf tmp-dist
make clean
mkdir tmp-dist
mkdir tmp-dist/doc
make doc_top_distdir=`pwd`/tmp-dist distdir=./tmp-dist/doc distdir
if ! [ -d tmp-dist/doc/prebuilt ]; then
die Something went wrong when building the documentation.
fi
echo -n 'Looking for removed files...'
: > tmp-dist/removed
{ cd "$abs_srcdir" && find prebuilt -type f -print ; } | {
cd tmp-dist/doc && while read -a file; do
if ! [ -f "${file[*]}" ]; then
echo "${file[*]}" >> ../removed
fi
done
}
echo `cat tmp-dist/removed`.
echo -n 'Looking for added files and non empty directories...'
: > tmp-dist/added_files
: > tmp-dist/added_dirs
{ cd tmp-dist/doc && find prebuilt; } | {
cd "$abs_srcdir" && while read -a file; do
if ! [ -e "${file[*]}" ]; then
if [ -f "$builddir/tmp-dist/doc/${file[*]}" ]; then
echo "${file[*]}" >> "$builddir/tmp-dist/added_files"
else
if ! rmdir "$builddir/tmp-dist/doc/${file[*]}" >& /dev/null; then
echo "${file[*]}" >> "$builddir/tmp-dist/added_dirs"
fi
fi
fi
done
}
echo `cat tmp-dist/added_dirs tmp-dist/added_files`
echo -n 'Copying prebuilt documentation to the source tree...'
cp -aR tmp-dist/doc/prebuilt "$abs_srcdir"
echo done
cd "$abs_srcdir"
echo -n 'Removing files...'
cat "$builddir/tmp-dist/removed" | while read -a file; do
rm "${file[*]}"
git rm "${file[*]}"
done
echo `cat "$builddir/tmp-dist/removed"` done.
echo -n 'Adding new directories...'
cat "$builddir/tmp-dist/added_dirs" | while read -a dir; do
git add "${dir[*]}"
done
echo `cat "$builddir/tmp-dist/added_dirs"` done.
echo -n 'Adding new files...'
cat "$builddir/tmp-dist/added_files" | while read -a file; do
git add "${file[*]}"
done
echo `cat "$builddir/tmp-dist/added_files"` done.
rm -Rf tmp-dist
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment