1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

doc: fix dtdocbook so it can handle parallel builds

Enable parallel building of the help files.
This commit is contained in:
Jon Trulson 2021-11-11 10:03:41 -07:00
parent 1bb5a9f030
commit bfd694e8c7
6 changed files with 79 additions and 94 deletions

View file

@ -1,8 +1,5 @@
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in
# FIXME dtdocbook needs to be fixed to allow parallel building here
.NOTPARALLEL:
# This is only available for the C locale, it will be blank for other # This is only available for the C locale, it will be blank for other
# languages # languages
APPBUILDER = AppBuilder.sdl APPBUILDER = AppBuilder.sdl

View file

@ -1,8 +1,5 @@
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in
# FIXME dtdocbook needs to be fixed to allow parallel building here
.NOTPARALLEL:
# this sets the LANG and HELP_LANG variables # this sets the LANG and HELP_LANG variables
include $(top_srcdir)/programs/localized/templates/German.am include $(top_srcdir)/programs/localized/templates/German.am
# this does all the work # this does all the work

View file

@ -1,8 +1,5 @@
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in
# FIXME dtdocbook needs to be fixed to allow parallel building here
.NOTPARALLEL:
# this sets the LANG and HELP_LANG variables # this sets the LANG and HELP_LANG variables
include $(top_srcdir)/programs/localized/templates/Spanish.am include $(top_srcdir)/programs/localized/templates/Spanish.am
# this does all the work # this does all the work

View file

@ -1,8 +1,5 @@
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in
# FIXME dtdocbook needs to be fixed to allow parallel building here
.NOTPARALLEL:
# this sets the LANG and HELP_LANG variables # this sets the LANG and HELP_LANG variables
include $(top_srcdir)/programs/localized/templates/French.am include $(top_srcdir)/programs/localized/templates/French.am
# this does all the work # this does all the work

View file

@ -1,8 +1,5 @@
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in
# FIXME dtdocbook needs to be fixed to allow parallel building here
.NOTPARALLEL:
# this sets the LANG and HELP_LANG variables # this sets the LANG and HELP_LANG variables
include $(top_srcdir)/programs/localized/templates/Italian.am include $(top_srcdir)/programs/localized/templates/Italian.am
# this does all the work # this does all the work

View file

@ -35,9 +35,9 @@ function fatal {
function fatalError { function fatalError {
echo "$command_name fatal error:" echo "$command_name fatal error:"
echo " $1" echo " $1"
if [[ -a $basename.out.err ]]; then if [[ -a $basename.out.$$.err ]]; then
cat $basename.out.err >> $basename.log cat $basename.out.$$.err >> $basename.$$.log
rm -f $basename.out.err rm -f $basename.out.$$.err
fi fi
exit 1 exit 1
} }
@ -136,7 +136,7 @@ if (( $help )); then
echo " -d decompress an existing SDL file" echo " -d decompress an existing SDL file"
echo " -g specify additional catalog file (repeatable)" echo " -g specify additional catalog file (repeatable)"
echo " -h emit this message" echo " -h emit this message"
echo " -l leave <basename>.log in current directory" echo " -l leave <basename>.<pid>.log in current directory"
echo " -m <maps> add <maps> to list of SDATA or CMAP files" echo " -m <maps> add <maps> to list of SDATA or CMAP files"
echo " -o <file> use <file> as the output file name" echo " -o <file> use <file> as the output file name"
echo " -r remove leftover intermediate files" echo " -r remove leftover intermediate files"
@ -221,25 +221,25 @@ fi
# do it and exit. # do it and exit.
if (( $remove )); then if (( $remove )); then
if (( $verbose )); then if (( $verbose )); then
echo "rm -f $basename.esis" echo "rm -f $basename.$$.esis"
fi fi
rm -f $basename.esis rm -f $basename.$$.esis
if (( $verbose )); then if (( $verbose )); then
echo "rm -f $basename.out.sdl" echo "rm -f $basename.out.$$.sdl"
fi fi
rm -f $basename.out.sdl rm -f $basename.out.$$.sdl
if (( $verbose )); then if (( $verbose )); then
echo "rm -f $basename.out.snb" echo "rm -f $basename.out.$$.snb"
fi fi
rm -f $basename.out.snb rm -f $basename.out.$$.snb
if (( $verbose )); then if (( $verbose )); then
echo "rm -f $basename.log" echo "rm -f $basename.$$.log"
fi fi
rm -f $basename.log rm -f $basename.$$.log
if (( $verbose )); then if (( $verbose )); then
echo "rm -f $basename.out.err" echo "rm -f $basename.out.$$.err"
fi fi
rm -f $basename.out.err rm -f $basename.out.$$.err
if (( $verbose )); then if (( $verbose )); then
echo "rm -f $oname" echo "rm -f $oname"
fi fi
@ -249,18 +249,18 @@ fi
# make sure the error files are clean # make sure the error files are clean
if (( $verbose )); then if (( $verbose )); then
echo "rm -f $basename.log" echo "rm -f $basename.$$.log"
fi fi
rm -f $basename.log rm -f $basename.$$.log
if (( $? )); then if (( $? )); then
fatal "Could not remove $basename.log - permissions?" fatal "Could not remove $basename.$$.log - permissions?"
fi fi
if (( $verbose )); then if (( $verbose )); then
echo "rm -f $basename.out.err" echo "rm -f $basename.out.$$.err"
fi fi
rm -f $basename.out.err rm -f $basename.out.$$.err
if (( $? )); then if (( $? )); then
fatal "Could not remove $basename.out.err - permissions?" fatal "Could not remove $basename.out.$$.err - permissions?"
fi fi
@ -292,31 +292,31 @@ fi
# If we get here, we really want to process a .sgm file. First run # If we get here, we really want to process a .sgm file. First run
# sgmls(1) on it. # sgmls(1) on it.
if [[ -a $basename.esis ]] then if [[ -a $basename.$$.esis ]] then
if (( $verbose )); then if (( $verbose )); then
echo rm $basename.esis echo rm $basename.$$.esis
fi fi
rm $basename.esis rm $basename.$$.esis
if (( $? )); then if (( $? )); then
fatalError "Could not remove $basename.esis - permissions?" fatalError "Could not remove $basename.$$.esis - permissions?"
fi fi
fi fi
if (( $verbose )); then if (( $verbose )); then
echo "${sgmls} -deglru$catfiles ${sgml_dir}/docbook.sgml $iname > $basename.esis" echo "${sgmls} -deglru$catfiles ${sgml_dir}/docbook.sgml $iname > $basename.$$.esis"
${sgmls} -deglru$catfiles ${sgml_dir}/docbook.sgml $iname > $basename.esis ${sgmls} -deglru$catfiles ${sgml_dir}/docbook.sgml $iname > $basename.$$.esis
if (( $? )); then if (( $? )); then
if (( !$debug )); then if (( !$debug )); then
echo "rm -f $basename.esis" echo "rm -f $basename.$$.esis"
rm -f $basename.esis rm -f $basename.$$.esis
fi fi
fatalError "Error processing $iname by $parser" fatalError "Error processing $iname by $parser"
fi fi
else else
${sgmls} -deglru$catfiles ${sgml_dir}/docbook.sgml $iname \ ${sgmls} -deglru$catfiles ${sgml_dir}/docbook.sgml $iname \
> $basename.esis 2> $basename.log > $basename.$$.esis 2> $basename.$$.log
if (( $? )); then if (( $? )); then
if (( !$debug )); then if (( !$debug )); then
rm -f $basename.esis rm -f $basename.$$.esis
fi fi
fatalError "Error processing $iname by $parser" fatalError "Error processing $iname by $parser"
fi fi
@ -325,72 +325,72 @@ fi
# The sgmls(1) run succeeded. Run instant(1) on the result to create # The sgmls(1) run succeeded. Run instant(1) on the result to create
# an unenhanced .sdl file (e.g., no LOIDS yet). # an unenhanced .sdl file (e.g., no LOIDS yet).
if [[ -a $basename.out.sdl ]] then if [[ -a $basename.out.$$.sdl ]] then
if (( $verbose )); then if (( $verbose )); then
echo rm -f $basename.out.sdl echo rm -f $basename.out.$$.sdl
fi fi
rm -f $basename.out.sdl rm -f $basename.out.$$.sdl
if (( $? )); then if (( $? )); then
fatalError "Could not remove $basename.out.sdl - permissions?" fatalError "Could not remove $basename.out.$$.sdl - permissions?"
fi fi
if (( $verbose )); then if (( $verbose )); then
echo rm -f $basename.out.snb echo rm -f $basename.out.$$.snb
fi fi
rm -f $basename.out.snb rm -f $basename.out.$$.snb
if (( $? )); then if (( $? )); then
fatalError "Could not remove $basename.out.snb - permissions?" fatalError "Could not remove $basename.out.$$.snb - permissions?"
fi fi
fi fi
if (( $verbose )); then if (( $verbose )); then
echo "${instant} -o $basename.out.sdl \\\\" echo "${instant} -o $basename.out.$$.sdl \\\\"
if [[ $mapfiles != "" ]] then if [[ $mapfiles != "" ]] then
echo " $mapfiles \\\\" echo " $mapfiles \\\\"
fi fi
echo " -c docbook.cmap \\\\" echo " -c docbook.cmap \\\\"
echo " -t docbook.ts \\\\" echo " -t docbook.ts \\\\"
echo " $basename.esis" echo " $basename.$$.esis"
${instant} -o $basename.out.sdl \ ${instant} -o $basename.out.$$.sdl \
$mapfiles \ $mapfiles \
-c docbook.cmap \ -c docbook.cmap \
-t docbook.ts \ -t docbook.ts \
$basename.esis $basename.$$.esis
status=$? status=$?
if ([[ $status -eq 255 ]]) then if ([[ $status -eq 255 ]]) then
warn "Warning(s) processing $basename.esis by instant" warn "Warning(s) processing $basename.$$.esis by instant"
elif ([[ $status -eq 1 ]]) then elif ([[ $status -eq 1 ]]) then
if (( !$debug )); then if (( !$debug )); then
echo "rm -f $basename.esis" echo "rm -f $basename.$$.esis"
rm -f $basename.esis rm -f $basename.$$.esis
echo "rm -f $basename.out.sdl" echo "rm -f $basename.out.$$.sdl"
rm -f $basename.out.sdl rm -f $basename.out.$$.sdl
echo "rm -f $basename.out.snb" echo "rm -f $basename.out.$$.snb"
rm -f $basename.out.snb rm -f $basename.out.$$.snb
fi fi
fatalError "Error processing $basename.esis by instant" fatalError "Error processing $basename.$$.esis by instant"
fi fi
else else
${instant} -o $basename.out.sdl \ ${instant} -o $basename.out.$$.sdl \
$mapfiles \ $mapfiles \
-c docbook.cmap \ -c docbook.cmap \
-t docbook.ts \ -t docbook.ts \
$basename.esis 2> $basename.log $basename.$$.esis 2> $basename.$$.log
status=$? status=$?
if ([[ $status -eq 255 ]]) then if ([[ $status -eq 255 ]]) then
warn "Warning(s) processing $basename.esis by instant" warn "Warning(s) processing $basename.$$.esis by instant"
elif ([[ $status -eq 1 ]]) then elif ([[ $status -eq 1 ]]) then
if (( !$debug )); then if (( !$debug )); then
rm -f $basename.esis rm -f $basename.$$.esis
rm -f $basename.out.sdl rm -f $basename.out.$$.sdl
rm -f $basename.out.snb rm -f $basename.out.$$.snb
fi fi
fatalError "Error processing $basename.esis by instant" fatalError "Error processing $basename.$$.esis by instant"
fi fi
fi fi
if (( !$debug )); then if (( !$debug )); then
if (( $verbose )); then if (( $verbose )); then
echo "rm -f $basename.esis" echo "rm -f $basename.$$.esis"
fi fi
rm -f $basename.esis rm -f $basename.$$.esis
fi fi
@ -413,60 +413,60 @@ if [[ -a $oname ]] then
fi fi
fi fi
if (( $verbose )); then if (( $verbose )); then
echo "$helptag2 $flags $basename.out.sdl $oname" echo "$helptag2 $flags $basename.out.$$.sdl $oname"
$helptag2 $flags $basename.out.sdl $oname $helptag2 $flags $basename.out.$$.sdl $oname
if (( $? )); then if (( $? )); then
if (( !$debug )); then if (( !$debug )); then
echo "rm -f $basename.out.sdl" echo "rm -f $basename.out.$$.sdl"
rm -f $basename.out.sdl rm -f $basename.out.$$.sdl
echo "rm -f $basename.out.snb" echo "rm -f $basename.out.$$.snb"
rm -f $basename.out.snb rm -f $basename.out.$$.snb
echo "rm -f $oname" echo "rm -f $oname"
rm -f $oname rm -f $oname
fi fi
fatalError "Error processing $basename.out.sdl by $helptag2" fatalError "Error processing $basename.out.$$.sdl by $helptag2"
fi fi
else else
$helptag2 $flags $basename.out.sdl $oname 2>/dev/null $helptag2 $flags $basename.out.$$.sdl $oname 2>/dev/null
if (( $? )); then if (( $? )); then
if (( !$debug )); then if (( !$debug )); then
rm -f $basename.out.sdl rm -f $basename.out.$$.sdl
rm -f $basename.out.snb rm -f $basename.out.$$.snb
rm -f $oname rm -f $oname
fi fi
fatalError "Error processing $basename.out.sdl by $helptag2" fatalError "Error processing $basename.out.$$.sdl by $helptag2"
fi fi
fi fi
if (( !$debug )); then if (( !$debug )); then
if (( $verbose )); then if (( $verbose )); then
echo "rm -f $basename.out.sdl" echo "rm -f $basename.out.$$.sdl"
fi fi
rm -f $basename.out.sdl rm -f $basename.out.$$.sdl
if (( $verbose )); then if (( $verbose )); then
echo "rm -f $basename.out.snb" echo "rm -f $basename.out.$$.snb"
fi fi
rm -f $basename.out.snb rm -f $basename.out.$$.snb
fi fi
# If we get here, all went well - we know the .log files are writable. # If we get here, all went well - we know the .log files are writable.
if (( !$debug )); then if (( !$debug )); then
if (( $verbose )); then if (( $verbose )); then
echo "cat $basename.out.err >> $basename.log" echo "cat $basename.out.$$.err >> $basename.$$.log"
fi fi
cat $basename.out.err >> $basename.log cat $basename.out.$$.err >> $basename.$$.log
if (( $verbose )); then if (( $verbose )); then
echo "rm -f $basename.out.err" echo "rm -f $basename.out.$$.err"
fi fi
rm -f $basename.out.err rm -f $basename.out.$$.err
fi fi
# if we're not in debug mode and the log file wasn't requested, remove it # if we're not in debug mode and the log file wasn't requested, remove it
if (( !$debug & !$log )); then if (( !$debug & !$log )); then
if (( $verbose )); then if (( $verbose )); then
echo "rm -f $basename.log" echo "rm -f $basename.$$.log"
fi fi
rm -f $basename.log rm -f $basename.$$.log
fi fi
if (( $verbose )); then if (( $verbose )); then