xref: /netbsd-src/external/gpl3/gcc.old/dist/gcc/doc/install.texi2html (revision 8feb0f0b7eaff0608f8350bbfa3098827b4bb91b)
11debfc3dSmrg#!/bin/sh
21debfc3dSmrg#
31debfc3dSmrg# Convert the GCC install documentation from texinfo format to HTML.
41debfc3dSmrg#
51debfc3dSmrg# $SOURCEDIR and $DESTDIR, resp., refer to the directory containing
61debfc3dSmrg# the texinfo source and the directory to put the HTML version in.
71debfc3dSmrg#
8*8feb0f0bSmrg# Copyright (C) 2001-2020 Free Software Foundation, Inc.
91debfc3dSmrg# Originally by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>, June 2001.
101debfc3dSmrg#
111debfc3dSmrg# This file is part of GCC.
121debfc3dSmrg#
131debfc3dSmrg# GCC is free software; you can redistribute it and/or modify it under
141debfc3dSmrg# the terms of the GNU General Public License as published by the Free
151debfc3dSmrg# Software Foundation; either version 3, or (at your option) any later
161debfc3dSmrg# version.
171debfc3dSmrg#
181debfc3dSmrg# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
191debfc3dSmrg# WARRANTY; without even the implied warranty of MERCHANTABILITY or
201debfc3dSmrg# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
211debfc3dSmrg# for more details.
221debfc3dSmrg#
231debfc3dSmrg# You should have received a copy of the GNU General Public License
241debfc3dSmrg# along with GCC; see the file COPYING3.  If not see
251debfc3dSmrg# <http://www.gnu.org/licenses/>.
261debfc3dSmrg
271debfc3dSmrgset -e
281debfc3dSmrg
291debfc3dSmrgSOURCEDIR=${SOURCEDIR-.}
301debfc3dSmrgDESTDIR=${DESTDIR-HTML}
311debfc3dSmrg
321debfc3dSmrgMAKEINFO=${MAKEINFO-makeinfo}
331debfc3dSmrg
341debfc3dSmrgif [ ! -d $DESTDIR ]; then
351debfc3dSmrg    mkdir -p $DESTDIR
361debfc3dSmrgfi
371debfc3dSmrg
381debfc3dSmrg# Generate gcc-vers.texi.
391debfc3dSmrg(
401debfc3dSmrg   echo "@set version-GCC $(cat $SOURCEDIR/../BASE-VER)"
411debfc3dSmrg   if [ "$(cat $SOURCEDIR/../DEV-PHASE)" = "experimental" ]; then
421debfc3dSmrg      echo "@set DEVELOPMENT"
431debfc3dSmrg   else
441debfc3dSmrg      echo "@clear DEVELOPMENT"
451debfc3dSmrg   fi
461debfc3dSmrg   echo "@set srcdir $SOURCEDIR/.."
471debfc3dSmrg) > $DESTDIR/gcc-vers.texi
481debfc3dSmrg
491debfc3dSmrgfor x in index.html specific.html prerequisites.html download.html configure.html \
501debfc3dSmrg         build.html test.html finalinstall.html binaries.html old.html \
511debfc3dSmrg         gfdl.html
521debfc3dSmrgdo
531debfc3dSmrg    define=`echo $x | sed -e 's/\.//g'`
541debfc3dSmrg    echo "define = $define"
551debfc3dSmrg    $MAKEINFO --no-number-sections -I $SOURCEDIR -I $SOURCEDIR/include -I $DESTDIR $SOURCEDIR/install.texi --html --no-split -D$define -o$DESTDIR/temp.html
561debfc3dSmrg    # Use sed to work around makeinfo 4.7 brokenness.
571debfc3dSmrg    sed -e 's/_002d/-/g' -e 's/_002a/*/g' $DESTDIR/temp.html > $DESTDIR/$x
581debfc3dSmrg    rm $DESTDIR/temp.html
591debfc3dSmrgdone
601debfc3dSmrg
611debfc3dSmrgrm $DESTDIR/gcc-vers.texi
62