Subject: Organizing stuff by architecture
To: None <>
From: Paul Mackerras <>
List: netbsd-ports
Date: 11/24/1993 08:12:07
There are now at least four 68k-based machines that NetBSD has been
ported to, including my "da30" machine (hp300, amiga, sun3 are the
others).  At present, machine-dependent stuff is organized in various
places such as src/lib/csu, src/gnu/usr.bin/gcc2/arch, etc., in
directories labelled ${MACHINE}.

Now, as mycroft and deraadt have pointed out, it doesn't make sense
to have essentially identical code in four different directories for
four different 68k-based ports.  We could have hp300, amiga, etc. be
symbolic links to m68k, but cvs apparently doesn't support symbolic

My suggestion is that we create a file /usr/share/mk/,
which would contain something like the following:

.if ${MACHINE} == "hp300" || ${MACHINE} == "amiga" || ${MACHINE} == "sun3" \
	|| ${MACHINE} == "da30"
ARCH=	m68k


Makefiles could .include <> and then use ${ARCH} rather than
${MACHINE}, for example:

.PATH:	${.CURDIR}/arch/${ARCH}


.include "config/Makefile.${ARCH}"


.include "${.CURDIR}/arch/${ARCH}/"