NetBSD-Bugs archive

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

bin/59966: make(1): -dgN input graph format is confusing



>Number:         59966
>Category:       bin
>Synopsis:       make(1): -dgN input graph format is confusing
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 07 00:15:01 +0000 2026
>Originator:     Taylor R Campbell
>Release:        current, 11, 10, 9, ...
>Organization:
The MakeBSD Foundconfus, Ing.
>Environment:
>Description:

	The man page for make(1) says:

     -d [-]flags
             Turn on debugging, and specify which portions of make are
             to print debugging information.  [...]  Flags is one or
             more of the following:
     [...]
             g1      Print the input graph before making anything.


	But when I use `make -dg1', with an empty sys.mk to keep the
	output simple, I don't see a _graph_; all I see is a list of
	_nodes_, without any _edges_ between them:

$ cat Makefile
all: foo
all: .PHONY
.PHONY:

foo: bar
	cp bar foo
bar:
	echo hello >bar
$ cat sys.mk
$ make -m . -n -dg1
#*** Input graph:
# all, flags 0, type 10001, made 0
# foo, flags 0, type 8000001, made 0
# bar, flags 0, type 1, made 0


#
#   Files that are only sources:
#*** Global Variables:
.MAKE.LEVEL      = 0
.PATH            = . /tmp/test
.TARGETS         = 
.OBJDIR          = /tmp/test
.newline         = 

.MAKE.OS         = NetBSD
.MAKE.MAKEFILES  = sys.mk Makefile
MACHINE          = amd64
.MAKE.PATH_FILEMON = /dev/filemon
.INCLUDES        = 
.MAKE.PID        = 15679
MFLAGS           =   -m . -n -d g1
.MAKE.DEPENDFILE = .depend
.CURDIR          = /tmp/test
.MAKEOVERRIDES   =  .MAKE.LEVEL.ENV
.MAKEFLAGS       =  -m . -n -d g1
.LIBS            = 
.MAKE            = make
.MAKE.PPID       = 11799
MAKE             = make
.MAKE.MAKEFILE_PREFERENCE = makefile Makefile
MACHINE_ARCH     = x86_64
.ALLTARGETS      =  all foo bar
#*** Command-line Variables:
.MAKE.LEVEL.ENV  = MAKELEVEL

#*** Directory Cache:
# Stats: 0 hits 4 misses 0 near misses 0 losers (0%)
# directory            referenced	hits
# .                             1	   0
# /tmp/test                     2	   0
# .                             2	   0
# /usr/share/mk                 1	   0

#*** Suffixes:
#*** Transformations:
echo hello >bar
cp bar foo
$ 

>How-To-Repeat:

	make -dg1

>Fix:

	Yes, please!



Home | Main Index | Thread Index | Old Index