Commit f682d3d4 authored by Agustin Martin Domingo's avatar Agustin Martin Domingo

Makefile.in, doc/Makedoc.sh: More versatile doc format selection. Build pdf, not dvi+ps.

 * Use a more versatile doc format selection for build, based
   in BUILDDOC_FORMATS variable with possible values
   txt pdf info lyx html rtf dvi+ps
   This needs to be made configurable from configure.
 * Build by default newly added pdf format instead of old but still
   supported dvi+ps.
 * Do not try dvips if latex is not available.
 * Minor cosmetic changes.
Signed-off-by: default avatarAgustin Martin Domingo <agmartin@debian.org>
parent 7d755846
......@@ -10,6 +10,8 @@ please see "doc/CHANGES.Debian-native".
======
* Build documentation in build target, not in install target
(Debian #800537).
* More versatile handling of doc formats. Add pdf format and built it
instead of dvi+ps.
0.9.69:
=======
......
......@@ -30,6 +30,7 @@ INSTALL_DATA = @INSTALL_DATA@
BUILD_SGMLSASP = @BUILD_SGMLSASP@
BUILD_ENTITY_MAP = @BUILD_ENTITY_MAP@
BUILD_ISO_ENTITIES = @BUILD_ISO_ENTITIES@
BUILDDOC_FORMATS = txt pdf info lyx html rtf
# Now real destination dirs, honouring $(DESTDIR)
auxbin_ddir = $(DESTDIR)$(auxbindir)
......@@ -95,6 +96,7 @@ endif
PKGPERL5LIB=$(CURDIR)/perl5lib \
PKGDATADIR=$(CURDIR)/lib \
PKGENTITYMAPDIR=$(CURDIR)/entity-map \
BUILDDOC_FORMATS="$(BUILDDOC_FORMATS)" \
bash Makedoc.sh)
install:: bin/linuxdoc
......
......@@ -61,40 +61,73 @@ sed < ../bin/linuxdoc.in > $TMPDIR/linuxdoc \
chmod u+x $TMPDIR/linuxdoc
if [ -n "`which groff`" ]; then
ln -s $TMPDIR/linuxdoc $TMPDIR/sgml2txt
echo "- Building txt docs" >&2
$TMPDIR/sgml2txt -b 1 ./guide
# Unless otherwise instructed, build docs for all formats
if [ -z "${BUILDDOC_FORMATS}" ]; then
echo "- ++ Warning: \"\${BUILDDOC_FORMATS}\" unset. Building all doc formats:" >&2
BUILDDOC_FORMATS="txt pdf info lyx html rtf dvi+ps"
fi
if [ -n "`which latex`" ]; then
ln -s $TMPDIR/linuxdoc $TMPDIR/sgml2latex
echo "- Building latex docs" >&2
$TMPDIR/sgml2latex --pass="\usepackage{times}" -o dvi ./guide
fi
if [ -n "`which dvips`" ]; then
echo " + dvips" >&2
dvips -t letter -o ./guide.ps ./guide.dvi
if [ -n "`which gzip`" -a -f ./guide.ps ]; then
gzip -fN ./guide.ps
fi
fi
echo "- Building info docs" >&2
$TMPDIR/linuxdoc -B info ./guide.sgml
echo "- Building lyx docs" >&2
$TMPDIR/linuxdoc -B lyx ./guide.sgml
echo "- Building html docs" >&2
$TMPDIR/linuxdoc -I -B html ./guide && mv -f ./guide*.html ./html
echo "- Building rtf docs" >&2
$TMPDIR/linuxdoc -B rtf ./guide && if [ ! -d ./rtf ]; \
then mkdir -m 755 ./rtf; fi && mv -f ./guide*.rtf ./rtf
# Build actual documentation
echo "- Building documentation for formats: ${BUILDDOC_FORMATS}" >&2
for docformat in ${BUILDDOC_FORMATS}; do
case ${docformat} in
txt)
echo "- Building txt docs" >&2
if [ -n "`which groff`" ]; then
$TMPDIR/linuxdoc --backend=txt --blanks=1 ./guide.sgml
else
echo "- ++ Warning: groff not available, cannot build \"${docformat}\" format." >&2
fi
;;
pdf)
echo "- Building pdf docs" >&2
$TMPDIR/linuxdoc --backend=latex --output=pdf \
--pass="\usepackage{times}" ./guide.sgml
;;
info)
echo "- Building info docs" >&2
$TMPDIR/linuxdoc --backend=info ./guide.sgml
;;
lyx)
echo "- Building lyx docs" >&2
$TMPDIR/linuxdoc --backend=lyx ./guide.sgml
;;
html)
echo "- Building html docs" >&2
$TMPDIR/linuxdoc --imagebuttons --backend=html ./guide.sgml \
&& mv -f ./guide*.html ./html
;;
rtf)
echo "- Building rtf docs" >&2
$TMPDIR/linuxdoc --backend=rtf ./guide.sgml && if [ ! -d ./rtf ]; \
then mkdir -m 755 ./rtf; fi && mv -f ./guide*.rtf ./rtf
;;
dvi+ps)
echo "- Building latex docs" >&2
if [ -n "`which latex`" ]; then
echo "- Building dvi docs" >&2
$TMPDIR/linuxdoc --backend=latex --output=dvi \
--pass="\usepackage{times}" ./guide.sgml
if [ -n "`which dvips`" ]; then
echo " + dvips" >&2
dvips -t letter -o ./guide.ps ./guide.dvi
if [ -n "`which gzip`" -a -f ./guide.ps ]; then
gzip -fN ./guide.ps
fi
else
echo "- ++ Warning: dvips not available, cannot build \"guide.ps\"." >&2
fi
else
echo "- ++ Warning: latex not available, cannot build \"${docformat}\" format." >&2
fi
;;
*)
echo "- ++ Warning: Ignoring unknown \"${docformat}\" format." >&2
esac
done
# Remove temporary directory.
rm -rf $TMPDIR
exit 0
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