diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-04 02:55:08 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-04 02:55:08 +0000 |
commit | f0b332457362b13ff1fb83c2a98e68637cc4c7c7 (patch) | |
tree | 6fe79f2c9f8f83b222b4c4e7514d057df3f5db6d /libstdc++-v3/scripts | |
parent | 83506191a0490d787200b492bd1a73b962675666 (diff) | |
download | gcc-f0b332457362b13ff1fb83c2a98e68637cc4c7c7.tar.gz |
2010-03-03 Benjamin Kosnik <bkoz@redhat.com>
* doc/Makefile.am: Re-organize xml sources.
(doc-latex-doxygen): New.
(doc-pdf-doxygen): New.
(stamp-xml-doxygen, stamp-latex-doxygen): New.
* doc/Makefile.in: Regenerate.
* doc/doxygen/user.cfg.in: Add support here.
* doc/xml/manual/appendix_contributing.xml: Add specifics.
* doc/xml/manual/concurrency.xml: New.
* doc/xml/manual/atomics.xml: New.
* doc/xml/manual/spine.xml: Adjust.
* doc/xml/manual/diagnostics.xml: Adjust.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157214 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/scripts')
-rw-r--r-- | libstdc++-v3/scripts/run_doxygen | 125 |
1 files changed, 75 insertions, 50 deletions
diff --git a/libstdc++-v3/scripts/run_doxygen b/libstdc++-v3/scripts/run_doxygen index 9ea93b9d818..39a2e95ad89 100644 --- a/libstdc++-v3/scripts/run_doxygen +++ b/libstdc++-v3/scripts/run_doxygen @@ -1,10 +1,10 @@ #!/bin/bash # Runs doxygen and massages the output files. -# Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009 +# Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009, 2010 # Free Software Foundation, Inc. # -# Synopsis: run_doxygen --mode=[html|man|xml] --host_alias=<alias> \ +# Synopsis: run_doxygen --mode=[html|latex|man|xml] --host_alias=<alias> \ # v3srcdir \ # v3builddir \ # shortname @@ -17,7 +17,7 @@ DOXYVER=1.6.1 find_doxygen() { local -r v_required=`echo $DOXYVER | \ - awk -F. '{if(NF<3)$3=0;print ($1*100+$2)*100+$3}'` + awk -F. '{if(NF<3)$3=0;print ($1*100+$2)*100+$3}'` local testing_version doxygen maybedoxy v_found # thank you goat book set `IFS=:; X="$PATH:/usr/local/bin:/bin:/usr/bin"; echo $X` @@ -28,16 +28,16 @@ find_doxygen() { test -f "$maybedoxy" && testing_version=`$maybedoxy --version` if test -n "$testing_version"; then v_found=`echo $testing_version | \ - awk -F. '{if(NF<3)$3=0;print ($1*100+$2)*100+$3}'` + awk -F. '{if(NF<3)$3=0;print ($1*100+$2)*100+$3}'` if test $v_found -ge $v_required; then - doxygen="$maybedoxy" - break + doxygen="$maybedoxy" + break fi fi done if test -z "$doxygen"; then - echo run_doxygen error: Could not find Doxygen $DOXYVER in path. 1>&2 - print_usage + echo run_doxygen error: Could not find Doxygen $DOXYVER in path. 1>&2 + print_usage fi # We need to use other tools from the same package/version. echo :: Using Doxygen tools from ${dir}. @@ -48,11 +48,12 @@ find_doxygen() { print_usage() { cat 1>&2 <<EOF Usage: run_doxygen --mode=MODE --host_alias=BUILD_ALIAS [<options>] - <v3-src-dir> <v3-build-dir> <shortnamesp> + <v3-src-dir> <v3-build-dir> <shortnamesp> MODE is one of: - html Generate user-level HTML library documentation. - man Generate user-level man pages. - xml Generate user-level XML pages. + html Generate user-level HTML library documentation. + man Generate user-level man pages. + xml Generate user-level XML pages. + latex Generate user-level LaTeX pages. BUILD_ALIAS is the GCC build alias set at configure time. @@ -75,25 +76,25 @@ parse_options() { case "$o" in --mode=*) - mode=$arg ;; + mode=$arg ;; --host_alias=*) - host_alias=$arg ;; + host_alias=$arg ;; --mode | --host_alias | --help | -h) - print_usage ;; + print_usage ;; *) - # this turned out to be a mess, maybe change to --srcdir=, etc - if test $srcdir = unset; then - srcdir=$o - elif test $outdir = unset; then - builddir=${o} - outdir=${o}/doc/doxygen - elif test $shortname = unset; then - shortname=$o - else - echo run_doxygen error: Too many arguments 1>&2 - exit 1 - fi - ;; + # this turned out to be a mess, maybe change to --srcdir=, etc + if test $srcdir = unset; then + srcdir=$o + elif test $outdir = unset; then + builddir=${o} + outdir=${o}/doc/doxygen + elif test $shortname = unset; then + shortname=$o + else + echo run_doxygen error: Too many arguments 1>&2 + exit 1 + fi + ;; esac done } @@ -106,8 +107,9 @@ srcdir=unset outdir=unset shortname=unset do_html=false -do_man=false -do_xml=false +do_man=false +do_xml=false +do_latex=false enabled_sections= generate_tagfile= DATEtext=`date '+%Y-%m-%d'` @@ -130,6 +132,10 @@ case x"$mode" in enabled_sections=maint generate_tagfile="$outdir/html/libstdc++.tag" ;; + xlatex) + do_latex=true + enabled_sections=maint + ;; xman) do_man=true ;; @@ -156,12 +162,6 @@ esac mkdir -p $outdir chmod u+w $outdir -# work around a stupid doxygen bug -if $do_man; then - mkdir -p $outdir/man/man3/ext - chmod -R u+w $outdir/man/man3/ext -fi - if $do_xml; then mkdir -p $outdir/xml fi @@ -176,6 +176,34 @@ fi -e "s=@host_alias@=${host_alias}=g" \ -e "s=@enabled_sections@=${enabled_sections}=" \ -e "s=@do_html@=${do_html}=" \ + -e "s=@do_latex@=${do_latex}=" \ + -e "s=@do_man@=${do_man}=" \ + -e "s=@do_xml@=${do_xml}=" \ + -e "s=@generate_tagfile@=${generate_tagfile}=" \ + ${srcdir}/doc/doxygen/user.cfg.in > ${outdir}/${mode}.cfg + echo :: NOTE that this may take some time... + echo doxygen ${outdir}/${mode}.cfg + doxygen ${outdir}/${mode}.cfg + echo :: Finished, exit code was $? +) +ret=$? +test $ret -ne 0 && exit $ret + +if $do_latex; then + mkdir -p $outdir/latex +fi + +( + set -e + cd $builddir + sed -e "s=@outdir@=${outdir}=g" \ + -e "s=@srcdir@=${srcdir}=g" \ + -e "s=@shortname@=${shortname}=g" \ + -e "s=@builddir@=${builddir}=g" \ + -e "s=@host_alias@=${host_alias}=g" \ + -e "s=@enabled_sections@=${enabled_sections}=" \ + -e "s=@do_html@=${do_html}=" \ + -e "s=@do_latex@=${do_latex}=" \ -e "s=@do_man@=${do_man}=" \ -e "s=@do_xml@=${do_xml}=" \ -e "s=@generate_tagfile@=${generate_tagfile}=" \ @@ -183,7 +211,14 @@ fi echo :: NOTE that this may take some time... echo doxygen ${outdir}/${mode}.cfg doxygen ${outdir}/${mode}.cfg + + # Also drop in the header file and style sheet + cd ${outdir}/${mode} + doxygen -w latex header.tex doxygen.sty echo :: Finished, exit code was $? + echo :: + echo :: LaTeX pages begin with + echo :: ${outdir}/latex/refman.tex ) ret=$? test $ret -ne 0 && exit $ret @@ -206,13 +241,6 @@ if $do_html; then sed -e 's=\(::[[:alnum:]_]*\)< .* >=\1=' annotated.html > annstrip.html mv annstrip.html annotated.html - # Work around a bug in doxygen 1.3. -# for f in class*html struct*html; do - for f in class*html; do - sed '1,10s!^<title> Template!<title>Template !' $f > TEMP - mv TEMP $f - done - cp ${srcdir}/doc/doxygen/tables.html tables.html echo :: echo :: HTML pages begin with @@ -229,9 +257,6 @@ echo :: echo :: Fixing up the man pages... cd $outdir/man/man3 -# here's the other end of the "stupid doxygen bug" mentioned above -rm -rf ext - # File names with embedded spaces (EVIL!) need to be....? renamed or removed? find . -name "* *" -print0 | xargs -0r rm # requires GNU tools @@ -370,18 +395,18 @@ done # Generic removal bits, where there are things in the generated man # pages that need to be killed. for f in *_libstdc__-v3_*; do - rm $f + rm $f done for f in *_src_*; do - rm $f + rm $f done # Also, for some reason, typedefs don't get their own man pages. Sigh. for f in ios streambuf istream ostream iostream stringbuf \ - istringstream ostringstream stringstream filebuf ifstream \ - ofstream fstream string; + istringstream ostringstream stringstream filebuf ifstream \ + ofstream fstream string; do echo ".so man3/std::basic_${f}.3" > std::${f}.3 echo ".so man3/std::basic_${f}.3" > std::w${f}.3 |