On Fri, 19 Sep 2014, [email protected] wrote:
Where does machine/asm.h come from, given the NetBSD source sets
as the starting point?
Presumably it is possible to find out the answer by analysing
the "build.sh" tool but the named tool is possibly not the
(only) definition of the structure/interrelations of the
concerned data?
build.sh does very little more than run "make" with appropriate
arguments; it certainly has no knowledge of where a particular
include file comes from. That knowledge is embedded in various
makefiles, including *.mk, Makefile, and Makefile.inc. In
this case, it's rather difficult to work out, by examining
makfiles and build logs, that the KLINK_MACHINE variable and
related rules in bsd.klink.mk are responsible for creating the
DESTDIR/include/machine symlink, and that machine/asm.h comes from
src/sys/arch/${KLINK_MACHINE}/asm.h.
--apb (Alan Barrett)