URL
https://opencores.org/ocsvn/or1k_old/or1k_old/trunk
Subversion Repositories or1k_old
[/] [or1k_old/] [trunk/] [rtems-20020807/] [doc/] [gnu_docs/] [gen_docs] - Rev 1782
Compare with Previous | Blame | View Log
#! /bin/sh## This script is intended to be run in the build directory of a software# package including documentation in texinfo format. The basic operation# of this script is to:# + find all ".dvi" files from the current directory down,# + for each dvi file# + install the dvi file# + generate PostScript files for the dvi file# + install the PostScript file# + if there is texinfo source for this dvi file# install the info files# generate PDF from the texinfo source# install the PDF file# generate HTML from the texinfo source# install the HTML file### Ralf... where do these come from using autoconf?srcdir=/usr1/rtems/work/rtems-doc/texi2www=${srcdir}/tools/texi2www/texi2wwwgnu_docs=${srcdir}/gnu_docsimages=${srcdir}/imagesinstall_base=/home/httpd/html/rtems/rtemsdoc-4.5.1-pre3install_share=/home/httpd/html/rtems/rtemsdoc-4.5.1-pre3/share/toolsdocinstall_info=/home/httpd/html/rtems/rtemsdoc-4.5.1-pre3/info#if [ $? -ne 1 ] ; then# echo "Usage: $0 install_directory"# exit 1#fiif [ ! -d ${install} ] ; thenecho "${install} is not a directory"exit 1fi#ECHO=echoSTARTDIR=`pwd`find . -name "*.dvi" | while read filedocd $STARTDIRcd `dirname $file`echo $filei=`basename $file`####b=`echo $i | cut -d'.' -f1`echo $bif [ -d ${install}/${b} ] ; thenecho "Cleaning install point for ${b}"${ECHO} rm -rf ${install}/html/${b}fifor dir_to_do in ${install_info} \${install_share}/ps \${install_share}/pdf ${install_share}/dvi \${install_share}/html/${b}dotest -d ${dir_to_do} || mkdir -p ${dir_to_do}doneecho "Copying DVI for ${b}"echo "+ cp ${b}.dvi ${install_share}/dvi/${b}.dvi"${ECHO} cp ${b}.dvi ${install_share}/dvi/${b}.dviecho "Generating PS for ${b}"echo "+ dvips -o ${install_share}/ps/${b}.ps ${b}.dvi"${ECHO} dvips -o ${install_share}/ps/${b}.ps ${b}.dvi# unfortunately the .dvi names are not always the same. :(case ${b} inhistory) tsrc=hist ;;readline) tsrc=rlman ;;*) tsrc=${b} ;;esaccase ${b} inrefcard)cp ${gnu_docs}/refcard.html ${install_share}/${b};;*)# for some reason chill installs the dvi 1 directory up.test ${b} = "chill" && cd chif [ -r ${tsrc}.texi ] ; thenext=texielif [ -r ${tsrc}.texinfo ] ; thenext=texinfoelseecho "***echo "*** Cannot find a texi or texinfo file for ${b}"echo "***exit 1fiecho "Copying INFO for ${b}"${ECHO} cp ${b}.info* ${install_info}case ${b} ing77) bad_for_pdf="yes" ;;*) bad_for_pdf="no" ;;esaccase ${b} ingdb) extraargs_for_pdf="-I ../../readline/doc" ;;*) extraargs_for_pdf="" ;;esacif [ ${bad_for_pdf} = "yes" ] ; thenecho "*** "echo "*** Skipping PDF for ${b}"echo "*** "elseecho "Generating PDF for ${b}"${ECHO} texi2pdf ${extraargs_for_pdf} ${tsrc}.${ext} && \${ECHO} cp ${tsrc}.pdf ${install_share}/pdf/${b}.pdffi# until texi2www is modified to take a search pathcase ${b} ingdb)sed -e 's/^ @/@/' <../../readline/doc/rluser.texinfo >rluser.texinfocp ../../readline/doc/inc-hist.texi .;;readline)cp rluser.texinfo rluser.texinfo.tmpsed -e 's/^ @/@/' <../../readline/doc/rluser.texinfo >rluser.texinform -f rluser.texinfo.tmp;;*) ;;esacecho "Generating HTML for ${b}"${ECHO} ${texi2www} \-dirfile ../index.html \-header ${gnu_docs}/gnu_header.html \-footer ${gnu_docs}/gnu_footer.html \-icons ../images -dir ${install_share}/html/${b} \${tsrc}.${ext};;esacdoneecho "Installing graphics"test -d ${install_share}/html/images || mkdir ${install_share}/html/imagescd ${images}for f in dir-arrow.gif dvi.gif missing-arrow.gif next-arrow.gif oaronly.jpg \pdf.gif pdf1.gif prev-arrow.gif ps.gif up-arrow.gifdocp ${f} ${install_share}/html/images/${f}doneecho "Installing top level HTML indices"cp ${gnu_docs}/index.html ${install_share}/html/index.htmlcp ${gnu_docs}/rtems_tools_index.html ${install_share}/../index.html# Now deal with the reference cardset -xtest -d ${install_share}/html/refcard || mkdir ${install_share}/html/refcardcp ${gnu_docs}/refcard.html ${install_share}/html/refcard/refcard.htmlexit 0
