NetBSD Problem Report #59966
From www@netbsd.org Sat Feb 7 00:13:06 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.netbsd.org", Issuer "R13" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 6C3931A923D
for <gnats-bugs@gnats.NetBSD.org>; Sat, 7 Feb 2026 00:13:06 +0000 (UTC)
Message-Id: <20260207001305.3BB361A923E@mollari.NetBSD.org>
Date: Sat, 7 Feb 2026 00:13:05 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: make(1): -dgN input graph format is confusing
X-Send-Pr-Version: www-1.0
X-From4GNATS: "campbell+netbsd@mumble.net via gnats" <gnats-admin@NetBSD.org>
>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!
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.