From unknown Tue Aug 12 03:20:27 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#7833 <7833@debbugs.gnu.org> To: bug#7833 <7833@debbugs.gnu.org> Subject: Status: automake uses two different values for DejaGNU srcdir Reply-To: bug#7833 <7833@debbugs.gnu.org> Date: Tue, 12 Aug 2025 10:20:27 +0000 retitle 7833 automake uses two different values for DejaGNU srcdir reassign 7833 automake submitter 7833 Ian Lance Taylor severity 7833 normal tag 7833 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 12 17:05:00 2011 Received: (at submit) by debbugs.gnu.org; 12 Jan 2011 22:05:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pd8oO-0007wh-A4 for submit@debbugs.gnu.org; Wed, 12 Jan 2011 17:05:00 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pd8V4-0007Vi-Kl for submit@debbugs.gnu.org; Wed, 12 Jan 2011 16:45:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pd8cL-0006nU-4S for submit@debbugs.gnu.org; Wed, 12 Jan 2011 16:52:33 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:47795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pd8cJ-0006mj-L2 for submit@debbugs.gnu.org; Wed, 12 Jan 2011 16:52:33 -0500 Received: from [140.186.70.92] (port=58326 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pd8cE-0000Jo-9P for bug-automake@gnu.org; Wed, 12 Jan 2011 16:52:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pd8c1-0006du-Pk for bug-automake@gnu.org; Wed, 12 Jan 2011 16:52:14 -0500 Received: from smtp-out.google.com ([216.239.44.51]:24986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pd8c1-0006dn-JL for bug-automake@gnu.org; Wed, 12 Jan 2011 16:52:13 -0500 Received: from kpbe16.cbf.corp.google.com (kpbe16.cbf.corp.google.com [172.25.105.80]) by smtp-out.google.com with ESMTP id p0CLqC5Z002519 for ; Wed, 12 Jan 2011 13:52:12 -0800 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294869132; bh=dTxx+wCiyWY5XOhkTpiAYF0Gfo0=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=ivT7MgNTSAsdeQwm+7ccWeBNN81skLn8TibEEffZrX4PYXeOVSH5nuIjkOMggxQL6 5Pcbkk8tP0f4jc5/GdX4A== Received: from pxi4 (pxi4.prod.google.com [10.243.27.4]) by kpbe16.cbf.corp.google.com with ESMTP id p0CLpkjo017222 for ; Wed, 12 Jan 2011 13:52:11 -0800 Received: by pxi4 with SMTP id 4so141135pxi.16 for ; Wed, 12 Jan 2011 13:52:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:from:to:subject:date:message-id:user-agent :mime-version:content-type; bh=LDZqyTkdfvzseOWP8eQK+EEy6krUDne7v9RXuT37eh4=; b=j21rlOYzu8lgdu2BSBBc+uqwUxSNJd7VaPeFrYYHx2TjSgu/657oUtjsgXbbo85k8K k7FlithhoAG3gH1qJPiQ== DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; b=QoJz0YbEIqtlshqlNdHTaO8zj7vnWDa5qwHneB0lLcFXej+kzIYO505niOM5K49w/8 uaikXxkPPeNPgNzXl1Cg== Received: by 10.142.172.3 with SMTP id u3mr238922wfe.374.1294869131289; Wed, 12 Jan 2011 13:52:11 -0800 (PST) Received: from coign.google.com (dhcp-172-22-121-189.mtv.corp.google.com [172.22.121.189]) by mx.google.com with ESMTPS id w22sm1371410wfd.19.2011.01.12.13.52.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 12 Jan 2011 13:52:10 -0800 (PST) From: Ian Lance Taylor To: bug-automake@gnu.org Subject: automake uses two different values for DejaGNU srcdir Date: Wed, 12 Jan 2011 13:52:09 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 12 Jan 2011 17:04:54 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) When automake is configured to use DejaGNU, it uses two different values for srcdir. There are two different cases in lib/am/dejagnu.am: The first is in check-DEJAGNU: check-DEJAGNU: site.exp ## Life is easiest with an absolute srcdir, so do that. srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ This value is passed to runtest with a --srcdir option. The second is in site.exp: site.exp: Makefile @echo 'Making a new site.exp file...' @echo '## these variables are automatically generated by make ##' >site.tmp @echo '# Do not edit here. If you wish to override these values' >>site.tmp @echo '# edit the last section' >>site.tmp @echo 'set srcdir $(srcdir)' >>site.tmp This value is read by DejaGNU after option processing is complete, effectively overwriting the value passed with the --srcdir option. The value of srcdir stored in site.exp should be an absolute path, just like the value passed to runtest via --srcdir. Ian From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 13 02:07:53 2011 Received: (at 7833) by debbugs.gnu.org; 13 Jan 2011 07:07:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdHHk-0004EQ-SO for submit@debbugs.gnu.org; Thu, 13 Jan 2011 02:07:53 -0500 Received: from mailout-de.gmx.net ([213.165.64.22] helo=mail.gmx.net) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1PdHHh-0004EC-Ua for 7833@debbugs.gnu.org; Thu, 13 Jan 2011 02:07:51 -0500 Received: (qmail invoked by alias); 13 Jan 2011 07:15:20 -0000 Received: from xdsl-78-35-62-165.netcologne.de (EHLO localhost.localdomain) [78.35.62.165] by mail.gmx.net (mp064) with SMTP; 13 Jan 2011 08:15:20 +0100 X-Authenticated: #13673931 X-Provags-ID: V01U2FsdGVkX1+z86gMB8azy4aq17DCnq0vwzSGOL2pXaU5RtzuAk /kFxcosYvY/uvF Received: from ralf by localhost.localdomain with local (Exim 4.69) (envelope-from ) id 1PdHOx-0007cD-V8; Thu, 13 Jan 2011 08:15:19 +0100 Date: Thu, 13 Jan 2011 08:15:19 +0100 From: Ralf Wildenhues To: Ian Lance Taylor Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir Message-ID: <20110113071519.GA28104@gmx.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Institute for Numerical Simulation, University of Bonn User-Agent: Mutt/1.5.20 (2010-08-04) X-Y-GMX-Trusted: 0 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 7833 Cc: 7833@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Hello Ian, thanks for the bug report. * Ian Lance Taylor wrote on Wed, Jan 12, 2011 at 10:52:09PM CET: > When automake is configured to use DejaGNU, it uses two different values > for srcdir. There are two different cases in lib/am/dejagnu.am: > check-DEJAGNU: site.exp > ## Life is easiest with an absolute srcdir, so do that. > srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ > site.exp: Makefile [...] > @echo 'set srcdir $(srcdir)' >>site.tmp > > This value is read by DejaGNU after option processing is complete, > effectively overwriting the value passed with the --srcdir option. > > The value of srcdir stored in site.exp should be an absolute path, just > like the value passed to runtest via --srcdir. I see that passing different values is probably not a good idea. Passing absolute values will probably break builds in a directory tree where some higher-up name component contains spaces, not uncommon on w32 systems. ATM Automake should produce makefiles that work in such environments, as long as $(srcdir) is relative and does not contain spaces. IIUC then using an absolute directory name would break this. Can we avoid it with suitable quoting? Also, this would break moving both source and build trees (in a way that would let relative $(srcdir) remain valid). I'm not quite sure how good we are elsewhere on this front, and it is not such an important feature, but any chance we can retain it? Am I correct in assuming that it is hopeless to assume GCC will work when either values are relative? Cheers, Ralf From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 13 07:45:21 2011 Received: (at submit) by debbugs.gnu.org; 13 Jan 2011 12:45:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdMYK-0005QB-Ni for submit@debbugs.gnu.org; Thu, 13 Jan 2011 07:45:21 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdMYJ-0005Pv-4I for submit@debbugs.gnu.org; Thu, 13 Jan 2011 07:45:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdMfb-0002y9-8h for submit@debbugs.gnu.org; Thu, 13 Jan 2011 07:52:52 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RFC_ABUSE_POST, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:37169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdMfb-0002y5-3L for submit@debbugs.gnu.org; Thu, 13 Jan 2011 07:52:51 -0500 Received: from [140.186.70.92] (port=59595 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdMfX-0004UX-TY for bug-automake@gnu.org; Thu, 13 Jan 2011 07:52:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdMfV-0002wP-6L for bug-automake@gnu.org; Thu, 13 Jan 2011 07:52:47 -0500 Received: from mail-wy0-f169.google.com ([74.125.82.169]:48647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdMfV-0002wL-0b for bug-automake@gnu.org; Thu, 13 Jan 2011 07:52:45 -0500 Received: by wyj26 with SMTP id 26so1673167wyj.0 for ; Thu, 13 Jan 2011 04:52:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:message-id; bh=I+w7sgdUlZvwWatSAyOMfBt+8hPCxi+emzEm/DCpvtE=; b=hveinA3jgVnEl2tTxBXU8yg5VhcZzBHbJ5/SpIGD4qk3AkVy3dPkQgMg7uWsTixG/J 8mk5zihP60v+kD6sRZA046vvG1dEcSUQOZFk5nJUUFKZAiq0jKS0RPqHGlSjaLQWb4uR /IK42zmbYt2UiD+J2A08SEmuIwsJYfoK/Ove4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:message-id; b=bunJRZi7zliY4evMyX1HUeVJv4TKEkIXizdV45ABfj3N8Bq4h+dnvNLh4o//ED7qHi BwThZVTJUccFi7XNLN8xCOEHYnXTCdcxvsoC6C8/F9BjlxV80Fr5s7mCs0JN2/YnS685 rBHVRLjdZNW8fnmFuH7ZkfRt4eJR+gm0v29E0= Received: by 10.216.170.213 with SMTP id p63mr604852wel.37.1294923163954; Thu, 13 Jan 2011 04:52:43 -0800 (PST) Received: from bigio.localnet (host156-37-dynamic.248-95-r.retail.telecomitalia.it [95.248.37.156]) by mx.google.com with ESMTPS id n11sm19211wej.43.2011.01.13.04.52.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 Jan 2011 04:52:42 -0800 (PST) From: Stefano Lattarini To: bug-automake@gnu.org Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir Date: Thu, 13 Jan 2011 13:52:32 +0100 User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_QWvLNPKIEZna5OS" Message-Id: <201101131352.32959.stefano.lattarini@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: submit Cc: 7833@debbugs.gnu.org, Ian Lance Taylor X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) --Boundary-00=_QWvLNPKIEZna5OS Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello Ian. On Wednesday 12 January 2011, Ian Lance wrote: > When automake is configured to use DejaGNU, it uses two different values > for srcdir. There are two different cases in lib/am/dejagnu.am: > > The first is in check-DEJAGNU: > > check-DEJAGNU: site.exp > ## Life is easiest with an absolute srcdir, so do that. > srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ > > This value is passed to runtest with a --srcdir option. > > The second is in site.exp: > > site.exp: Makefile > @echo 'Making a new site.exp file...' > @echo '## these variables are automatically generated by make ##' >site.tmp > @echo '# Do not edit here. If you wish to override these values' >>site.tmp > @echo '# edit the last section' >>site.tmp > @echo 'set srcdir $(srcdir)' >>site.tmp > > This value is read by DejaGNU after option processing is complete, > effectively overwriting the value passed with the --srcdir option. > > The value of srcdir stored in site.exp should be an absolute path, just > like the value passed to runtest via --srcdir. > Are you sure about this? Why then is the attached testcase working (for me at least)? Please note that I'm a total Tcl/DejaGnu noob, so it might likely be that I'm missing something obvious here. In that case, just point out my mistake, and sorry in advance! Regards, Stefano --Boundary-00=_QWvLNPKIEZna5OS Content-Type: application/x-shellscript; name="dejagnu-srcdir-is-absolute.test" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dejagnu-srcdir-is-absolute.test" #! /bin/sh # Copyright (C) 2011 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Check DejaGnu testsuites have 'srcdir' defined to an absolute path, # both as TCL variable and as environment variable. required=runtest . ./defs || Exit 1 set -e cat >> configure.in << 'END' AC_OUTPUT END cat > Makefile.am << 'END' AUTOMAKE_OPTIONS = dejagnu DEJATOOL = tcl env EXTRA_DIST = env.test/env.exp tcl.test/tcl.exp END mkdir env.test tcl.test cat > env.test/env.exp << 'END' set test test_env set env_srcdir [ exec "sh" "-c" "echo \$srcdir" ] send_user "env_srcdir: $env_srcdir\n" if { [ regexp "^/" $env_srcdir ] } { pass "$test" } else { fail "$test" } END cat > tcl.test/tcl.exp << 'END' set test test_tcl # For debugging. send_user "tcl_srcdir: $srcdir\n" if { [ regexp "^/" $srcdir ] } { pass "$test" } else { fail "$test" } END $ACLOCAL $AUTOCONF $AUTOMAKE --add-missing ./configure --srcdir=. $MAKE check # Sanity check: all tests have been run. test -f env.log test -f env.sum test -f tcl.log test -f tcl.sum $MAKE distcheck : --Boundary-00=_QWvLNPKIEZna5OS-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 13 12:22:50 2011 Received: (at 7833) by debbugs.gnu.org; 13 Jan 2011 17:22:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdQss-00033m-Fr for submit@debbugs.gnu.org; Thu, 13 Jan 2011 12:22:50 -0500 Received: from smtp-out.google.com ([74.125.121.67]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdQsr-00033b-55 for 7833@debbugs.gnu.org; Thu, 13 Jan 2011 12:22:49 -0500 Received: from kpbe16.cbf.corp.google.com (kpbe16.cbf.corp.google.com [172.25.105.80]) by smtp-out.google.com with ESMTP id p0DHULtg004208 for <7833@debbugs.gnu.org>; Thu, 13 Jan 2011 09:30:21 -0800 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294939822; bh=waC5bEr90z40iw5JrNR+pmhaHw0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=cgSwjP3JTcb43Tz6qlUMZgyp6MB3BaHcSzQ2fVyTtq0GFrkP/g+lryephg4ZiGpN6 sLFxyZJ0gUOUV1FkwmMMw== Received: from pwj5 (pwj5.prod.google.com [10.241.219.69]) by kpbe16.cbf.corp.google.com with ESMTP id p0DHTgw1018859 for <7833@debbugs.gnu.org>; Thu, 13 Jan 2011 09:29:45 -0800 Received: by pwj5 with SMTP id 5so283302pwj.1 for <7833@debbugs.gnu.org>; Thu, 13 Jan 2011 09:29:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=h381PxUsYaehjkS77gAgWze1GKp33cUp6XuZwLnuLhA=; b=gRZoN0jU25XsKk+idaKbl0CIHZiEjZqIYRFkphMKPrJpc2IgfvvQsZvivz+E+V3bOd vk94RrlEew36NY7QlpFw== DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=cpTWlE7Wj+5hfMzCddpsV+oWIywIFJSY6IYF/AvEmAze4Az3an01hYqfzGWD9dpq6y xDzISYa+u3ryDUXIj6EA== Received: by 10.142.162.18 with SMTP id k18mr1043891wfe.396.1294939782386; Thu, 13 Jan 2011 09:29:42 -0800 (PST) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id w42sm359866wfh.3.2011.01.13.09.29.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 Jan 2011 09:29:41 -0800 (PST) From: Ian Lance Taylor To: Ralf Wildenhues Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir References: <20110113071519.GA28104@gmx.de> Date: Thu, 13 Jan 2011 09:29:39 -0800 In-Reply-To: <20110113071519.GA28104@gmx.de> (Ralf Wildenhues's message of "Thu, 13 Jan 2011 08:15:19 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-Spam-Score: -4.8 (----) X-Debbugs-Envelope-To: 7833 Cc: 7833@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.4 (----) Ralf Wildenhues writes: > Am I correct in assuming that it is hopeless to assume GCC will work > when either values are relative? Actually, as far as I know, GCC is likely to work with a relative srcdir. The problem arises with DejaGNU .exp files which themselves change directories. As far as I know, the GCC DejaGNU files do not do that. Ian From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 13 12:23:58 2011 Received: (at 7833) by debbugs.gnu.org; 13 Jan 2011 17:23:58 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdQtx-00035W-Mu for submit@debbugs.gnu.org; Thu, 13 Jan 2011 12:23:58 -0500 Received: from smtp-out.google.com ([74.125.121.67]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdQtw-00035L-CO for 7833@debbugs.gnu.org; Thu, 13 Jan 2011 12:23:57 -0500 Received: from kpbe13.cbf.corp.google.com (kpbe13.cbf.corp.google.com [172.25.105.77]) by smtp-out.google.com with ESMTP id p0DHVSqF003349 for <7833@debbugs.gnu.org>; Thu, 13 Jan 2011 09:31:29 -0800 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294939889; bh=5hwH5iZ+0MewuIdWvczRqwe+r60=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=aEkGurLh7u1CBLJEBUDqaZ5GVq3dNMLEl2Z0kT/EYHO9Fs7iniTr/AVxQ0fhZQ9Y1 JPSC3Pnl3E14CJhaW2/jg== Received: from iwn3 (iwn3.prod.google.com [10.241.68.67]) by kpbe13.cbf.corp.google.com with ESMTP id p0DHTjCm017439 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <7833@debbugs.gnu.org>; Thu, 13 Jan 2011 09:31:27 -0800 Received: by iwn3 with SMTP id 3so1789331iwn.12 for <7833@debbugs.gnu.org>; Thu, 13 Jan 2011 09:31:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=bVMhT4E3mrnuh5dNYByUZFawtoYW3V0d6m6+Or7ghEU=; b=ozWCXLHn4nM//0SDxdoGQ1g4EaibtGD+B6Cp4x2e43bZ1QSDgg7p4lI3DOlwxkeSu2 xT+sD3xG0ogEH3ew4Z8g== DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=AfzSWA6mTEepyeS0sJNFKcj0b/biRiV9FVbluOH0OZQFhnn62OWcxgUUN4jeCGEs9T Rzu3r1atCfoxygze93Cw== Received: by 10.42.220.134 with SMTP id hy6mr2795979icb.210.1294939887333; Thu, 13 Jan 2011 09:31:27 -0800 (PST) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id i2sm178462icv.3.2011.01.13.09.31.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 Jan 2011 09:31:26 -0800 (PST) From: Ian Lance Taylor To: Stefano Lattarini Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir References: <201101131352.32959.stefano.lattarini@gmail.com> Date: Thu, 13 Jan 2011 09:31:23 -0800 In-Reply-To: <201101131352.32959.stefano.lattarini@gmail.com> (Stefano Lattarini's message of "Thu, 13 Jan 2011 13:52:32 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 7833 Cc: 7833@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.1 (----) Stefano Lattarini writes: > Are you sure about this? Why then is the attached testcase working > (for me at least)? I guess I'm not sure what point you are trying to make with your example. A relative srcdir will sometimes work and sometimes fail. It seemed to me an absolute srcdir should always work, but Ralf has pointed out a somewhat obscure case where it too can fail. Either way, it makes no sense for automake to use two different values for srcdir. It should pick one and stick to it. Ian From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 13 14:19:07 2011 Received: (at 7833) by debbugs.gnu.org; 13 Jan 2011 19:19:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdShP-0006MN-9V for submit@debbugs.gnu.org; Thu, 13 Jan 2011 14:19:07 -0500 Received: from mail-ww0-f46.google.com ([74.125.82.46]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdShM-0006Lk-Li for 7833@debbugs.gnu.org; Thu, 13 Jan 2011 14:19:05 -0500 Received: by wwj40 with SMTP id 40so2161463wwj.15 for <7833@debbugs.gnu.org>; Thu, 13 Jan 2011 11:26:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; bh=T+c5V4Q66Zllh9pO0v366JXtxFhc2hM7ptfpFDHpyV4=; b=sKxG9/odvMjAPl1efnMnXJ7Y1aFTq/gQpGjTYhZ1IxJlOX+LvOpq3AkS8rQ4Iw9+sX C+dU3nUKO2Y3y3ALVllar/iS9eTT3DV7JC8j/lRSM3vwNn42JADqw51PpMaB/iAlAjZU hzrF3xS9deu+4034TE+ygjk6TyLrrpJHge3sM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=gWpcDMAZIjvM3DHmhbn3yMM1uz8Uj63uS/Y3M/iqAo+OLSLWaltFLQmyY7TY9D/Ij0 Y6Nhv4nOUAos8ZZpqJ3bx85u2RHTUTwgKTABB67+Pdf1jiXYuTL0DdGus6Z+jESYVAeB 8ie5MqTbFHXiXGX5Pub7+RTlVTDp94Am8YkbI= Received: by 10.227.183.203 with SMTP id ch11mr2714718wbb.214.1294946796567; Thu, 13 Jan 2011 11:26:36 -0800 (PST) Received: from bigio.localnet (host121-92-dynamic.248-95-r.retail.telecomitalia.it [95.248.92.121]) by mx.google.com with ESMTPS id r6sm230640weq.44.2011.01.13.11.26.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 Jan 2011 11:26:35 -0800 (PST) From: Stefano Lattarini To: Ian Lance Taylor Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir Date: Thu, 13 Jan 2011 20:26:26 +0100 User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) References: <201101131352.32959.stefano.lattarini@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201101132026.27457.stefano.lattarini@gmail.com> X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 7833 Cc: 7833@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) On Thursday 13 January 2011, Ian Lance wrote: > Stefano Lattarini writes: > > > Are you sure about this? Why then is the attached testcase working > > (for me at least)? > > I guess I'm not sure what point you are trying to make with your > example. A relative srcdir will sometimes work and sometimes fail. It > seemed to me an absolute srcdir should always work, but Ralf has pointed > out a somewhat obscure case where it too can fail. Either way, it makes > no sense for automake to use two different values for srcdir. It should > pick one and stick to it. > Yes, but my testcase *should* show (at least in my understanding) that in the dejagnu tests both the TCL-level '$srcdir' variable and the environment variable 'srcdir' contain an absolute path, even when the Makefile variable $(srcdir) contains a relative path (in this case, `.'). Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 13 15:05:21 2011 Received: (at 7833) by debbugs.gnu.org; 13 Jan 2011 20:05:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdTQ8-0007Oe-JO for submit@debbugs.gnu.org; Thu, 13 Jan 2011 15:05:21 -0500 Received: from smtp-out.google.com ([74.125.121.67]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdTQ6-0007OR-9Q for 7833@debbugs.gnu.org; Thu, 13 Jan 2011 15:05:19 -0500 Received: from kpbe14.cbf.corp.google.com (kpbe14.cbf.corp.google.com [172.25.105.78]) by smtp-out.google.com with ESMTP id p0DKCo4Y024647 for <7833@debbugs.gnu.org>; Thu, 13 Jan 2011 12:12:51 -0800 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294949571; bh=c0Iq/8k9wa1JOr+YscVmE5ORkrw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=OSWZ4SxhJU3H91pgrK/54rgogPvRVKrRAMPJHcGwLS1lIL+q7Tg/Ed/hNLuG4DGfP Xo+bdMRBirT3FukwjozVQ== Received: from pvg12 (pvg12.prod.google.com [10.241.210.140]) by kpbe14.cbf.corp.google.com with ESMTP id p0DKCnh0013117 for <7833@debbugs.gnu.org>; Thu, 13 Jan 2011 12:12:49 -0800 Received: by pvg12 with SMTP id 12so351661pvg.12 for <7833@debbugs.gnu.org>; Thu, 13 Jan 2011 12:12:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=wyiMaPuA1psoZ8LsJLknxzAuvfVk+V11fHxI/G+dP0Q=; b=tY9L4xUdh1K82y4h5SyJIVoX+DJGa6DQJp0BftGTe63wQJEIbZSbmN4VxNXz2ozSBj hfLCPPWG/SxmGuhcbrjg== DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=ggpaE/CmiVHE3d1j1LnV1C5xcjkNxUnfbIIxq1Tq4fG/ypYSHPnhFDXzBegZljLMWJ 3cvC5bxb9SHmHlxtCMNg== Received: by 10.142.155.4 with SMTP id c4mr15495wfe.92.1294949568838; Thu, 13 Jan 2011 12:12:48 -0800 (PST) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id e14sm529022wfg.8.2011.01.13.12.12.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 Jan 2011 12:12:48 -0800 (PST) From: Ian Lance Taylor To: Stefano Lattarini Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir References: <201101131352.32959.stefano.lattarini@gmail.com> <201101132026.27457.stefano.lattarini@gmail.com> Date: Thu, 13 Jan 2011 12:12:45 -0800 In-Reply-To: <201101132026.27457.stefano.lattarini@gmail.com> (Stefano Lattarini's message of "Thu, 13 Jan 2011 20:26:26 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 7833 Cc: 7833@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) Stefano Lattarini writes: > On Thursday 13 January 2011, Ian Lance wrote: >> Stefano Lattarini writes: >> >> > Are you sure about this? Why then is the attached testcase working >> > (for me at least)? >> >> I guess I'm not sure what point you are trying to make with your >> example. A relative srcdir will sometimes work and sometimes fail. It >> seemed to me an absolute srcdir should always work, but Ralf has pointed >> out a somewhat obscure case where it too can fail. Either way, it makes >> no sense for automake to use two different values for srcdir. It should >> pick one and stick to it. >> > Yes, but my testcase *should* show (at least in my understanding) > that in the dejagnu tests both the TCL-level '$srcdir' variable and > the environment variable 'srcdir' contain an absolute path, even > when the Makefile variable $(srcdir) contains a relative path (in > this case, `.'). Take a look at the site.exp file and see what value is in there for srcdir: relative or absolute? Ian From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 13 15:13:51 2011 Received: (at 7833) by debbugs.gnu.org; 13 Jan 2011 20:13:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdTYN-0007aO-5o for submit@debbugs.gnu.org; Thu, 13 Jan 2011 15:13:51 -0500 Received: from mail-ew0-f44.google.com ([209.85.215.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdTYK-0007a9-Mf for 7833@debbugs.gnu.org; Thu, 13 Jan 2011 15:13:49 -0500 Received: by ewy8 with SMTP id 8so1155923ewy.3 for <7833@debbugs.gnu.org>; Thu, 13 Jan 2011 12:21:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; bh=Kem+g7NSbLC/ABeZU58vm90Q/7LChSSPXzxoHq96iOg=; b=Ee7ZSMrJqYqNLC6gKRWslPvqj7mT9+bu9iHmS8nAkw9cgBBpenmGaQ/duy9WL/ZdF8 +l04D4dCMh7D/9DwX7B+G1h9yihk+UWBVp7fTgsrJH0WmcS23yGd/8qewBYeIRbTIjj2 DlKeix45Jls0tgvSAFKw5DzQCwTyx0vJ4tN7U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=G9qFmj62/xef7Q3f8OwgRc/4Qg7WaNXuo6RD+MzF4BmloCb5CSJQcCg06hX8DmwCH8 G+/GPjuzzdkzluvompYEPO3LPHwjigkAIOHNMa2NrHLv0z0P+G/R6hZ4JjTc5GTfDV6g bDdvjNGY998hmjBM/+X22iURBiR/m47Rt8Sm8= Received: by 10.216.183.145 with SMTP id q17mr2383807wem.5.1294950081533; Thu, 13 Jan 2011 12:21:21 -0800 (PST) Received: from bigio.localnet (host121-92-dynamic.248-95-r.retail.telecomitalia.it [95.248.92.121]) by mx.google.com with ESMTPS id b30sm265827wen.1.2011.01.13.12.21.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 Jan 2011 12:21:20 -0800 (PST) From: Stefano Lattarini To: Ian Lance Taylor Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir Date: Thu, 13 Jan 2011 21:21:06 +0100 User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) References: <201101132026.27457.stefano.lattarini@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201101132121.07592.stefano.lattarini@gmail.com> X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 7833 Cc: 7833@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) On Thursday 13 January 2011, Ian Lance wrote: > Stefano Lattarini writes: > > > On Thursday 13 January 2011, Ian Lance wrote: > >> Stefano Lattarini writes: > >> > >> > Are you sure about this? Why then is the attached testcase working > >> > (for me at least)? > >> > >> I guess I'm not sure what point you are trying to make with your > >> example. A relative srcdir will sometimes work and sometimes fail. It > >> seemed to me an absolute srcdir should always work, but Ralf has pointed > >> out a somewhat obscure case where it too can fail. Either way, it makes > >> no sense for automake to use two different values for srcdir. It should > >> pick one and stick to it. > >> > > Yes, but my testcase *should* show (at least in my understanding) > > that in the dejagnu tests both the TCL-level '$srcdir' variable and > > the environment variable 'srcdir' contain an absolute path, even > > when the Makefile variable $(srcdir) contains a relative path (in > > this case, `.'). > > Take a look at the site.exp file and see what value is in there for > srcdir: relative or absolute? > Relative (as I expected): $ cat dejagnu-srcdir-is-absolute.dir/site.exp ## these variables are automatically generated by make ## # Do not edit here. If you wish to override these values # edit the last section set srcdir . set objdir /home/stefano/src/automake/tests/dejagnu-srcdir-is-absolute.dir ## All variables above are generated by configure. Do Not Edit ## But then, why the testcase suceeds? I would expect it to fail! Thanks, Stefano From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 13 15:42:47 2011 Received: (at 7833) by debbugs.gnu.org; 13 Jan 2011 20:42:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdU0M-0008EY-SQ for submit@debbugs.gnu.org; Thu, 13 Jan 2011 15:42:47 -0500 Received: from smtp-out.google.com ([216.239.44.51]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdU0K-0008EK-Ny for 7833@debbugs.gnu.org; Thu, 13 Jan 2011 15:42:45 -0500 Received: from wpaz29.hot.corp.google.com (wpaz29.hot.corp.google.com [172.24.198.93]) by smtp-out.google.com with ESMTP id p0DKoIW0020629 for <7833@debbugs.gnu.org>; Thu, 13 Jan 2011 12:50:18 -0800 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294951818; bh=+GBsl7KQfzIBDDy371ToF3nmJFE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=Kz0rELrm3B5Rn5o30icHgFsMIXKyv3z3IpFXtyC+qTc+ibVjCGGYHfxZz1md92E5Y biOAw8VkZgMnmrDp/vdCw== Received: from pxi20 (pxi20.prod.google.com [10.243.27.20]) by wpaz29.hot.corp.google.com with ESMTP id p0DKnFAC021631 for <7833@debbugs.gnu.org>; Thu, 13 Jan 2011 12:49:23 -0800 Received: by pxi20 with SMTP id 20so441240pxi.24 for <7833@debbugs.gnu.org>; Thu, 13 Jan 2011 12:49:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=ER/PF+r6H4d7Al8EXKwPurEJuep1R4PBtftMGOW9vKM=; b=Y3RX9QkdlrbZpMYVB1H+IvgGsb7ZfxKIO8f23R1SeLcI8RYDj/+58XL8hlDfMguccu UEjgkfHQpBTmgvhc7nUg== DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=dbdgrIVbrmoJpu82yYLAm+5yd8qrXn7DlF5HPjQwLm2OEiIO3MR1EYHGbewFBnGm4P 32+hYgov/0KwXyd4JPsg== Received: by 10.142.242.18 with SMTP id p18mr23710wfh.271.1294951755541; Thu, 13 Jan 2011 12:49:15 -0800 (PST) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id e14sm559133wfg.20.2011.01.13.12.49.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 Jan 2011 12:49:14 -0800 (PST) From: Ian Lance Taylor To: Stefano Lattarini Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir References: <201101132026.27457.stefano.lattarini@gmail.com> <201101132121.07592.stefano.lattarini@gmail.com> Date: Thu, 13 Jan 2011 12:49:12 -0800 In-Reply-To: <201101132121.07592.stefano.lattarini@gmail.com> (Stefano Lattarini's message of "Thu, 13 Jan 2011 21:21:06 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: 7833 Cc: 7833@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) Stefano Lattarini writes: > Relative (as I expected): > > $ cat dejagnu-srcdir-is-absolute.dir/site.exp > ## these variables are automatically generated by make ## > # Do not edit here. If you wish to override these values > # edit the last section > set srcdir . > set objdir /home/stefano/src/automake/tests/dejagnu-srcdir-is-absolute.dir > ## All variables above are generated by configure. Do Not Edit ## > > But then, why the testcase suceeds? I would expect it to fail! 1) Does it matter? It seems clear to me that if automake is going to specify the srcdir in two different ways, that the two ways should use the same value. 2) DejaGNU is a horrible program and the problem is subtle, even more subtle than I thought. DejaGNU loads site.exp, then uses the current value of $srcdir to find and run the tool init script. That is where it was going wrong for me. After that, it reprocesses the command line options, setting srcdir back to what it was before. If you create a file "lib/tcl.exp" and add a line send_user "tcl.exp: $srcdir\n" you will see that while executing tcl.exp, srcdir is ".". Ian From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 13 16:00:11 2011 Received: (at 7833) by debbugs.gnu.org; 13 Jan 2011 21:00:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdUHC-0000C1-PX for submit@debbugs.gnu.org; Thu, 13 Jan 2011 16:00:11 -0500 Received: from mail-ww0-f46.google.com ([74.125.82.46]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdUHB-0000BO-3v for 7833@debbugs.gnu.org; Thu, 13 Jan 2011 16:00:09 -0500 Received: by wwj40 with SMTP id 40so2261831wwj.15 for <7833@debbugs.gnu.org>; Thu, 13 Jan 2011 13:07:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; bh=5pkknCDQpcV74PqqLqhm0vN5bixPMXuvNFoYOp1lZik=; b=ME8eZn5JJFKK6HvsPyQolBG34RWw6IGJkMsFwRTwCtLtdqnQ44oECKOKxcNyiU0ak5 vXsRq18K4J4PRME710oKHYp5NIBwzoR1mIhoLn9ixk82vQl+P2wkw/XQmEWz6VmoZ2m1 1GLItZ1/CAwkn+EyvCU1mZyxjK60naF86+w5E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=J9RGnTE8+VYhXV+HXi7+HyqVik1UZ21aZhXCrRTKIo0wNYRfeE69izNOB7qcJGX+lN PgiLwskp/7qM2Ek+vUxDPNOiqgLvZ0z4q/uhctex7QtClbuUP9oFNQNiNVCiWFnwW7FK YXTLVw8Le/kqbxg2WL8aBblsDcPPdANasupJg= Received: by 10.216.90.79 with SMTP id d57mr989289wef.65.1294952704430; Thu, 13 Jan 2011 13:05:04 -0800 (PST) Received: from bigio.localnet (host121-92-dynamic.248-95-r.retail.telecomitalia.it [95.248.92.121]) by mx.google.com with ESMTPS id b30sm287315wen.1.2011.01.13.13.05.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 Jan 2011 13:05:03 -0800 (PST) From: Stefano Lattarini To: Ian Lance Taylor Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir Date: Thu, 13 Jan 2011 22:04:27 +0100 User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) References: <201101132121.07592.stefano.lattarini@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201101132204.27847.stefano.lattarini@gmail.com> X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: 7833 Cc: 7833@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.1 (----) On Thursday 13 January 2011, Ian Lance wrote: > Stefano Lattarini writes: > > > Relative (as I expected): > > > > $ cat dejagnu-srcdir-is-absolute.dir/site.exp > > ## these variables are automatically generated by make ## > > # Do not edit here. If you wish to override these values > > # edit the last section > > set srcdir . > > set objdir /home/stefano/src/automake/tests/dejagnu-srcdir-is-absolute.dir > > ## All variables above are generated by configure. Do Not Edit ## > > > > But then, why the testcase suceeds? I would expect it to fail! > > 1) Does it matter? > IMHO yes (a little). Today I set out to fix this simple bug, but first I wanted to write a testcase to expose it. Well, I haven't been able to do so! > It seems clear to me that if automake is going to specify the srcdir > in two different ways, that the two ways should use the same value. > I agree with this. > 2) DejaGNU is a horrible program and the problem is subtle, even more > subtle than I thought. DejaGNU loads site.exp, then uses the current > value of $srcdir to find and run the tool init script. That is where it > was going wrong for me. After that, it reprocesses the command line > options, setting srcdir back to what it was before. If you create a > file "lib/tcl.exp" and add a line > send_user "tcl.exp: $srcdir\n" > you will see that while executing tcl.exp, srcdir is ".". > Thanks for this explanation! I will use it to fix my testcase. Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 14 16:58:27 2011 Received: (at 7833) by debbugs.gnu.org; 14 Jan 2011 21:58:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pdrf9-0005JV-Ac for submit@debbugs.gnu.org; Fri, 14 Jan 2011 16:58:27 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Pdrf6-0005JG-1z for 7833@debbugs.gnu.org; Fri, 14 Jan 2011 16:58:25 -0500 Received: (qmail invoked by alias); 14 Jan 2011 22:05:59 -0000 Received: from xdsl-89-0-185-173.netcologne.de (EHLO localhost.localdomain) [89.0.185.173] by mail.gmx.net (mp021) with SMTP; 14 Jan 2011 23:05:59 +0100 X-Authenticated: #13673931 X-Provags-ID: V01U2FsdGVkX18fU8Y9kkAflzf1qby7wZxo7pO6VGLxUrw2Ab/rTT bQmdgShAiGSP0L Received: from ralf by localhost.localdomain with local (Exim 4.69) (envelope-from ) id 1PdrmQ-0004UU-7P; Fri, 14 Jan 2011 23:05:58 +0100 Date: Fri, 14 Jan 2011 23:05:58 +0100 From: Ralf Wildenhues To: Ian Lance Taylor , automake-patches@gnu.org Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir Message-ID: <20110114220557.GA17233@gmx.de> Mail-Followup-To: Ian Lance Taylor , automake-patches@gnu.org, 7833@debbugs.gnu.org References: <20110113071519.GA28104@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Institute for Numerical Simulation, University of Bonn User-Agent: Mutt/1.5.20 (2010-08-04) X-Y-GMX-Trusted: 0 X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 7833 Cc: 7833@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) * Ian Lance Taylor wrote on Thu, Jan 13, 2011 at 06:29:39PM CET: > Ralf Wildenhues writes: > > > Am I correct in assuming that it is hopeless to assume GCC will work > > when either values are relative? > > Actually, as far as I know, GCC is likely to work with a relative > srcdir. The problem arises with DejaGNU .exp files which themselves > change directories. As far as I know, the GCC DejaGNU files do not do > that. Thanks for the feedback. Through testing I found out again that DejaGNU does not cope with white space in absolute directory names anyway, regardless of srcdir being relative or absolute. That obviates my first point. Remains only the fairly minor src+build-tree relocatability point. I have these two alternative patches which I would both be happy with. I should note that the "Life is easiest" comment dates back to the very first addition of dejagnu support in Automake, from way before recorded history where we could learn from a related bug. Tried both in a multilib target directory in the GCC tree, both seem to work. Any preferences, from a DejaGNU standpoint? Thanks, Ralf * lib/am/dejagnu.am (check-DEJAGNU): Set srcdir to be relative, consistent with the --srcdir argument and the srcdir setting in site.exp. Report by Ian Lance Taylor in automake bug#7833. --- am/dejagnu.am.orig 2011-01-14 20:27:32.000000000 +0100 +++ am/dejagnu.am.1 2011-01-14 20:27:38.000000000 +0100 @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2006 +## Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2006, 2011 ## Free Software Foundation, Inc. ## This program is free software; you can redistribute it and/or modify @@ -43,8 +43,7 @@ .PHONY: check-DEJAGNU check-DEJAGNU: site.exp -## Life is easiest with an absolute srcdir, so do that. - srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ + srcdir='$(srcdir)'; export srcdir; \ EXPECT=$(EXPECT); export EXPECT; \ ## Allow this to work when expect and DejaGnu are in tree. ## Only required when --cygnus in force. * lib/am/dejagnu.am (RUNTESTDEFAULTFLAGS): Quote argument to --srcdir. (site.exp): Set srcdir to "$(abs_srcdir)". Report by Ian Lance Taylor in automake bug#7833. --- am/dejagnu.am.orig 2011-01-14 20:27:32.000000000 +0100 +++ am/dejagnu.am.2 2011-01-14 20:20:22.000000000 +0100 @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2006 +## Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2006, 2011 ## Free Software Foundation, Inc. ## This program is free software; you can redistribute it and/or modify @@ -19,7 +19,7 @@ DEJATOOL = $(PACKAGE) ## Default flags to pass to dejagnu. The user can override this. -RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir +RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir "$$srcdir" ## In Cygnus mode, these are found in the build tree. ## Otherwise they are looked for in $PATH. @@ -77,7 +77,7 @@ @echo '## these variables are automatically generated by make ##' >site.tmp @echo '# Do not edit here. If you wish to override these values' >>site.tmp @echo '# edit the last section' >>site.tmp - @echo 'set srcdir $(srcdir)' >>site.tmp + @echo 'set srcdir "$(abs_srcdir)"' >>site.tmp @echo "set objdir `pwd`" >>site.tmp ## Quote the *_alias variables because they might be empty. ?BUILD? @echo 'set build_alias "$(build_alias)"' >>site.tmp From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 15 10:25:36 2011 Received: (at submit) by debbugs.gnu.org; 15 Jan 2011 15:25:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pe80V-0005T6-D6 for submit@debbugs.gnu.org; Sat, 15 Jan 2011 10:25:35 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pe7qP-0005F7-Vp for submit@debbugs.gnu.org; Sat, 15 Jan 2011 10:15:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pe7xn-0007rv-Ku for submit@debbugs.gnu.org; Sat, 15 Jan 2011 10:22:48 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:51777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pe7xn-0007rr-Io for submit@debbugs.gnu.org; Sat, 15 Jan 2011 10:22:47 -0500 Received: from [140.186.70.92] (port=50612 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pe7xm-0001Ma-HV for bug-automake@gnu.org; Sat, 15 Jan 2011 10:22:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pe7xl-0007rL-GK for bug-automake@gnu.org; Sat, 15 Jan 2011 10:22:46 -0500 Received: from smtp.mppmu.mpg.de ([134.107.24.58]:45611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pe7xj-0007qX-DW; Sat, 15 Jan 2011 10:22:43 -0500 Received: by smtp.mppmu.mpg.de (Postfix, from userid 998) id 33F91282846F; Sat, 15 Jan 2011 16:22:41 +0100 (CET) Received: from mail.mppmu.mpg.de (mail-6.mppmu.mpg.de [134.107.6.12]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mppmu.mpg.de (Postfix) with ESMTP id B617928283B0; Sat, 15 Jan 2011 16:22:32 +0100 (CET) Received: from pcl321.mppmu.mpg.de (pcl321.mppmu.mpg.de [134.107.3.54]) by mail.mppmu.mpg.de (Postfix) with ESMTP id 8A1771E981F4; Sat, 15 Jan 2011 16:22:32 +0100 (CET) Received: from pcl321.mppmu.mpg.de (localhost [127.0.0.1]) by pcl321.mppmu.mpg.de (8.14.2/8.14.1) with ESMTP id p0FFMWGU003423; Sat, 15 Jan 2011 16:22:32 +0100 Received: from localhost (peb@localhost) by pcl321.mppmu.mpg.de (8.14.2/8.14.2/Submit) with ESMTP id p0FFMWUx003419; Sat, 15 Jan 2011 16:22:32 +0100 X-Authentication-Warning: pcl321.mppmu.mpg.de: peb owned process doing -bs Date: Sat, 15 Jan 2011 16:22:32 +0100 (CET) From: Peter Breitenlohner To: Ralf Wildenhues Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir In-Reply-To: <20110114220557.GA17233@gmx.de> Message-ID: References: <20110113071519.GA28104@gmx.de> <20110114220557.GA17233@gmx.de> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 15 Jan 2011 10:25:33 -0500 Cc: 7833@debbugs.gnu.org, owner@debbugs.gnu.org, Ian Lance Taylor , bug-automake@gnu.org, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.3 (-----) On Fri, 14 Jan 2011, Ralf Wildenhues wrote: > Through testing I found out again that DejaGNU does not cope with white > space in absolute directory names anyway, regardless of srcdir being > relative or absolute. That obviates my first point. Remains only the > fairly minor src+build-tree relocatability point. Hi Ralf, I remember a problem with gcc's 'make check' that could be related. Some tests failed when `pwd -L` was different from `pwd -P`, presumably due to the two different srcdir's. I could avoid this problem by first doing 'cd `pwd -P`'. Regards Peter Breitenlohner From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 16 09:02:13 2011 Received: (at 7833) by debbugs.gnu.org; 16 Jan 2011 14:02:13 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PeTBM-0001Tp-PF for submit@debbugs.gnu.org; Sun, 16 Jan 2011 09:02:13 -0500 Received: from mail-wy0-f172.google.com ([74.125.82.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PeTBJ-0001Ta-Pz for 7833@debbugs.gnu.org; Sun, 16 Jan 2011 09:02:11 -0500 Received: by wyf23 with SMTP id 23so4646435wyf.3 for <7833@debbugs.gnu.org>; Sun, 16 Jan 2011 06:09:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:message-id; bh=/DIN6IsDHICnwUvgDRnzDycRA2U8shaUzfmv5lkkHYY=; b=SbiSVClITkEogAcDqpB6w/VPnkQwVCW/lCf0hSCya3GfyrMMqcJrG+0Ms1XQtOB2iX iP/upcTZivZO3zZV+y2AfXtcut8vpSghvCyKG1TNvtB25vf8H3aDWurusX6mEpmAad/r oO1etfZ4FgtwJttg8nojmz3FX+zPM4QrSn8TA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:message-id; b=j0lhGAUxJES/nWGcNW0zkeSEkYfQotJlQF6JrlmhCl0sfWkq8GaL/r2J0Tog1HQmGh mghPvM4mE13yVHJOpjmSN21/0WCTOJRfPFpfC3hg8d6DNYM47rW2wsXNbJnjuhOZ760D JgmerfElLJL/pUKfP72x8qUDTuJITDVQse8bo= Received: by 10.227.141.205 with SMTP id n13mr2961349wbu.52.1295186989671; Sun, 16 Jan 2011 06:09:49 -0800 (PST) Received: from bigio.localnet (host80-32-dynamic.52-82-r.retail.telecomitalia.it [82.52.32.80]) by mx.google.com with ESMTPS id 11sm2534595wbi.12.2011.01.16.06.09.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 16 Jan 2011 06:09:48 -0800 (PST) From: Stefano Lattarini To: automake-patches@gnu.org Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir Date: Sun, 16 Jan 2011 15:09:15 +0100 User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) References: <20110114220557.GA17233@gmx.de> In-Reply-To: <20110114220557.GA17233@gmx.de> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_LwvMNkucQVsE/ra" Message-Id: <201101161509.15781.stefano.lattarini@gmail.com> X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: 7833 Cc: 7833@debbugs.gnu.org, Ralf Wildenhues , Ian Lance Taylor X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.8 (---) --Boundary-00=_LwvMNkucQVsE/ra Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello Ralf, and sorry for the late reply. On Friday 14 January 2011, Ralf Wildenhues wrote: > * Ian Lance Taylor wrote on Thu, Jan 13, 2011 at 06:29:39PM CET: > > Ralf Wildenhues writes: > > > > > Am I correct in assuming that it is hopeless to assume GCC will work > > > when either values are relative? > > > > Actually, as far as I know, GCC is likely to work with a relative > > srcdir. The problem arises with DejaGNU .exp files which themselves > > change directories. As far as I know, the GCC DejaGNU files do not do > > that. > > Thanks for the feedback. > > Through testing I found out again that DejaGNU does not cope with white > space in absolute directory names anyway, regardless of srcdir being > relative or absolute. > While trying to cook up some test cases, I experienced this too, but I thought it was due to my lack of experience and knowledge of DejaGnu. Thanks for saving me some other useless efforts! > That obviates my first point. Remains only the > fairly minor src+build-tree relocatability point. > > I have these two alternative patches which I would both be happy with. > FWIW, I had preperad a patch also, which is basically your second patch with a testcase added (kudos to Ian Taylor for his suggestion of how to expose the bug). It's attached for reference. BTW, even if you decide to go with your first patch at last, it should be possible to easily modify the testcase to have it do checks opposite to the ones it currently does, and thus reuse it. > I should note that the "Life is easiest" comment dates back to the very > first addition of dejagnu support in Automake, from way before recorded > history where we could learn from a related bug. > > Tried both in a multilib target directory in the GCC tree, both seem to > work. Any preferences, from a DejaGNU standpoint? > > Thanks, > Ralf > > * lib/am/dejagnu.am (check-DEJAGNU): Set srcdir to be relative, > consistent with the --srcdir argument and the srcdir setting in > site.exp. > Report by Ian Lance Taylor in automake bug#7833. > > --- am/dejagnu.am.orig 2011-01-14 20:27:32.000000000 +0100 > +++ am/dejagnu.am.1 2011-01-14 20:27:38.000000000 +0100 > @@ -1,5 +1,5 @@ > ## automake - create Makefile.in from Makefile.am > -## Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2006 > +## Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2006, 2011 > ## Free Software Foundation, Inc. > > ## This program is free software; you can redistribute it and/or modify > @@ -43,8 +43,7 @@ > > .PHONY: check-DEJAGNU > check-DEJAGNU: site.exp > -## Life is easiest with an absolute srcdir, so do that. > - srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ > + srcdir='$(srcdir)'; export srcdir; \ > EXPECT=$(EXPECT); export EXPECT; \ > ## Allow this to work when expect and DejaGnu are in tree. > ## Only required when --cygnus in force. > > > > > * lib/am/dejagnu.am (RUNTESTDEFAULTFLAGS): Quote argument > to --srcdir. > (site.exp): Set srcdir to "$(abs_srcdir)". > Report by Ian Lance Taylor in automake bug#7833. > > --- am/dejagnu.am.orig 2011-01-14 20:27:32.000000000 +0100 > +++ am/dejagnu.am.2 2011-01-14 20:20:22.000000000 +0100 > @@ -1,5 +1,5 @@ > ## automake - create Makefile.in from Makefile.am > -## Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2006 > +## Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2006, 2011 > ## Free Software Foundation, Inc. > > ## This program is free software; you can redistribute it and/or modify > @@ -19,7 +19,7 @@ > DEJATOOL = $(PACKAGE) > > ## Default flags to pass to dejagnu. The user can override this. > -RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir > +RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir "$$srcdir" > > ## In Cygnus mode, these are found in the build tree. > ## Otherwise they are looked for in $PATH. > @@ -77,7 +77,7 @@ > @echo '## these variables are automatically generated by make ##' >site.tmp > @echo '# Do not edit here. If you wish to override these values' >>site.tmp > @echo '# edit the last section' >>site.tmp > - @echo 'set srcdir $(srcdir)' >>site.tmp > + @echo 'set srcdir "$(abs_srcdir)"' >>site.tmp > @echo "set objdir `pwd`" >>site.tmp > ## Quote the *_alias variables because they might be empty. > ?BUILD? @echo 'set build_alias "$(build_alias)"' >>site.tmp > > Regards, Stefano --Boundary-00=_LwvMNkucQVsE/ra Content-Type: text/x-patch; charset="us-ascii"; name="0001-dejagnu-ensure-srcdir-is-defined-as-an-absolute-dire.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="0001-dejagnu-ensure-srcdir-is-defined-as-an-absolute-dire.patch" =46rom 19e0ff24229cdb8560d555300e39977ac12bfffa Mon Sep 17 00:00:00 2001 =46rom: Stefano Lattarini Date: Thu, 13 Jan 2011 20:33:26 +0100 Subject: [PATCH] dejagnu: ensure 'srcdir' is defined as an absolute directo= ry This change fixes automake bug#7833. * lib/am/dejagnu.am (check-DEJAGNU): Prefer using $(abs_srcdir) over getting the absolute path of $(srcdir) dynamically. (site.exp): Use $(abs_srcdir) instead of $(srcdir) when defining TCL variable 'srcdir'. * tests/dejagnu-absolute-dirs.test: New test. * tests/Makefile.am (TESTS): Update. Report and suggestions by Ian Lance Taylor. =2D-- ChangeLog | 12 +++++ lib/am/dejagnu.am | 4 +- tests/Makefile.am | 1 + tests/Makefile.in | 1 + tests/dejagnu-absolute-dirs.test | 92 ++++++++++++++++++++++++++++++++++= ++++ 5 files changed, 108 insertions(+), 2 deletions(-) create mode 100755 tests/dejagnu-absolute-dirs.test diff --git a/ChangeLog b/ChangeLog index be35937..6f00b10 100644 =2D-- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2011-01-15 Stefano Lattarini + + dejagnu: ensure 'srcdir' is defined as an absolute directory + This change fixes automake bug#7833. + * lib/am/dejagnu.am (check-DEJAGNU): Prefer using $(abs_srcdir) + over getting the absolute path of $(srcdir) dynamically. + (site.exp): Use $(abs_srcdir) instead of $(srcdir) when defining + TCL variable 'srcdir'. + * tests/dejagnu-absolute-dirs.test: New test. + * tests/Makefile.am (TESTS): Update. + Report and suggestions by Ian Lance Taylor. + 2011-01-15 Ralf Wildenhues =20 docs: ensure example are separated with empty lines in the input diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am index 08de45c..4e9a3f3 100644 =2D-- a/lib/am/dejagnu.am +++ b/lib/am/dejagnu.am @@ -44,7 +44,7 @@ endif ! %?CYGNUS% .PHONY: check-DEJAGNU check-DEJAGNU: site.exp ## Life is easiest with an absolute srcdir, so do that. =2D srcdir=3D`$(am__cd) $(srcdir) && pwd`; export srcdir; \ + srcdir=3D'$(abs_srcdir)'; export srcdir; \ EXPECT=3D$(EXPECT); export EXPECT; \ ## Allow this to work when expect and DejaGnu are in tree. ## Only required when --cygnus in force. @@ -77,7 +77,7 @@ site.exp: Makefile @echo '## these variables are automatically generated by make ##' >site.t= mp @echo '# Do not edit here. If you wish to override these values' >>site.= tmp @echo '# edit the last section' >>site.tmp =2D @echo 'set srcdir $(srcdir)' >>site.tmp + @echo 'set srcdir "$(abs_srcdir)"' >>site.tmp @echo "set objdir `pwd`" >>site.tmp ## Quote the *_alias variables because they might be empty. ?BUILD? @echo 'set build_alias "$(build_alias)"' >>site.tmp diff --git a/tests/Makefile.am b/tests/Makefile.am index 890e69b..8145a13 100644 =2D-- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -263,6 +263,7 @@ dejagnu4.test \ dejagnu5.test \ dejagnu6.test \ dejagnu7.test \ +dejagnu-absolute-dirs.test \ depacl2.test \ depcomp.test \ depcomp2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 7600c14..53cfbb8 100644 =2D-- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -530,6 +530,7 @@ dejagnu4.test \ dejagnu5.test \ dejagnu6.test \ dejagnu7.test \ +dejagnu-absolute-dirs.test \ depacl2.test \ depcomp.test \ depcomp2.test \ diff --git a/tests/dejagnu-absolute-dirs.test b/tests/dejagnu-absolute-dirs= =2Etest new file mode 100755 index 0000000..895e201 =2D-- /dev/null +++ b/tests/dejagnu-absolute-dirs.test @@ -0,0 +1,92 @@ +#! /bin/sh +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Check that DejaGnu testsuites have 'srcdir' defined to an absolute path +# (both as TCL variable and as environment variable), and 'objdir' defined +# (as a TCL variable) to an absolute path. + +required=3Druntest +. ./defs || Exit 1 + +set -e + +cat >> configure.in << 'END' +AC_OUTPUT +END + +cat > Makefile.am << 'END' +AUTOMAKE_OPTIONS =3D dejagnu +DEJATOOL =3D tcl env +EXTRA_DIST =3D env.test/env.exp tcl.test/tcl.exp lib/tcl.exp +END + +mkdir env.test tcl.test lib + +# DejaGnu can change $srcdir behind our backs, so we have to +# save its original value. +cat > lib/tcl.exp << 'END' +send_user "tcl_lib_srcdir: $srcdir\n" +set orig_srcdir $srcdir +END + +cat > env.test/env.exp << 'END' +set env_srcdir $env(srcdir) +send_user "env_srcdir: $env_srcdir\n" +if { [ regexp "^/" $env_srcdir ] } { + pass "test_env_src" +} else { + fail "test_env_src" +} +END + +cat > tcl.test/tcl.exp << 'END' +send_user "tcl_srcdir: $srcdir\n" +if { [ regexp "^/" $srcdir ] } { + pass "test_tcl_src" +} else { + fail "test_tcl_src" +} +send_user "tcl_orig_srcdir: $orig_srcdir\n" +if { [ regexp "^/" $orig_srcdir ] } { + pass "test_tcl_orig_src" +} else { + fail "test_tcl_orig_src" +} +send_user "tcl_objdir: $objdir\n" +if { [ regexp "^/" $objdir ] } { + pass "test_tcl_objdir" +} else { + fail "test_tcl_objdir" +} +END + +$ACLOCAL +$AUTOCONF +$AUTOMAKE --add-missing + +./configure --srcdir=3D. + +$MAKE check + +# Sanity check: all tests have run. +test -f env.log +test -f env.sum +test -f tcl.log +test -f tcl.sum + +$MAKE distcheck + +: =2D-=20 1.7.2.3 --Boundary-00=_LwvMNkucQVsE/ra-- From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 04 12:11:18 2011 Received: (at submit) by debbugs.gnu.org; 4 Mar 2011 17:11:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PvYX7-0007tF-Oz for submit@debbugs.gnu.org; Fri, 04 Mar 2011 12:11:18 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PvYX6-0007t2-DX for submit@debbugs.gnu.org; Fri, 04 Mar 2011 12:11:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PvYWz-0002eM-Jg for submit@debbugs.gnu.org; Fri, 04 Mar 2011 12:11:10 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:51776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PvYWy-0002dZ-UR for submit@debbugs.gnu.org; Fri, 04 Mar 2011 12:11:09 -0500 Received: from [140.186.70.92] (port=39351 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PvYWt-0005EK-NX for bug-automake@gnu.org; Fri, 04 Mar 2011 12:11:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PvYWo-0002bP-GL for bug-automake@gnu.org; Fri, 04 Mar 2011 12:11:00 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]:35865) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PvYWo-0002b9-4m for bug-automake@gnu.org; Fri, 04 Mar 2011 12:10:58 -0500 Received: (qmail invoked by alias); 04 Mar 2011 17:10:56 -0000 Received: from xdsl-89-0-180-85.netcologne.de (EHLO localhost.localdomain) [89.0.180.85] by mail.gmx.net (mp013) with SMTP; 04 Mar 2011 18:10:56 +0100 X-Authenticated: #13673931 X-Provags-ID: V01U2FsdGVkX18BGpRsfz8BsrZv3Uakm3UC7fxcRz83vt1dHifN20 WP1RkXqSLij92h Received: from ralf by localhost.localdomain with local (Exim 4.72) (envelope-from ) id 1PvYWJ-0002yx-ED; Fri, 04 Mar 2011 18:10:27 +0100 Date: Fri, 4 Mar 2011 18:10:27 +0100 From: Ralf Wildenhues To: Peter Breitenlohner Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir Message-ID: <20110304171027.GH10500@gmx.de> Mail-Followup-To: Peter Breitenlohner , Ian Lance Taylor , automake-patches@gnu.org, 7833@debbugs.gnu.org, bug-automake@gnu.org References: <20110113071519.GA28104@gmx.de> <20110114220557.GA17233@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Institute for Numerical Simulation, University of Bonn User-Agent: Mutt/1.5.20 (2010-08-04) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 199.232.76.165 X-Spam-Score: -4.5 (----) X-Debbugs-Envelope-To: submit Cc: 7833@debbugs.gnu.org, Ian Lance Taylor , bug-automake@gnu.org, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.5 (----) Hello Peter, all, and sorry for the delay, * Peter Breitenlohner wrote on Sat, Jan 15, 2011 at 04:22:32PM CET: > On Fri, 14 Jan 2011, Ralf Wildenhues wrote: > > >Through testing I found out again that DejaGNU does not cope with white > >space in absolute directory names anyway, regardless of srcdir being > >relative or absolute. That obviates my first point. Remains only the > >fairly minor src+build-tree relocatability point. > I remember a problem with gcc's 'make check' that could be related. Some > tests failed when `pwd -L` was different from `pwd -P`, presumably due to > the two different srcdir's. > > I could avoid this problem by first doing 'cd `pwd -P`'. Thanks for mentioning this. I asked on the bug-dejagnu list back then, and have an answer now: http://thread.gmane.org/gmane.comp.sysutils.dejagnu.bugs/345/focus=348 I think we should change Automake semantics here and provide a relative srcdir only. That would mean, the first patch I suggested in http://thread.gmane.org/gmane.comp.sysutils.automake.bugs/5230/focus=5464 Stefano, would you like to rewrite your testsuite addition for this? Thanks, Ralf From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 04 20:25:26 2011 Received: (at submit) by debbugs.gnu.org; 5 Mar 2011 01:25:26 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PvgFJ-0003uf-L7 for submit@debbugs.gnu.org; Fri, 04 Mar 2011 20:25:26 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PvgFI-0003uT-1T for submit@debbugs.gnu.org; Fri, 04 Mar 2011 20:25:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PvgFB-0004a1-Hf for submit@debbugs.gnu.org; Fri, 04 Mar 2011 20:25:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:55028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PvgFB-0004Zs-DC for submit@debbugs.gnu.org; Fri, 04 Mar 2011 20:25:17 -0500 Received: from [140.186.70.92] (port=55445 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PvgF9-0002Gl-VH for bug-automake@gnu.org; Fri, 04 Mar 2011 20:25:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PvgF2-0004Y1-5w for bug-automake@gnu.org; Fri, 04 Mar 2011 20:25:15 -0500 Received: from mail-wy0-f169.google.com ([74.125.82.169]:48593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PvgEy-0004XZ-Aj; Fri, 04 Mar 2011 20:25:04 -0500 Received: by wyi11 with SMTP id 11so3080825wyi.0 for ; Fri, 04 Mar 2011 17:25:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:message-id; bh=wi7la/TqcFKMnzmaGQAU8yI5HF7/TRmwPXUy2NbLS0Q=; b=i3a7k7aspkCzb3PEmDoiQcqOUpVzdVoJxgICIq9DltO8jjwyUavGmNh7ughIIb6DDH 6e5SDlF/5qt75qGkYPCSsPluZ2x3Y16vsLdCzG0PGRuRKTCdwdJetO0UDQjDQyJ1SXfm Yixj8oXP640uuCHEia8tCt8Ix2C3rbIqqL8Lw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:message-id; b=W8v4eC7l0UxDnLOZ9fbIhrM+wJG67sTDnksnMvHNjJuEbyiN9qhWJsnmMTfn9EmO0e 7b3LvP6sfAJDcLoF4WqQ06KyvJJhyBoH3exU/CykD0cJp+PY0JFu33+if6BJlvBn+l/0 3qNGmJ9Pq4+u6X7iXWN7ESPuQ8oAvPo/3mskQ= Received: by 10.216.243.136 with SMTP id k8mr1014394wer.114.1299288302879; Fri, 04 Mar 2011 17:25:02 -0800 (PST) Received: from bigio.localnet (host18-95-dynamic.244-95-r.retail.telecomitalia.it [95.244.95.18]) by mx.google.com with ESMTPS id m6sm4548wej.10.2011.03.04.17.25.00 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2011 17:25:01 -0800 (PST) From: Stefano Lattarini To: automake-patches@gnu.org Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir Date: Sat, 5 Mar 2011 02:24:50 +0100 User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) References: <20110304171027.GH10500@gmx.de> In-Reply-To: <20110304171027.GH10500@gmx.de> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_jDZcNeEUR3sr4jt" Message-Id: <201103050224.51561.stefano.lattarini@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 199.232.76.165 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: Peter Breitenlohner , Ralf Wildenhues , Ian Lance Taylor , bug-automake@gnu.org, 7833@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.1 (-----) --Boundary-00=_jDZcNeEUR3sr4jt Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Friday 04 March 2011, Ralf Wildenhues wrote: > Hello Peter, all, and sorry for the delay, > > * Peter Breitenlohner wrote on Sat, Jan 15, 2011 at 04:22:32PM CET: > > On Fri, 14 Jan 2011, Ralf Wildenhues wrote: > > > > >Through testing I found out again that DejaGNU does not cope with white > > >space in absolute directory names anyway, regardless of srcdir being > > >relative or absolute. That obviates my first point. Remains only the > > >fairly minor src+build-tree relocatability point. > > > I remember a problem with gcc's 'make check' that could be related. Some > > tests failed when `pwd -L` was different from `pwd -P`, presumably due to > > the two different srcdir's. > > > > I could avoid this problem by first doing 'cd `pwd -P`'. > > Thanks for mentioning this. I asked on the bug-dejagnu list back then, > and have an answer now: > http://thread.gmane.org/gmane.comp.sysutils.dejagnu.bugs/345/focus=348 > > I think we should change Automake semantics here and provide a relative > srcdir only. That would mean, the first patch I suggested in > http://thread.gmane.org/gmane.comp.sysutils.automake.bugs/5230/focus=5464 > > Stefano, would you like to rewrite your testsuite addition for this? > I've adjusted my patch accordingly. Please find the new attempt attached. Is that ok for master? Thanks, Stefano --Boundary-00=_jDZcNeEUR3sr4jt Content-Type: text/x-patch; charset="us-ascii"; name="0001-dejagnu-ensure-srcdir-is-defined-as-a-relative-direc.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="0001-dejagnu-ensure-srcdir-is-defined-as-a-relative-direc.patch" =46rom 20b42d43279aef4cf8a35d86b0ae28cf6b7eee0f Mon Sep 17 00:00:00 2001 =46rom: Stefano Lattarini Date: Thu, 13 Jan 2011 20:33:26 +0100 Subject: [PATCH] dejagnu: ensure 'srcdir' is defined as a relative directory This change fixes automake bug#7833. * lib/am/dejagnu.am (check-DEJAGNU): Prefer using plain $(srcdir) over calculating and using the absolute path of $(srcdir). * tests/dejagnu-relative-srcdir.test: New test. * tests/dejagnu-absolute-builddir.test: Likewise. * tests/Makefile.am (TESTS): Update. Report by Ian Lance Taylor. Suggestions by Ralf Wildenhues. =2D-- ChangeLog | 11 ++++ lib/am/dejagnu.am | 4 +- tests/Makefile.am | 2 + tests/Makefile.in | 1 + tests/dejagnu-absolute-builddir.test | 62 ++++++++++++++++++++++++ tests/dejagnu-relative-srcdir.test | 85 ++++++++++++++++++++++++++++++= ++++ 6 files changed, 163 insertions(+), 2 deletions(-) create mode 100755 tests/dejagnu-absolute-builddir.test create mode 100755 tests/dejagnu-relative-srcdir.test diff --git a/ChangeLog b/ChangeLog index 991ed0b..c774f7b 100644 =2D-- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-03-05 Stefano Lattarini + + dejagnu: ensure 'srcdir' is defined as a relative directory + This change fixes automake bug#7833. + * lib/am/dejagnu.am (check-DEJAGNU): Prefer using plain $(srcdir) + over calculating and using the absolute path of $(srcdir). + * tests/dejagnu-relative-srcdir.test: New test. + * tests/dejagnu-absolute-builddir.test: Likewise. + * tests/Makefile.am (TESTS): Update. + Report by Ian Lance Taylor. Suggestions by Ralf Wildenhues. + 2011-03-04 Stefano Lattarini =20 tests: fix bug (comments-in-var-defn.test + autoconf 2.62) diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am index 08de45c..5c5da50 100644 =2D-- a/lib/am/dejagnu.am +++ b/lib/am/dejagnu.am @@ -44,7 +44,7 @@ endif ! %?CYGNUS% .PHONY: check-DEJAGNU check-DEJAGNU: site.exp ## Life is easiest with an absolute srcdir, so do that. =2D srcdir=3D`$(am__cd) $(srcdir) && pwd`; export srcdir; \ + srcdir=3D'$(srcdir)'; export srcdir; \ EXPECT=3D$(EXPECT); export EXPECT; \ ## Allow this to work when expect and DejaGnu are in tree. ## Only required when --cygnus in force. @@ -77,7 +77,7 @@ site.exp: Makefile @echo '## these variables are automatically generated by make ##' >site.t= mp @echo '# Do not edit here. If you wish to override these values' >>site.= tmp @echo '# edit the last section' >>site.tmp =2D @echo 'set srcdir $(srcdir)' >>site.tmp + @echo 'set srcdir "$(srcdir)"' >>site.tmp @echo "set objdir `pwd`" >>site.tmp ## Quote the *_alias variables because they might be empty. ?BUILD? @echo 'set build_alias "$(build_alias)"' >>site.tmp diff --git a/tests/Makefile.am b/tests/Makefile.am index 3fdb90a..b51b52d 100644 =2D-- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -266,6 +266,8 @@ dejagnu4.test \ dejagnu5.test \ dejagnu6.test \ dejagnu7.test \ +dejagnu-absolute-builddir.test \ +dejagnu-relative-srcdir.test \ depacl2.test \ depcomp.test \ depcomp2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index cd00833..3b327ca 100644 =2D-- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -536,6 +536,7 @@ dejagnu4.test \ dejagnu5.test \ dejagnu6.test \ dejagnu7.test \ +dejagnu-absolute-dirs.test \ depacl2.test \ depcomp.test \ depcomp2.test \ diff --git a/tests/dejagnu-absolute-builddir.test b/tests/dejagnu-absolute-= builddir.test new file mode 100755 index 0000000..ad9578f =2D-- /dev/null +++ b/tests/dejagnu-absolute-builddir.test @@ -0,0 +1,62 @@ +#! /bin/sh +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Check that DejaGnu testsuites have 'objdir' defined (as a TCL variable) +# to an absolute path. + +required=3Druntest +. ./defs || Exit 1 + +set -e + +cat >> configure.in << 'END' +AC_OUTPUT +END + +cat > Makefile.am << 'END' +AUTOMAKE_OPTIONS =3D dejagnu +DEJATOOL =3D tcl env +EXTRA_DIST =3D tcl.test/tcl.exp +END + +mkdir tcl.test + +cat > tcl.test/tcl.exp << 'END' +send_user "tcl_objdir: $objdir\n" +if { [ regexp "^/" $objdir ] } { + pass "test_tcl_objdir" +} else { + fail "test_tcl_objdir" +} +END + +$ACLOCAL +$AUTOCONF +$AUTOMAKE --add-missing + +./configure + +$MAKE check + +# Sanity check: all tests have run. +test -f env.log +test -f env.sum +test -f tcl.log +test -f tcl.sum + +$MAKE distcheck + +: diff --git a/tests/dejagnu-relative-srcdir.test b/tests/dejagnu-relative-sr= cdir.test new file mode 100755 index 0000000..14ddbc6 =2D-- /dev/null +++ b/tests/dejagnu-relative-srcdir.test @@ -0,0 +1,85 @@ +#! /bin/sh +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Check that DejaGnu testsuites have 'srcdir' defined to a relative path +# (both as TCL variable and as environment variable). + +required=3Druntest +. ./defs || Exit 1 + +set -e + +cat >> configure.in << 'END' +AC_OUTPUT +END + +cat > Makefile.am << 'END' +AUTOMAKE_OPTIONS =3D dejagnu +DEJATOOL =3D tcl env +EXTRA_DIST =3D env.test/env.exp tcl.test/tcl.exp lib/tcl.exp +END + +mkdir env.test tcl.test lib + +# DejaGnu can change $srcdir behind our backs, so we have to +# save its original value. +cat > lib/tcl.exp << 'END' +send_user "tcl_lib_srcdir: $srcdir\n" +set orig_srcdir $srcdir +END + +cat > env.test/env.exp << 'END' +set env_srcdir $env(srcdir) +send_user "env_srcdir: $env_srcdir\n" +if { [ regexp "^\.\.?$" $env_srcdir ] } { + pass "test_env_src" +} else { + fail "test_env_src" +} +END + +cat > tcl.test/tcl.exp << 'END' +send_user "tcl_srcdir: $srcdir\n" +if { [ regexp "^\.\.?$" $srcdir ] } { + pass "test_tcl_src" +} else { + fail "test_tcl_src" +} +send_user "tcl_orig_srcdir: $orig_srcdir\n" +if { [ regexp "^\.\.?$" $orig_srcdir ] } { + pass "test_tcl_orig_src" +} else { + fail "test_tcl_orig_src" +} +END + +$ACLOCAL +$AUTOCONF +$AUTOMAKE --add-missing + +./configure --srcdir=3D. + +$MAKE check + +# Sanity check: all tests have run. +test -f env.log +test -f env.sum +test -f tcl.log +test -f tcl.sum + +$MAKE distcheck + +: =2D-=20 1.7.2.3 --Boundary-00=_jDZcNeEUR3sr4jt-- From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 14 15:50:06 2011 Received: (at control) by debbugs.gnu.org; 14 Mar 2011 19:50:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PzDmH-0007z3-Sl for submit@debbugs.gnu.org; Mon, 14 Mar 2011 15:50:06 -0400 Received: from mail-wy0-f172.google.com ([74.125.82.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PzDmF-0007yW-Mr for control@debbugs.gnu.org; Mon, 14 Mar 2011 15:50:04 -0400 Received: by wyb42 with SMTP id 42so4407703wyb.3 for ; Mon, 14 Mar 2011 12:49:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:user-agent:mime-version :message-id:content-type:content-transfer-encoding; bh=Ps7yEdDdTkjKpUuubJBYbv3aB+NfGdBh11RJhJI8Ov4=; b=UBsIcT/t6AW/TS8VW1zDcQCXIUIH/OZ7+HGM+MFoBwwQG89Wg1G1WaAvpktG5z4Itg WnDdII5hJIYfPeZwJPRgKPmH51+mFMWLyjmKAkNJQ3UGeKN0Qa6DWWzcfODt4oY0Dkqu yUCmoeqZnm8F2xH3SZBcnzyoFOVh6egUViuFI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:mime-version:message-id :content-type:content-transfer-encoding; b=E6hXiDgLvCsfrVGK4iMwFfnxQJAYvwHFfc5jFbkoygjS/FnoKhJcafd/jiMzBxxxyY hMJ+K3IMNGe+eOb+N647VRtLf32ZXmt786Zm65nJ5RTJjduCPwoWNDxC5w10cCgCy305 fnH+vC1WIf6Pu6dOwGkweCz7FlwbwPMoSDjVk= Received: by 10.227.139.19 with SMTP id c19mr6816172wbu.13.1300132197920; Mon, 14 Mar 2011 12:49:57 -0700 (PDT) Received: from bigio.localnet (host116-92-dynamic.2-87-r.retail.telecomitalia.it [87.2.92.116]) by mx.google.com with ESMTPS id w25sm6418417wbd.11.2011.03.14.12.49.56 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Mar 2011 12:49:57 -0700 (PDT) From: Stefano Lattarini To: control@debbugs.gnu.org Subject: automake bug#7833 and bug#8168: patches Date: Mon, 14 Mar 2011 20:49:39 +0100 User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) MIME-Version: 1.0 Message-Id: <201103142049.39527.stefano.lattarini@gmail.com> Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) tags 7833 patch tags 8168 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 19 04:43:31 2011 Received: (at submit) by debbugs.gnu.org; 19 Oct 2011 08:43:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGRkJ-0000yt-8I for submit@debbugs.gnu.org; Wed, 19 Oct 2011 04:43:31 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGRkH-0000yh-DL for submit@debbugs.gnu.org; Wed, 19 Oct 2011 04:43:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGRjB-0006wb-0M for submit@debbugs.gnu.org; Wed, 19 Oct 2011 04:42:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:57338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGRjA-0006wR-RU for submit@debbugs.gnu.org; Wed, 19 Oct 2011 04:42:20 -0400 Received: from eggs.gnu.org ([140.186.70.92]:42621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGRj5-0008Al-Vd for bug-automake@gnu.org; Wed, 19 Oct 2011 04:42:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGRj3-0006vG-Mo for bug-automake@gnu.org; Wed, 19 Oct 2011 04:42:15 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:38347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGRit-0006u6-Jj; Wed, 19 Oct 2011 04:42:03 -0400 Received: by wyg34 with SMTP id 34so1748108wyg.0 for ; Wed, 19 Oct 2011 01:42:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:message-id; bh=aWJ642UjTnA01tPX7wmaGKRzYFq00v9Z7ZtQSCRxeS0=; b=E456HyVVec7XkhPBHFBV/K2Xpal8THbFOvxMaohGBZJWqrpmlODbhMOjC1o2DhvBlx aRx7VnNqxKOXaoGJpxdPNIdcGI5NvLqf0j7q5jfypcJvK7yvAgLbPRAodh+TFhknx661 2Qs/5Ifawuoxt/Jen21B2Ec2TU03QEhG/ZyjU= Received: by 10.216.132.215 with SMTP id o65mr2110125wei.104.1319013722692; Wed, 19 Oct 2011 01:42:02 -0700 (PDT) Received: from bigio.localnet (host144-99-dynamic.5-87-r.retail.telecomitalia.it. [87.5.99.144]) by mx.google.com with ESMTPS id gd6sm8491013wbb.1.2011.10.19.01.41.58 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Oct 2011 01:41:59 -0700 (PDT) From: Stefano Lattarini To: automake-patches@gnu.org Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir Date: Wed, 19 Oct 2011 10:41:45 +0200 User-Agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; ) References: <20110304171027.GH10500@gmx.de> <201103050224.51561.stefano.lattarini@gmail.com> In-Reply-To: <201103050224.51561.stefano.lattarini@gmail.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_K1onOqYLl0yPQx6" Message-Id: <201110191041.46944.stefano.lattarini@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.2 (-----) X-Debbugs-Envelope-To: submit Cc: Peter Breitenlohner , Ralf Wildenhues , Ian Lance Taylor , bug-automake@gnu.org, 7833@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.2 (-----) --Boundary-00=_K1onOqYLl0yPQx6 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Reference: I've rebased my patch on the "fixup" commit `v1.11-250-g0c0b402', and I will merge it to maint (and push) in a couple of days if there is no objection by then. The updated patch is attached, for reference. Regards, Stefano --Boundary-00=_K1onOqYLl0yPQx6 Content-Type: text/x-patch; charset="utf-8"; name="0001-dejagnu-ensure-srcdir-is-defined-as-a-relative-direc.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="0001-dejagnu-ensure-srcdir-is-defined-as-a-relative-direc.patch" =46rom ded01c88c9579656cc138ce7e0b55dcf025b1a5a Mon Sep 17 00:00:00 2001 Message-Id: =46rom: Stefano Lattarini Date: Thu, 13 Jan 2011 20:33:26 +0100 Subject: [PATCH] dejagnu: ensure 'srcdir' is defined as a relative directory This change fixes automake bug#7833. * lib/am/dejagnu.am (check-DEJAGNU): Prefer using plain $(srcdir) over calculating and using the absolute path of $(srcdir). * tests/dejagnu-relative-srcdir.test: New test. * tests/dejagnu-absolute-builddir.test: Likewise. * tests/Makefile.am (TESTS): Update. Report by Ian Lance Taylor. Suggestions by Ralf Wildenhues. =2D-- ChangeLog | 11 ++++ lib/am/dejagnu.am | 4 +- tests/Makefile.am | 2 + tests/Makefile.in | 2 + tests/dejagnu-absolute-builddir.test | 62 ++++++++++++++++++++++++ tests/dejagnu-relative-srcdir.test | 86 ++++++++++++++++++++++++++++++= ++++ 6 files changed, 165 insertions(+), 2 deletions(-) create mode 100755 tests/dejagnu-absolute-builddir.test create mode 100755 tests/dejagnu-relative-srcdir.test diff --git a/ChangeLog b/ChangeLog index 8884b59..bcee2a0 100644 =2D-- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-10-19 Stefano Lattarini + + dejagnu: ensure 'srcdir' is defined as a relative directory + This change fixes automake bug#7833. + * lib/am/dejagnu.am (check-DEJAGNU): Prefer using plain $(srcdir) + over calculating and using the absolute path of $(srcdir). + * tests/dejagnu-relative-srcdir.test: New test. + * tests/dejagnu-absolute-builddir.test: Likewise. + * tests/Makefile.am (TESTS): Update. + Report by Ian Lance Taylor. Suggestions by Ralf Wildenhues. + 2010-12-13 Ralf Wildenhues =20 Fix testsuite failure of check12.test without DejaGNU. diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am index 08de45c..5c5da50 100644 =2D-- a/lib/am/dejagnu.am +++ b/lib/am/dejagnu.am @@ -44,7 +44,7 @@ endif ! %?CYGNUS% .PHONY: check-DEJAGNU check-DEJAGNU: site.exp ## Life is easiest with an absolute srcdir, so do that. =2D srcdir=3D`$(am__cd) $(srcdir) && pwd`; export srcdir; \ + srcdir=3D'$(srcdir)'; export srcdir; \ EXPECT=3D$(EXPECT); export EXPECT; \ ## Allow this to work when expect and DejaGnu are in tree. ## Only required when --cygnus in force. @@ -77,7 +77,7 @@ site.exp: Makefile @echo '## these variables are automatically generated by make ##' >site.t= mp @echo '# Do not edit here. If you wish to override these values' >>site.= tmp @echo '# edit the last section' >>site.tmp =2D @echo 'set srcdir $(srcdir)' >>site.tmp + @echo 'set srcdir "$(srcdir)"' >>site.tmp @echo "set objdir `pwd`" >>site.tmp ## Quote the *_alias variables because they might be empty. ?BUILD? @echo 'set build_alias "$(build_alias)"' >>site.tmp diff --git a/tests/Makefile.am b/tests/Makefile.am index 3f40361..e83f06b 100644 =2D-- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -255,6 +255,8 @@ dejagnu4.test \ dejagnu5.test \ dejagnu6.test \ dejagnu7.test \ +dejagnu-absolute-builddir.test \ +dejagnu-relative-srcdir.test \ depacl2.test \ depcomp.test \ depcomp2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 40b4697..880bfbe 100644 =2D-- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -523,6 +523,8 @@ dejagnu4.test \ dejagnu5.test \ dejagnu6.test \ dejagnu7.test \ +dejagnu-absolute-builddir.test \ +dejagnu-relative-srcdir.test \ depacl2.test \ depcomp.test \ depcomp2.test \ diff --git a/tests/dejagnu-absolute-builddir.test b/tests/dejagnu-absolute-= builddir.test new file mode 100755 index 0000000..ad9578f =2D-- /dev/null +++ b/tests/dejagnu-absolute-builddir.test @@ -0,0 +1,62 @@ +#! /bin/sh +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Check that DejaGnu testsuites have 'objdir' defined (as a TCL variable) +# to an absolute path. + +required=3Druntest +. ./defs || Exit 1 + +set -e + +cat >> configure.in << 'END' +AC_OUTPUT +END + +cat > Makefile.am << 'END' +AUTOMAKE_OPTIONS =3D dejagnu +DEJATOOL =3D tcl env +EXTRA_DIST =3D tcl.test/tcl.exp +END + +mkdir tcl.test + +cat > tcl.test/tcl.exp << 'END' +send_user "tcl_objdir: $objdir\n" +if { [ regexp "^/" $objdir ] } { + pass "test_tcl_objdir" +} else { + fail "test_tcl_objdir" +} +END + +$ACLOCAL +$AUTOCONF +$AUTOMAKE --add-missing + +./configure + +$MAKE check + +# Sanity check: all tests have run. +test -f env.log +test -f env.sum +test -f tcl.log +test -f tcl.sum + +$MAKE distcheck + +: diff --git a/tests/dejagnu-relative-srcdir.test b/tests/dejagnu-relative-sr= cdir.test new file mode 100755 index 0000000..8a70d58 =2D-- /dev/null +++ b/tests/dejagnu-relative-srcdir.test @@ -0,0 +1,86 @@ +#! /bin/sh +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Check that DejaGnu testsuites have 'srcdir' defined to a relative path +# (both as TCL variable and as environment variable). + +required=3Druntest +. ./defs || Exit 1 + +set -e + +cat >> configure.in << 'END' +AC_OUTPUT +END + +cat > Makefile.am << 'END' +AUTOMAKE_OPTIONS =3D dejagnu +DEJATOOL =3D tcl env +EXTRA_DIST =3D env.test/env.exp tcl.test/tcl.exp lib/tcl.exp +END + +mkdir env.test tcl.test lib + +# DejaGnu can change $srcdir behind our backs, so we have to +# save its original value. Thanks to Ian Lance Taylor for the +# suggestion. +cat > lib/tcl.exp << 'END' +send_user "tcl_lib_srcdir: $srcdir\n" +set orig_srcdir $srcdir +END + +cat > env.test/env.exp << 'END' +set env_srcdir $env(srcdir) +send_user "env_srcdir: $env_srcdir\n" +if { [ regexp "^\.\.?$" $env_srcdir ] } { + pass "test_env_src" +} else { + fail "test_env_src" +} +END + +cat > tcl.test/tcl.exp << 'END' +send_user "tcl_srcdir: $srcdir\n" +if { [ regexp "^\.\.?$" $srcdir ] } { + pass "test_tcl_src" +} else { + fail "test_tcl_src" +} +send_user "tcl_orig_srcdir: $orig_srcdir\n" +if { [ regexp "^\.\.?$" $orig_srcdir ] } { + pass "test_tcl_orig_src" +} else { + fail "test_tcl_orig_src" +} +END + +$ACLOCAL +$AUTOCONF +$AUTOMAKE --add-missing + +./configure --srcdir=3D. + +$MAKE check + +# Sanity check: all tests have run. +test -f env.log +test -f env.sum +test -f tcl.log +test -f tcl.sum + +$MAKE distcheck + +: =2D-=20 1.7.2.3 --Boundary-00=_K1onOqYLl0yPQx6-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 22 14:54:59 2011 Received: (at submit) by debbugs.gnu.org; 22 Oct 2011 18:54:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RHgih-0005fu-Cz for submit@debbugs.gnu.org; Sat, 22 Oct 2011 14:54:59 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RHgig-0005fe-Ca for submit@debbugs.gnu.org; Sat, 22 Oct 2011 14:54:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHghF-0002aB-UI for submit@debbugs.gnu.org; Sat, 22 Oct 2011 14:53:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:40171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHghF-0002a7-Sj for submit@debbugs.gnu.org; Sat, 22 Oct 2011 14:53:29 -0400 Received: from eggs.gnu.org ([140.186.70.92]:42424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHghE-0003iY-Is for bug-automake@gnu.org; Sat, 22 Oct 2011 14:53:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHghD-0002Zo-Ms for bug-automake@gnu.org; Sat, 22 Oct 2011 14:53:28 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:61544) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHghB-0002YG-51; Sat, 22 Oct 2011 14:53:25 -0400 Received: by wyg34 with SMTP id 34so5894728wyg.0 for ; Sat, 22 Oct 2011 11:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=aW+0f5A1Nui8mHb/iG+hzrF3jxF5VAB5vRZpMSTR+Ec=; b=ra28qG2CDkXdmGHTpYIE+hX5gEbrV6RTAVCu2Fpsg3JziXYzlCvHs9YWeJ6lSDgbko qktmGVFuj1Lu7G7FCH2BEsgPQ1XFkGwK3hjWeX7lB0XSc249cIBVIqNs7pX29bKgUwPR QlETx37/WvNXsDSYLsxPhPVTLI5SE6mZA6Vxw= Received: by 10.216.162.197 with SMTP id y47mr2879783wek.54.1319309602305; Sat, 22 Oct 2011 11:53:22 -0700 (PDT) Received: from bigio.localnet (host157-90-dynamic.14-87-r.retail.telecomitalia.it. [87.14.90.157]) by mx.google.com with ESMTPS id eu16sm28996941wbb.7.2011.10.22.11.53.19 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 22 Oct 2011 11:53:20 -0700 (PDT) From: Stefano Lattarini To: automake-patches@gnu.org Subject: Re: bug#7833: automake uses two different values for DejaGNU srcdir Date: Sat, 22 Oct 2011 20:53:10 +0200 User-Agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; ) References: <201103050224.51561.stefano.lattarini@gmail.com> <201110191041.46944.stefano.lattarini@gmail.com> In-Reply-To: <201110191041.46944.stefano.lattarini@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201110222053.11269.stefano.lattarini@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.8 (----) X-Debbugs-Envelope-To: submit Cc: Peter Breitenlohner , Ralf Wildenhues , 7833-done@debbugs.gnu.org, bug-automake@gnu.org, Ian Lance Taylor X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.8 (----) On Wednesday 19 October 2011, Stefano Lattarini wrote: > Reference: > > > I've rebased my patch on the "fixup" commit `v1.11-250-g0c0b402', and > I will merge it to maint (and push) in a couple of days if there is > no objection by then. The updated patch is attached, for reference. > Pushed now. I'm closing this bug report. Regards, Stefano From unknown Tue Aug 12 03:20:27 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 20 Nov 2011 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator