I'm not familiar with NetBSD, and not too familiar with "make" in Linux (I'm running quite an "antique" distro). Looking at my "Makefile", starting from line 45...
# Debug stuff
ifeq ($(TRACE),1)
CFLAGS += -DNASM_TRACE
endif
That doesn't "look" to me like it would be responsible for the error messages you're seeing. Perhaps if you posted lines 46-48 from your Makefile, someone (probably not me) might be able to spot the problem.
There's a script, "autogen.sh", which you're not "supposed" to have to run. I wonder if it might help. It just runs "autoheader" and "autoconf"... and deletes some files. I wonder if running "autoheader" and "autoconf" by hand and examining "config.status" (and/or "config.log") would be of interest?
There's also a Perl script, "mkdep.pl", which you're also not "supposed" to have to run. I think of this only because your error messages mention "dependency".
There used to be a generic "Makefile.unx" in the "Mkfiles" directory, but I see it's not there anymore. Probably wouldn't have helped anyway...
For me, just doing "./configure" and "make install_everything" always works, so I don't know much about the things that can go wrong with the entire build process.
If a solution doesn't appear soon (I'm sure you're anxious to get started!), we can pose the question to the developer's list. We may need to seek out a "NetBSD guru". It's "supposed to work" - being "Netwide" is Nasm's claim to fame!
Best,
Frank