From unknown Fri Jun 20 07:17:18 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#35886 <35886@debbugs.gnu.org> To: bug#35886 <35886@debbugs.gnu.org> Subject: Status: Built-in variable dependency issue with bindir/exec_prefix/prefix Reply-To: bug#35886 <35886@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:17:18 +0000 retitle 35886 Built-in variable dependency issue with bindir/exec_prefix/pr= efix reassign 35886 automake submitter 35886 "Sternberg, Jay E" severity 35886 normal tag 35886 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Fri May 24 13:46:05 2019 Received: (at submit) by debbugs.gnu.org; 24 May 2019 17:46:05 +0000 Received: from localhost ([127.0.0.1]:47257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUEGa-0005Zt-GR for submit@debbugs.gnu.org; Fri, 24 May 2019 13:46:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40309) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUE4c-0005Fa-3W for submit@debbugs.gnu.org; Fri, 24 May 2019 13:33:43 -0400 Received: from lists.gnu.org ([209.51.188.17]:34034) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hUE4W-0007kz-Vv for submit@debbugs.gnu.org; Fri, 24 May 2019 13:33:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUE4V-0001ZH-Av for bug-automake@gnu.org; Fri, 24 May 2019 13:33:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_HI autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hUE4U-0007jV-FR for bug-automake@gnu.org; Fri, 24 May 2019 13:33:35 -0400 Received: from mga09.intel.com ([134.134.136.24]:34695) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hUE4U-0007cO-85 for bug-automake@gnu.org; Fri, 24 May 2019 13:33:34 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 May 2019 10:33:26 -0700 X-ExtLoop1: 1 Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 24 May 2019 10:33:26 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 24 May 2019 10:33:26 -0700 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.118]) by fmsmsx117.amr.corp.intel.com ([169.254.3.68]) with mapi id 14.03.0415.000; Fri, 24 May 2019 10:33:25 -0700 From: "Sternberg, Jay E" To: "bug-automake@gnu.org" Subject: Built-in variable dependency issue with bindir/exec_prefix/prefix Thread-Topic: Built-in variable dependency issue with bindir/exec_prefix/prefix Thread-Index: AdUSVr35wqAWBKFkTQ+/XnJPInDamw== Date: Fri, 24 May 2019 17:33:24 +0000 Message-ID: <32FB2D14C96F3E428F08393735F7E220CB4E52B3@FMSMSX113.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDk4NmJiZmUtNjZjYi00ZTM4LWI4YzItMzM1M2Y4NTJlODQwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieE9Db0l3TkJjaVNkdzQ3dVwvR3I0QWN4VUM0OHFKTzBad2xUU2ptSVRDNFMxNHYzS2JnelRQNlFsendSVGRjYWoifQ== dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.1.200.108] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 24 May 2019 13:46:03 -0400 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: -2.4 (--) Built-in variables are stored in the generated Makefile in ascending sort o= rder. This results in dependency issues specifically for bindir and exec_p= refix. after running './configure --prefix /usr'; the resulting Makefile va= riables are as follows: ... bindir =3D ${exec_prefix}/bin build_alias =3D builddir =3D . ... dvidir =3D ${docdir} exec_prefix =3D ${prefix} host_alias =3D ... pdfdir =3D ${docdir} prefix =3D /usr program_transform_name =3D s,x,x, ... The result is that when make install uses bindir, the value is "/bin", not = "/usr/bin" Cheers, Jay From debbugs-submit-bounces@debbugs.gnu.org Fri May 24 14:05:09 2019 Received: (at control) by debbugs.gnu.org; 24 May 2019 18:05:09 +0000 Received: from localhost ([127.0.0.1]:47276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUEZ3-000657-0v for submit@debbugs.gnu.org; Fri, 24 May 2019 14:05:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUEZ1-00064X-2n; Fri, 24 May 2019 14:05:07 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B8D72307D849; Fri, 24 May 2019 18:05:00 +0000 (UTC) Received: from [10.3.116.169] (ovpn-116-169.phx2.redhat.com [10.3.116.169]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DC34760C62; Fri, 24 May 2019 18:04:59 +0000 (UTC) Subject: Re: bug#35886: Built-in variable dependency issue with bindir/exec_prefix/prefix To: "Sternberg, Jay E" , 35886-done@debbugs.gnu.org References: <32FB2D14C96F3E428F08393735F7E220CB4E52B3@FMSMSX113.amr.corp.intel.com> From: Eric Blake Openpgp: preference=signencrypt Autocrypt: addr=eblake@redhat.com; keydata= xsBNBEvHyWwBCACw7DwsQIh0kAbUXyqhfiKAKOTVu6OiMGffw2w90Ggrp4bdVKmCaEXlrVLU xphBM8mb+wsFkU+pq9YR621WXo9REYVIl0FxKeQo9dyQBZ/XvmUMka4NOmHtFg74nvkpJFCD TUNzmqfcjdKhfFV0d7P/ixKQeZr2WP1xMcjmAQY5YvQ2lUoHP43m8TtpB1LkjyYBCodd+LkV GmCx2Bop1LSblbvbrOm2bKpZdBPjncRNob73eTpIXEutvEaHH72LzpzksfcKM+M18cyRH+nP sAd98xIbVjm3Jm4k4d5oQyE2HwOur+trk2EcxTgdp17QapuWPwMfhaNq3runaX7x34zhABEB AAHNHkVyaWMgQmxha2UgPGVibGFrZ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XKVZUbqaMPqlj/z6Ugk027/3GUjHHr8WkeL1ezWepYDY7WSoXwfoAL 2UXYsMAr/uUncSKlfjvArhsej0S4zbqim2ZY6S8aRWw94J3bSvJR+Nwbs34GPTD4Pg== Organization: Red Hat, Inc. Message-ID: <354ebbbf-8137-9c4f-5f76-e4f60362a5c1@redhat.com> Date: Fri, 24 May 2019 13:04:58 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <32FB2D14C96F3E428F08393735F7E220CB4E52B3@FMSMSX113.amr.corp.intel.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nUMhCGUf9n3IUJ5vatFNzjD9zJnVrXdoz" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 24 May 2019 18:05:01 +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 (------) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --nUMhCGUf9n3IUJ5vatFNzjD9zJnVrXdoz Content-Type: multipart/mixed; boundary="GeIsbYCRXoxgG35UWRsGyFhmHx5cZHYRQ"; protected-headers="v1" From: Eric Blake To: "Sternberg, Jay E" , 35886-done@debbugs.gnu.org Message-ID: <354ebbbf-8137-9c4f-5f76-e4f60362a5c1@redhat.com> Subject: Re: bug#35886: Built-in variable dependency issue with bindir/exec_prefix/prefix References: <32FB2D14C96F3E428F08393735F7E220CB4E52B3@FMSMSX113.amr.corp.intel.com> In-Reply-To: <32FB2D14C96F3E428F08393735F7E220CB4E52B3@FMSMSX113.amr.corp.intel.com> --GeIsbYCRXoxgG35UWRsGyFhmHx5cZHYRQ Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable tag 35886 notabug thanks On 5/24/19 12:33 PM, Sternberg, Jay E wrote: > Built-in variables are stored in the generated Makefile in ascending so= rt order. This results in dependency issues specifically for bindir and = exec_prefix. after running './configure --prefix /usr'; the resulting Mak= efile variables are as follows: >=20 > ... > bindir =3D ${exec_prefix}/bin > build_alias =3D > builddir =3D . > ... > dvidir =3D ${docdir} > exec_prefix =3D ${prefix} > host_alias =3D > ... > pdfdir =3D ${docdir} > prefix =3D /usr > program_transform_name =3D s,x,x, > ... >=20 > The result is that when make install uses bindir, the value is "/bin", = not "/usr/bin" You are misunderstanding how makefile macros are handled, and forgetting that it is a two-phase process. Make macros are not like shell variables processed in textual order (where 'bindir =3D ${exec_prefix}/bin' would assign '/bin/' to the variable bindir if the variable exec_prefix were currently empty) but rather the first pass stores all macro definitions, and the second pass then refers to those stored definitions when determining rules to run. When a macro is encountered, the literal text stored in the first pass is then expanded recursively, regardless of the order the macros were defined (so expanding ${bindir} substitutes the text '${exec_prefix}/bin' then rescans that output to notice that more substitution is needed, which in turn expands exec_prefix, then in turn prefix). Proof: $ make -f - <<\EOF > a=3D${b} > c=3D${d} > d=3Dhi > all: > echo ${a} > b=3D${c} > EOF echo hi hi I see no bug here, so I'm closing this, but feel free to add more details if there is something else we're missing from your report and we can reopen as needed. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org --GeIsbYCRXoxgG35UWRsGyFhmHx5cZHYRQ-- --nUMhCGUf9n3IUJ5vatFNzjD9zJnVrXdoz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlzoMkoACgkQp6FrSiUn Q2o9sggAro/rgHVdDSmKiOIkRCnNHwjj5s7ho5QQ2WsSjVavE2c/GjZClUbjDOl/ WmEL5JUWyMzdzDky+HhAq8O8cIWrEn3L2nNQuWbH/0WxjuLAtc2l58png4RxcGpf PxpNw9Vl6QauXkfa5FBJI7ruGB13KFb8lJhQ6YT0pGi3qIsTdBv6CdzG4q/EWOBI rBMc8De5vrW62dklkFJlds5JW612ftxY5SbHJN+pKy3Rwfg9/1o5V3g1N2dt7YFW fIsdnf3NL4GLAzffcc7fEcnNmUPgMeljZAQIVO0R1lk+fi04/onnkk+QJvkL3z08 ZjFHGEYTaqnXnOD+Sr57hf1SkvExvA== =RNgF -----END PGP SIGNATURE----- --nUMhCGUf9n3IUJ5vatFNzjD9zJnVrXdoz-- From unknown Fri Jun 20 07:17:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 22 Jun 2019 11:24:07 +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