GNU bug report logs -
#35886
Built-in variable dependency issue with bindir/exec_prefix/prefix
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35886 in the body.
You can then email your comments to 35886 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-automake <at> gnu.org
:
bug#35886
; Package
automake
.
(Fri, 24 May 2019 17:47:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Sternberg, Jay E" <jay.e.sternberg <at> intel.com>
:
New bug report received and forwarded. Copy sent to
bug-automake <at> gnu.org
.
(Fri, 24 May 2019 17:47:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Built-in variables are stored in the generated Makefile in ascending sort order. This results in dependency issues specifically for bindir and exec_prefix. after running './configure --prefix /usr'; the resulting Makefile variables are as follows:
...
bindir = ${exec_prefix}/bin
build_alias =
builddir = .
...
dvidir = ${docdir}
exec_prefix = ${prefix}
host_alias =
...
pdfdir = ${docdir}
prefix = /usr
program_transform_name = s,x,x,
...
The result is that when make install uses bindir, the value is "/bin", not "/usr/bin"
Cheers,
Jay
Added tag(s) notabug.
Request was from
Eric Blake <eblake <at> redhat.com>
to
control <at> debbugs.gnu.org
.
(Fri, 24 May 2019 18:06:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Eric Blake <eblake <at> redhat.com>
:
You have taken responsibility.
(Fri, 24 May 2019 18:06:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Sternberg, Jay E" <jay.e.sternberg <at> intel.com>
:
bug acknowledged by developer.
(Fri, 24 May 2019 18:06:03 GMT)
Full text and
rfc822 format available.
Message #12 received at 35886-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 sort order. This results in dependency issues specifically for bindir and exec_prefix. after running './configure --prefix /usr'; the resulting Makefile variables are as follows:
>
> ...
> bindir = ${exec_prefix}/bin
> build_alias =
> builddir = .
> ...
> dvidir = ${docdir}
> exec_prefix = ${prefix}
> host_alias =
> ...
> pdfdir = ${docdir}
> prefix = /usr
> program_transform_name = s,x,x,
> ...
>
> 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 =
${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=${b}
> c=${d}
> d=hi
> all:
> echo ${a}
> b=${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.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[signature.asc (application/pgp-signature, attachment)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 22 Jun 2019 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 310 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.