This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] generate_libstdcxx_web_docs: Use realpath to get absolute path
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 28 Apr 2016 13:53:37 +0100
- Subject: [patch] generate_libstdcxx_web_docs: Use realpath to get absolute path
- Authentication-results: sourceware.org; auth=none
When I ran maintainer-scripts/generate_libstdcxx_web_docs to make the
onlinedocs/libstdc++ for 6.1 the other day it failed because I use a
relative path for the output dir argument. This would make it work,
but is relying on GNU realpath OK?
I think in practice nobody is going to generate those docs on anything
other than GNU/Linux, but I could instead use a Bashism like:
DOCSDIR=$(test "${2:0:1}" = "/" && echo "$2" || echo "$PWD/$2")
If it's OK for trunk it could go on the banches too, for generating
the 4.9.4, 5.4 and 6.2 docs.
commit b46ffd26927df284ea3c4760a40ce716e8e25fa2
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Apr 27 14:52:03 2016 +0100
* generate_libstdcxx_web_docs: Use realpath to get absolute path.
diff --git a/maintainer-scripts/generate_libstdcxx_web_docs b/maintainer-scripts/generate_libstdcxx_web_docs
index 700e522..5878dfe 100755
--- a/maintainer-scripts/generate_libstdcxx_web_docs
+++ b/maintainer-scripts/generate_libstdcxx_web_docs
@@ -3,7 +3,7 @@
# i.e. http://gcc.gnu.org/onlinedocs/gcc-x.y.z/libstdc++*
SRCDIR=${1}
-DOCSDIR=${2}
+DOCSDIR=$(realpath -es ${2})
if ! [ $# -eq 2 -a -x "${SRCDIR}/configure" -a -d "${DOCSDIR}" ]
then
@@ -34,6 +34,9 @@ set -x
${SRCDIR}/configure --enable-languages=c,c++ --disable-gcc $disabled_libs --docdir=/docs
eval `grep '^target=' config.log`
make configure-target
+# If the following step fails with an error like
+# ! LaTeX Error: File `xtab.sty' not found.
+# then you need to install the relevant TeX package e.g. texlive-xtab
make -C $target/libstdc++-v3 doc-install-html doc-install-xml doc-install-pdf DESTDIR=$DESTDIR
cd $DESTDIR/docs
mkdir libstdc++