| Summary: | make(1) option to reproduce original -V behaviour | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Mark Valentine <mark> | ||||
| Component: | bin | Assignee: | Peter Wemm <peter> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 4.0-CURRENT | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
Responsible Changed From-To: freebsd-bugs->peter Johan Karlsson says that Peter committed rev 1.24. Peter, this one contains a well-motivated patch. :-) State Changed From-To: open->closed Patch applied to -current and RELENG_4. |
I originally submitted the make -V option as a result of trying to debug a modular build system where it wasn't clear where the final effective assignment to a variable was taking place. I could trivially see the _expanded_ value of a variable (on many make(1) implementations) using something like: show:: @echo $(VAR) = $($(VAR)) However, what I wanted to see was the actual textual assignment (because my head hurt tracing through layers of included makefile segments), in order to determine which part of my build system was responsible for the final value of the variable. The change of behaviour in 1.24 removes my ability to find what I wanted, and instead I have a second way to achieve what I could already do! :-( Since several releases have gone out with the new behaviour, it would be wrong to revert the default behaviour of -V. The patch below adds a new -X (don't expand) flag to give -V its original behaviour. $ make -V CFLAGS -O -pipe -I/usr/src/usr.bin/make $ make -X -V CFLAGS -O -pipe -I${.CURDIR} ${COPTS} ${DEBUG_FLAGS}