4 echo "build_html.sh [-Dh?]"
5 echo " -D Enable simple debugging of this script"
8 echo "Build the html version of the manual, including both the single"
9 echo "page version and the multi-page version. This also builds all the"
10 echo "category information."
14 while getopts "h?D" arg
23 # If output dir exists, remove it so we start clean
24 if [ -d tmp_html
]; then
30 for f
in @abs_srcdir@
/*.texi
32 filenamebase
=`echo $f | @SED@ -e 's/^.*\///;s/\.texi//'`
33 @SED@
-e "s/^@\(deffn\|defvr\)[x]* *{[^}]*} *\([^[:blank:]]*\).*/@anchor{Item: $filenamebase\/\1\/\2}\n&/;" -e "s/^@node *\([^,]*\).*/@anchor{Item: $filenamebase\/node\/\1}\n&/" $f \
34 | @AWK@
'BEGIN { iftex = 0; } /^@iftex/ {iftex = 1;} {if (!iftex) {print;}} /^@end iftex/ {iftex = 0;}' \
35 | @AWK@
'/@anchor/ {if (!(foo[$0])) {foo[$0] = 1; print;}} !/@anchor/' > $
(basename $f)
38 catprogname
=make-categories.lisp
41 filenamebase
=`echo $f | @SED@ -e 's/^.*\///;s/\.texi//'`
42 echo "(setq *filenamebase* \"$filenamebase\")"
44 done | @AWK@
'!/^@c / && !/^@c$/ && (/^@deffn/ || /^@defvr/ || /^@end deffn/ || /^@end defvr/ || /@category/ || /@node/ || /^.setq .filenamebase/)' | @SED@
-f @abs_srcdir@
/..
/extract_categories1.
sed | @AWK@
-f @abs_srcdir@
/..
/extract_categories1.
awk > $catprogname
46 if [ "@DEFAULTLISP@" = "gcl" ]
47 then lispprog
="@GCL_NAME@"
48 lispargs
="-batch -load $catprogname"
49 elif [ "@DEFAULTLISP@" = "clisp" ]
50 then lispprog
="@CLISP_NAME@"
51 lispargs
="$catprogname"
52 elif [ "@DEFAULTLISP@" = "cmucl" ]
53 then lispprog
="@CMUCL_NAME@"
54 lispargs
="-load $catprogname -eval (quit)"
55 elif [ "@DEFAULTLISP@" = "scl" ]
56 then lispprog
="@SCL_NAME@"
57 lispargs
="-load $catprogname -eval (quit)"
58 elif [ "@DEFAULTLISP@" = "ecl" ]
59 then lispprog
="@ECL_NAME@"
60 lispargs
="--shell $catprogname"
61 elif [ "@DEFAULTLISP@" = "ccl64" ]
62 then lispprog
="@CCL64_NAME@"
63 lispargs
="--load $catprogname --eval (quit)"
64 # NOT SURE ABOUT OPENMCL; SAME ARGS AS CCL/CCL64 OR DIFFERENT ??
65 elif [ "@DEFAULTLISP@" = "ccl" -o "@DEFAULTLISP@" = "openmcl" ]
66 then lispprog
="@OPENMCL_NAME@"
67 lispargs
="--load $catprogname --eval (quit)"
68 elif [ "@DEFAULTLISP@" = "sbcl" ]
69 then lispprog
="@SBCL_NAME@"
70 lispargs
="--script $catprogname"
71 elif [ "@DEFAULTLISP@" = "abcl" ]
73 lispargs
="-jar @ABCL_JAR@ --load $catprogname --eval (quit)"
74 elif [ "@DEFAULTLISP@" = "acl" ]
75 then lispprog
="@ACL_NAME@"
76 lispargs
="-L $catprogname --kill"
78 echo "$0: DEFAULTLISP = @DEFAULTLISP@ not recognized, assume '@DEFAULTLISP@ $catprogname' is acceptable."
79 lispprog
="@DEFAULTLISP@"
80 lispargs
="$catprogname"
83 echo "$0: execute category program: \"$lispprog\" $lispargs"
86 @SED@
-e 's/^@bye/@node Documentation Categories, , Function and Variable Index\n@chapter Documentation Categories/' @abs_srcdir@
/maxima.texi
> maxima.texi
87 ( for f
in Category-
*.texi
; do echo '@include' $f; done ; echo @bye
) >> maxima.texi
89 if [ "X$DEBUG" = "Xyes" ]; then
93 # --no-node-files so we don't have thousands of little html files
94 # --force -e 10000 because the category stuff causes lots of errors.
95 TEXIOPT
="--html -c INLINE_CONTENTS=0 --force -e 10000 --document-lang=ja -I . -I .. -I @abs_srcdir@ -I @abs_srcdir@/.. --css-include=@abs_srcdir@/../manual.css --init-file @abs_srcdir@/../texi2html.init"
96 makeinfo
--split=chapter
--no-node-files --output="@abs_builddir@" $TEXIOPT maxima.texi
97 makeinfo
--no-split --output="@abs_builddir@/maxima_singlepage.html" $TEXIOPT maxima.texi
99 if [ "X$DEBUG" = "Xyes" ]; then
105 if [ "X$DEBUG" != "Xyes" ]; then