X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=maintainer-scripts%2Fupdate_web_docs;h=6c14c68b0707bbd454160afc734a8a049ce54e21;hp=cfaf80f46043bbfeb146d1ec6d1e293451609395;hb=2fe86132c703f19022c559e2abbefa3ef2a9ccff;hpb=fcf12682a3779e7a22bc08e192c7f05152541fe7 diff --git a/maintainer-scripts/update_web_docs b/maintainer-scripts/update_web_docs index cfaf80f4604..6c14c68b070 100755 --- a/maintainer-scripts/update_web_docs +++ b/maintainer-scripts/update_web_docs @@ -1,11 +1,17 @@ #!/bin/sh -x +# Generate HTML documentation from GCC Texinfo docs. +# This version is for GCC 3.1 and later versions. + # Run this from /tmp. CVSROOT=/cvs/gcc export CVSROOT PATH=/usr/local/bin:$PATH + WWWBASE=/www/gcc/htdocs +WWWBASE_PREFORMATTED=/www/gcc/htdocs-preformatted +WWWPREPROCESS='/www/gcc/bin/preprocess -r' # Process options -rrelease and -ddirectory RELEASE="" @@ -21,7 +27,7 @@ while [ $# -gt 0 ]; do RELEASE="${1#-r}" if [ -z "$RELEASE" ]; then shift - RELEASE="${1#-r}" + RELEASE="$1" if [ -z "$RELEASE" ]; then echo "No release specified with -r" >&2 exit 1 @@ -36,7 +42,7 @@ while [ $# -gt 0 ]; do SUBDIR="${1#-d}" if [ -z "$SUBDIR" ]; then shift - SUBDIR="${1#-d}" + SUBDIR="$1" if [ -z "$SUBDIR" ]; then echo "No subdirectory specified with -d" >&2 exit 1 @@ -68,9 +74,6 @@ fi if [ -z "$RELEASE" ]; then RELEASE=HEAD - DO_THANKS_HTML=y -else - DO_THANKS_HTML=n fi WORKDIR=/tmp/gcc-doc-update.$$ @@ -80,23 +83,54 @@ WORKDIR=/tmp/gcc-doc-update.$$ cd $WORKDIR # Find all the texi files in the repository, except those in directories -# we do not care about (Attic, texinfo, etc). -find $CVSROOT/gcc -name \*.texi,v -print | fgrep -v -f/home/gccadmin/scripts/doc_exclude | sed -e s#$CVSROOT/##g -e s#,v##g > FILES +# we do not care about (texinfo, etc). +find $CVSROOT/gcc -name \*.texi,v -print | fgrep -v -f/home/gccadmin/scripts/doc_exclude | sed -e s#$CVSROOT/##g -e s#,v##g -e s#Attic/##g > FILES + + +# Checkout all the texi files. +cvs -Q export -r$RELEASE `cat FILES` gcc/gcc/doc/install.texi2html gcc/gcc/doc/include/texinfo.tex gcc/gcc/ada/xgnatugn.adb gcc/gcc/ada/ug_words gcc/gcc/BASE-VER gcc/gcc/DEV-PHASE + +# Build a tarball of the sources. +tar cf docs-sources.tar gcc +# The directory to pass to -I; this is the one with texinfo.tex +# and fdl.texi. +includedir=gcc/gcc/doc/include -# Checkout all the texi files and get them into a single directory. -# If we ever have texi files with the same name we'll have to do this -# differently. -cvs -Q co -r$RELEASE `cat FILES` -mv `find . -name \*.texi -print` . +MANUALS="cpp cppinternals fastjar gcc gccint gcj g77 gfortran gnat_ug_unx gnat_ug_vms gnat_ug_vxw gnat_ug_wnt gnat_ugn_unw gnat-style gnat_rm libiberty porting" -# Now convert the relavent files from texi to html -for file in c-tree cpp chill cppinternals gcc gcj gxxint g77 objc-features porting; do - /usr/local/bin/texi2html -glossary -menu -split_chapter ${file}.texi +# Generate gnat_ugn_unw + +if [ -f gcc/gcc/ada/xgnatugn.adb ]; then + gnatmake -q gcc/gcc/ada/xgnatugn + ./xgnatugn unw gcc/gcc/ada/gnat_ugn.texi \ + gcc/gcc/ada/ug_words gnat_ugn_unw.texi +fi + +# Generate gcc-vers.texi. +( + echo "@set version-GCC $(cat gcc/gcc/BASE-VER)" + if [ "$(cat gcc/gcc/DEV-PHASE)" = "experimental" ]; then + echo "@set DEVELOPMENT" + else + echo "@clear DEVELOPMENT" + fi +) > $includedir/gcc-vers.texi + +# Now convert the relevant files from texi to HTML, PDF and PostScript. +for file in $MANUALS; do + filename=`find . -name ${file}.texi` + if [ "${filename}" ]; then + makeinfo --html -I ${includedir} -I `dirname ${filename}` ${filename} + tar cf ${file}-html.tar ${file}/*.html + texi2dvi -I ${includedir} ${filename} $file.gz done @@ -105,44 +139,42 @@ done today=`date +%d` if test $today = 15; then find $DOCSDIR -type f -maxdepth 1 -print | grep -v index.html | xargs rm + for m in $MANUALS; do + rm $DOCSDIR/$m/*.html $DOCSDIR/$m/*.html.gz + done fi -# And copy the resulting html files to the web server -for file in *.html; do +# And copy the resulting files to the web server +for file in */*.html *.ps *.pdf *.tar; do cat $DOCSDIR/$file | - sed -e '/^