From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128827 invoked by alias); 28 Apr 2016 12:53:47 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 128802 invoked by uid 89); 28 Apr 2016 12:53:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:maintai, Hx-languages-length:1724, 54 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 28 Apr 2016 12:53:39 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B730A345586 for ; Thu, 28 Apr 2016 12:53:38 +0000 (UTC) Received: from localhost (ovpn-116-24.ams2.redhat.com [10.36.116.24]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3SCrbCb009724 for ; Thu, 28 Apr 2016 08:53:38 -0400 Date: Thu, 28 Apr 2016 12:53:00 -0000 From: Jonathan Wakely To: gcc-patches@gcc.gnu.org Subject: [patch] generate_libstdcxx_web_docs: Use realpath to get absolute path Message-ID: <20160428125337.GL4241@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="cPi+lWm09sJ+d57q" Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2016-04/txt/msg01817.txt.bz2 --cPi+lWm09sJ+d57q Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-length: 541 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. --cPi+lWm09sJ+d57q Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" Content-length: 1128 commit b46ffd26927df284ea3c4760a40ce716e8e25fa2 Author: Jonathan Wakely 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++ --cPi+lWm09sJ+d57q--