2 # Generate the libstdc++ onlinedocs for a GCC release
3 # i.e. http://gcc.gnu.org/onlinedocs/gcc-x.y.z/libstdc++*
8 if ! [ $# -eq 2 -a -x "${SRCDIR}/configure" -a -d "${DOCSDIR}" ]
10 echo "Usage: $0 <gcc src dir> <doc output dir>" >&2
16 # Check we have some of the required tools
17 for i
in doxygen dot dblatex pdflatex makeindex
19 echo -n "Checking for $i... "
24 WORKDIR
=`mktemp -d $PWD/build.XXXXXX`
25 DESTDIR
=`mktemp -d $PWD/dest.XXXXXX`
28 for dir
in ${SRCDIR}/lib
*
31 [ $dir == 'libstdc++-v3' ] || disabled_libs
="$disabled_libs --disable-$dir"
34 ${SRCDIR}/configure
--enable-languages=c
,c
++ --disable-gcc $disabled_libs --docdir=/docs
35 eval `grep '^target=' config.log`
37 make -C $target/libstdc
++-v3 doc-install-html doc-install-xml doc-install-pdf DESTDIR
=$DESTDIR
40 for which in api manual
42 if [ -f libstdc
++-$which-single.xml
] # Only needed for GCC 4.7.x
44 mv libstdc
++-$which-single.xml libstdc
++-$which.xml
46 gzip --best libstdc
++-$which.xml
47 gzip --best libstdc
++-$which.pdf
48 mv libstdc
++-$which{.html
,-html}
49 tar czf libstdc
++-$which-html.
tar.gz libstdc
++-$which-html
50 mv libstdc
++-$which-html libstdc
++/$which
52 mv *.gz libstdc
++ $DOCSDIR/