From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79470 invoked by alias); 12 Jun 2016 10:53:51 -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 79457 invoked by uid 89); 12 Jun 2016 10:53:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=headache X-HELO: ainaz.pair.com Received: from ainaz.pair.com (HELO ainaz.pair.com) (209.68.2.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 12 Jun 2016 10:53:40 +0000 Received: from [192.168.0.3] (vie-91-186-158-235.dsl.sil.at [91.186.158.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ainaz.pair.com (Postfix) with ESMTPSA id E8A5D3F427; Sun, 12 Jun 2016 06:53:37 -0400 (EDT) Date: Sun, 12 Jun 2016 10:53:00 -0000 From: Gerald Pfeifer To: Jonathan Wakely cc: gcc-patches@gcc.gnu.org Subject: Re: [patch] generate_libstdcxx_web_docs: Use realpath to get absolute path In-Reply-To: <20160428125337.GL4241@redhat.com> Message-ID: References: <20160428125337.GL4241@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY=cPi+lWm09sJ+d57q Content-Disposition: INLINE X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00882.txt.bz2 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --cPi+lWm09sJ+d57q Content-Type: text/plain; CHARSET=US-ASCII; FORMAT=flowed Content-Disposition: INLINE Content-length: 1056 Hi Jonathan, On Thu, 28 Apr 2016, Jonathan Wakely wrote: > 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? realpath also exists on other systems, though the options you used are not portable. How about going with your patch, just without the -es options? (I verified that this works on FreeBSD, for example.) > I could instead use a Bashism like: > > DOCSDIR=$(test "${2:0:1}" = "/" && echo "$2" || echo "$PWD/$2") That gives me major headache. :-) > 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. Let's go with your patch for trunk and the GCC 6 branch. Beyond those, I would not care, though if you feel about it a bit more strongly, no objection. Note, there is a second hunk in the patch you posted (cf. the attached) that makes sense, but will need to be added to the ChangeLog. Gerald --cPi+lWm09sJ+d57q Content-Type: text/x-patch; CHARSET=us-ascii Content-Description: 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--