Bug 17188

Summary: make(1) option to reproduce original -V behaviour
Product: Base System Reporter: Mark Valentine <mark>
Component: binAssignee: Peter Wemm <peter>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Mark Valentine 2000-03-04 21:10:02 UTC
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}
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2000-08-07 15:38:38 UTC
Responsible Changed
From-To: freebsd-bugs->peter

Johan Karlsson says that Peter committed rev 1.24. 
Peter, this one contains a well-motivated patch. :-)
Comment 2 Peter Wemm freebsd_committer freebsd_triage 2000-09-25 19:47:26 UTC
State Changed
From-To: open->closed

Patch applied to -current and RELENG_4.