NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/57494: bmake: -V does not show value from environment if using -e



>Number:         57494
>Category:       bin
>Synopsis:       bmake: -V does not show value from environment if using -e
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 30 19:15:01 +0000 2023
>Originator:     John Hein
>Release:        MAKE_VERSION: 20220928 (FreeBSD port: devel/bmake)
>Organization:
>Environment:
>Description:
When using -e to override variable values using environment variables, -V still prints the non-overridden value.

The man page for -V says "Print bmake's idea of the value of variable, in the global context."  Maybe the behavior of -V when using -e is subtly correct given that wording.  But the behavior is perhaps surprising for some at least.


>How-To-Repeat:
% printf 'X=2\nx:\n\t@echo "MAKE_VERSION: ${MAKE_VERSION}."\n\t@echo "X: $X."\n\t@echo "Y: $Y."\n' > /tmp/mf
% env X=xe Y=ye /usr/local/bin/bmake -e -f /tmp/mf
MAKE_VERSION: 20220928.
X: xe.
Y: ye.
% env X=xe Y=ye /usr/local/bin/bmake -e -f mf -V X -V Y
2
ye


Notice that '-V X' shows '2' instead of 'xe'.
>Fix:
No fix to source code nor documentation yet.

This could be considered to not be a bug and perhaps just the documentation should be more clear.



Home | Main Index | Thread Index | Old Index