From unknown Fri Aug 15 15:59:15 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#20300 <20300@debbugs.gnu.org> To: bug#20300 <20300@debbugs.gnu.org> Subject: Status: Are paths containing directories allowed in AC_REQUIRE_AUX_FILE? Reply-To: bug#20300 <20300@debbugs.gnu.org> Date: Fri, 15 Aug 2025 22:59:15 +0000 retitle 20300 Are paths containing directories allowed in AC_REQUIRE_AUX_FI= LE? reassign 20300 automake submitter 20300 Moritz Klammler severity 20300 normal tag 20300 confirmed thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 11 04:13:45 2015 Received: (at submit) by debbugs.gnu.org; 11 Apr 2015 08:13:45 +0000 Received: from localhost ([127.0.0.1]:52837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YgqXw-00058y-5W for submit@debbugs.gnu.org; Sat, 11 Apr 2015 04:13:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34198) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ygjw0-0002rz-Io for submit@debbugs.gnu.org; Fri, 10 Apr 2015 21:10:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ygjvt-0000LW-CI for submit@debbugs.gnu.org; Fri, 10 Apr 2015 21:10:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ygjvt-0000LS-AQ for submit@debbugs.gnu.org; Fri, 10 Apr 2015 21:10:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ygjvs-0000gx-3t for bug-automake@gnu.org; Fri, 10 Apr 2015 21:10:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ygjvo-0000Kb-Ss for bug-automake@gnu.org; Fri, 10 Apr 2015 21:10:00 -0400 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::9]:33594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ygjvo-0000KI-Dm for bug-automake@gnu.org; Fri, 10 Apr 2015 21:09:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1428714595; l=4797; s=domk; d=klammler.eu; h=Content-Type:MIME-Version:Date:Subject:To:From; bh=53ZrQexwMSeoR8iIDR5DAF9cPx0Bw4BF3MmY4y8QTs8=; b=BcmCmZJ7SA4xQQSRtCN3ax9qaMFt2Kstk3I//YFcdruDGMfXHS+aeLxiFc/QitH4suM L8hGbLh1t7HKPoFLTgxDq23JUMu2+3OMAk/YI4EEOi+PYpbnMFKvBkGBOO7E/rtln0/4I 6dXIZWgIm9I8cNu4Ikb/KkBPubrIAOtYFrI= X-RZG-AUTH: :IWMWfFSyW/SrNdkI+ewDiCutTJTpMG0DgGT3T1KdlTClHDO7gcG9qurw/a5fdl8= X-RZG-CLASS-ID: mo00 Received: from moritz-laptop (openvpn-cl-200-202.scc.kit.edu [141.3.200.202]) by smtp.strato.de (RZmta 37.5 AUTH) with ESMTPSA id y00a7dr3B0uV9Fe (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Sat, 11 Apr 2015 02:56:31 +0200 (CEST) From: Moritz Klammler To: bug-automake@gnu.org Subject: Are paths containing directories allowed in AC_REQUIRE_AUX_FILE? Date: Sat, 11 Apr 2015 02:56:25 +0200 Message-ID: <87iod3jxdy.fsf@klammler.eu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 11 Apr 2015 04:13:41 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello everybody, last week, I have asked this question on Stack Overflow [1] but did not receive any answer. I'll be happy to post a summary of the replies I'll get on this list there. But if you have an account and want to gain some valuable internet points, I'll accept your answer, of course. Please consider this directory structure demo/ demo/Makefile.am demo/build-aux/ demo/build-aux/bar/ demo/build-aux/bar/baz.txt demo/build-aux/foo.txt demo/configure.ac with the following `configure.ac` AC_PREREQ([2.69]) AC_INIT([example], [1.0], [bugs@example.com]) AC_CONFIG_AUX_DIR([build-aux]) AC_REQUIRE_AUX_FILE([foo.txt]) # this works AC_REQUIRE_AUX_FILE([bar/baz.txt]) # this does not work AM_INIT_AUTOMAKE([foreign]) AC_OUTPUT([Makefile]) and an empty `Makefile.am`. I have attached a tar ball with this setup for your convenience. As indicated by the comments, the invocation of `AC_REQUIRE_AUX_FILE` for `bar/baz.txt` does not work as expected. If running `autoreconf` From=20the top-level directory, Automake will fail with the following error message: $ test -f build-aux/bar/baz.txt && autoreconf -ivs autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal autoreconf: configure.ac: tracing autoreconf: configure.ac: not using Libtool autoreconf: running: /usr/bin/autoconf autoreconf: configure.ac: not using Autoheader autoreconf: running: automake --add-missing --no-force configure.ac:5: error: required file 'build-aux/bar/baz.txt' not found configure.ac:6: installing 'build-aux/install-sh' configure.ac:6: installing 'build-aux/missing' autoreconf: automake failed with exit status: 1 Note that the reported error names the file name exactly as expected but incorrectly says it does not exist. I have checked the documentation for `AC_REQUIRE_AUX_FILE` in the Autoconf manual [2] as well as what I consider the relevant reference in the Automake manual [3] and none of this suggests to me that I shouldn't be allowed to list file names in sub-directories of ${auxdir} here. It seems to me that the error message is triggered by the function `rewrite_inputs_into_dependencies` in `automake.in` [4] but I cannot trace back the logic due to my limited Perl skills. Am I missing something here? Is this intended to work? If naming paths containing directory parts is not allowed, could the manual be updated to say so? Thank you & kind regards Moritz Klammler Autoconf version: 2.69 Automake version: 1.15 Platform: Parabola GNU/Linux References: [1] https://stackoverflow.com/q/29445704/1392132 [2] https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.6= 9/html_node/Input.html#index-AC_005fREQUIRE_005fAUX_005fFILE-60 [3] https://www.gnu.org/software/automake/manual/html_node/Optional.html [4] http://git.savannah.gnu.org/cgit/automake.git/tree/bin/automake.in#n3775 =2D-=20 OpenPGP: Public Key: http://openpgp.klammler.eu Fingerprint: 80C1 EC79 B554 3D84 0A35 A728 7057 B288 CE61 2235 --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=demo.tar.gz Content-Transfer-Encoding: base64 Content-Description: mini-project to reproduce the described problem H4sIAHVtKFUAA+2YXW/aMBSGc51f4YkbOi0h32ztzVBHp2ijdAikSRFCTuKwqElcJY5K++tnBzJV ES1DSuimnufGYPtgW6/PexJCktKB1C0aZ2hrotUbbY2kG7ZuaI5j88+arluGJSG7431VlAXDOUJS SvOYPT4/79D4f0oo9PfLOAkVXG66uQnH6G+aOtffNA0N9D8FDf0jSlW2Ye2uIQR2rOf1102job/l WLqEtHa3sZ83rn/vHRqURT7w42wQYCbz78p7BQU0jLP1ecki5eMFSmlIzhnZsAsxKMvy/FdcoChO CIozRjIW0wwnyQNKSMQQSe/Ygyq/9smAv6GR/z7O268Bx/u/xf0C/P8U7NHfx4/t1oDj/d82hw74 /ykA/3/bVPkf0CyK12VOVBx0sMah/LeGzfw3h+L5H/K/e57mPy4ZFVfhBROop9RGMLpc3czGs/GP vmeozqflmehxr9153yMbnN4lZPkBebqqicYv18XnXbca0HQ7+3J6feV+XY0WP1df3Fnf+1OMtsP8 txfubFyNX7nfx31v946yPEMVPcSEG93T/LbYH/CkqImgXUBISYEyyqpIeTSpts2j5tPJ6Fu1TE7i dbbdxXQxv1nwQ03wLRG+x3tfW7l2qPK/PpWK0y7WOFj/bafx/49pOSbk/ylo5n/Kr8IL+Z/ubopS z62NoIfgmQAAAAAAAAAAAAAAAAAA/jV+A+OheAwAKAAA --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVKHE5AAoJEM9sUWbzk6nA6yIH/2JbpnpiNKbq/GgxWvZzUsss NCxK02ilR/CQrLhG0H1ySE1zlDxdO3PXelU2PB5Jl4wBrnvDWyVnQ+MaYQif8cMB Bm3cd5qDR4V5WYmal/Wy9GWHWhr54JOFFdIQTWRNP7XW1O3vYA+fJC4tstBptPZo 4u3D5kldxBncMCJXmbU0KRBKbyfxCJzsRAoSoEPjUqQc0V/ItVhseqXEynNSNG6k Jl+ZWkgcWSh3db/obPDNqaRvWOtX5IBeeIO/Oe8Pem3Wjn9JJ/OypCDpC2f6sbaY SJjTygf0pOhn+XZVTCO9kyXMILIncmr536FddunvMDQcIuj/tEGwsuCxpTny7v4= =8auy -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 20 23:42:32 2022 Received: (at 20300) by debbugs.gnu.org; 21 Feb 2022 04:42:32 +0000 Received: from localhost ([127.0.0.1]:34510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM0Wl-00047S-75 for submit@debbugs.gnu.org; Sun, 20 Feb 2022 23:42:32 -0500 Received: from woodpecker.gentoo.org ([140.211.166.183]:48372 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM0Wg-000476-NR for 20300@debbugs.gnu.org; Sun, 20 Feb 2022 23:42:22 -0500 Received: by smtp.gentoo.org (Postfix, from userid 559) id 876EF34373D; Mon, 21 Feb 2022 04:42:12 +0000 (UTC) From: Mike Frysinger To: 20300@debbugs.gnu.org Subject: [PATCH] automake: allow required files to be in subdirs Date: Sun, 20 Feb 2022 23:42:11 -0500 Message-Id: <20220221044211.12959-1-vapier@gentoo.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 20300 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Fixes automake bug https://bugs.gnu.org/20300. The internal method for caching path lookups expects the $filename to only be a filename. If it's actually a subdir/file itself, then the cache logic gets confused, and it never matches. This manifests as AC_REQUIRE_AUX_FILE([subdir/file]) claiming that the subdir/file path doesn't exist even when it does. Before we process any required files, since we already construct the full path locally, reset the dir & file inputs to the final values. * bin/automake.in: Split dir & file name back out from the constructed required file path. * t/auxdir-subsubdir.sh: New test. * t/list-of-tests.mk: Add t/auxdir-subsubdir.sh. --- bin/automake.in | 7 +++++++ t/auxdir-subsubdir.sh | 39 +++++++++++++++++++++++++++++++++++++++ t/list-of-tests.mk | 1 + 3 files changed, 47 insertions(+) create mode 100644 t/auxdir-subsubdir.sh diff --git a/bin/automake.in b/bin/automake.in index 5a151455019e..5eba649d240c 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -7628,6 +7628,13 @@ sub required_file_check_or_copy my ($where, $dir, $file) = @_; my $fullfile = "$dir/$file"; + # In cases where $file is actually a subdir/filename, split the full path back + # into dir & file names. The FileUtils (e.g. dir_has_case_matching_file) do + # not handle this scenario at all and expect $file to only be a filename. + # https://bugs.gnu.org/20300 + $dir = dirname ($fullfile); + $file = basename ($fullfile); + my $found_it = 0; my $dangling_sym = 0; diff --git a/t/auxdir-subsubdir.sh b/t/auxdir-subsubdir.sh new file mode 100644 index 000000000000..21880f23591f --- /dev/null +++ b/t/auxdir-subsubdir.sh @@ -0,0 +1,39 @@ +#! /bin/sh +# Copyright (C) 2022 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 . + +# Make sure auxdir with subdir aux files works. + +. test-init.sh + +cat > configure.ac <build-aux/top-file +: >build-aux/subdir/file + +$ACLOCAL +$AUTOMAKE --add-missing + +: diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index d8e50b080166..85de422193a0 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -188,6 +188,7 @@ t/auxdir-computed.tap \ t/auxdir-misplaced.sh \ t/auxdir-nonexistent.sh \ t/auxdir-pr19311.sh \ +t/auxdir-subsubdir.sh \ t/auxdir-unportable.tap \ t/backcompat.sh \ t/backcompat2.sh \ -- 2.34.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 20 23:42:34 2022 Received: (at control) by debbugs.gnu.org; 21 Feb 2022 04:42:35 +0000 Received: from localhost ([127.0.0.1]:34513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM0Ww-00047s-QN for submit@debbugs.gnu.org; Sun, 20 Feb 2022 23:42:34 -0500 Received: from woodpecker.gentoo.org ([140.211.166.183]:48412 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM0Wu-00047Y-JL for control@debbugs.gnu.org; Sun, 20 Feb 2022 23:42:32 -0500 Received: by smtp.gentoo.org (Postfix, from userid 559) id E9C9134373D; Mon, 21 Feb 2022 04:42:26 +0000 (UTC) From: Mike Frysinger To: control@debbugs.gnu.org Subject: Control message Message-Id: <20220221044226.E9C9134373D@smtp.gentoo.org> Date: Mon, 21 Feb 2022 04:42:26 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) tag 20300 = confirmed thankyou From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 22 21:23:53 2022 Received: (at 20300) by debbugs.gnu.org; 23 Feb 2022 02:23:53 +0000 Received: from localhost ([127.0.0.1]:43269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMhJo-0008TO-Vd for submit@debbugs.gnu.org; Tue, 22 Feb 2022 21:23:53 -0500 Received: from freefriends.org ([96.88.95.60]:54364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMhJn-0008TE-4g for 20300@debbugs.gnu.org; Tue, 22 Feb 2022 21:23:51 -0500 X-Envelope-From: karl@freefriends.org Received: from freefriends.org (freefriends.org [96.88.95.60]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 21N2Nngk029700 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Feb 2022 19:23:50 -0700 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 21N2NmDw029699; Tue, 22 Feb 2022 19:23:48 -0700 Date: Tue, 22 Feb 2022 19:23:48 -0700 Message-Id: <202202230223.21N2NmDw029699@freefriends.org> From: Karl Berry To: vapier@gentoo.org Subject: Re: bug#20300: [PATCH] automake: allow required files to be in subdirs In-Reply-To: <20220221044211.12959-1-vapier@gentoo.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 20300 Cc: 20300@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * bin/automake.in: Split dir & file name back out from the constructed required file path. Looks like good work to me. Thanks. -k From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 23 23:45:27 2022 Received: (at control) by debbugs.gnu.org; 24 Feb 2022 04:45:27 +0000 Received: from localhost ([127.0.0.1]:47113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nN60N-00046v-Bj for submit@debbugs.gnu.org; Wed, 23 Feb 2022 23:45:27 -0500 Received: from woodpecker.gentoo.org ([140.211.166.183]:54686 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nN60L-0003zj-N1 for control@debbugs.gnu.org; Wed, 23 Feb 2022 23:45:26 -0500 Received: by smtp.gentoo.org (Postfix, from userid 559) id DA57F342CAC; Thu, 24 Feb 2022 04:45:19 +0000 (UTC) From: Mike Frysinger To: control@debbugs.gnu.org Subject: Control message Message-Id: <20220224044519.DA57F342CAC@smtp.gentoo.org> Date: Thu, 24 Feb 2022 04:45:19 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) close 20300 thankyou From unknown Fri Aug 15 15:59:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 24 Mar 2022 11:24:04 +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