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
# 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
# languages
APPBUILDER = AppBuilder.sdl

View file

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

View file

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

View file

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

View file

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

View file

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