While debugging an issue with our online documentation at https://gcc.gnu.org/onlinedocs (which I traced down to a bug with the old version of makeinfo on that host) I noticed WWWBASE was hardcoded without a way to override without changing the script.
That's obviously not too helpful when running on a local system, and I addressed it by the patch below, also adding a comment on the way. Tested on my notebook (modulo jit) and gcc.gnu.org, and committed. Gerald 2017-02-28 Gerald Pfeifer <ger...@pfeifer.com> * update_web_docs_svn: Remove a reference to GCC 3.1. Describe settings to tweak if running on a host different from gcc.gnu.org. (WWWBASE): Allow override via the environment. Also check for existance. Index: update_web_docs_svn =================================================================== --- update_web_docs_svn (revision 245750) +++ update_web_docs_svn (working copy) @@ -1,7 +1,10 @@ #!/bin/sh # Generate HTML documentation from GCC Texinfo docs. -# This version is for GCC 3.1 and later versions. +# +# If you want to run this on a machine different from gcc.gnu.org, you +# may need to adjust SVNROOT and WWWBASE below (or override them via the +# environment). set -e @@ -31,7 +34,7 @@ CSS=/gcc.css -WWWBASE=/www/gcc/htdocs +WWWBASE=${WWWBASE:-"/www/gcc/htdocs"} WWWBASE_PREFORMATTED=/www/gcc/htdocs-preformatted WWWPREPROCESS='/www/gcc/bin/preprocess -r' @@ -90,6 +93,11 @@ DOCSDIR=$WWWBASE/onlinedocs/$SUBDIR fi +if [ ! -d $WWWBASE ]; then + echo "WWW base directory \"$WWWBASE\" does not exist." >&2 + exit 1 +fi + if [ ! -d $DOCSDIR ]; then mkdir $DOCSDIR chmod g+w $DOCSDIR