To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Todd Vierling <>
List: tech-toolchain
Date: 07/26/1998 18:23:32
On Sun, 26 Jul 1998, Jonathan Stone wrote:

: >I will be using ${MACHINE_ARCH:C/^mipse[bl]$/mips/} as per Jason's
: >suggestion.  It even retains compatibility with old make binaries.
: Ok but do you mean everywhere we test against mips, or only the
: subdir walk??

The subdir walk.  Tests for mips (for capability to build/use a program,
for example, which is the most prominent case) will change:
    (${MACHINE_ARCH} == "mips")
    (${MACHINE_ARCH:Mmips*} != "")

This wildcard method can expand to other platforms, too.  (sparc64, possibly
in the future.)

: >: and makeflist,
: >
: >No need to hack this - it's a hack to begin with, and can just use more than
: >one file.  If /you/ want just one file for "ad.mips", there

: Yes, I do want, because in my head it will always be one arch:->.

Then I'll keep it in mind, and probably do it last.

: >ONLY_FOR_ARCHS=mipsel*
: No, that's got global semantics for the whole file.

Yes, it is.  Read the pkg docs - you are NOT to use an .if construct to
restrict architectures in a pkg.

: and we need to do that in all makefiles, pkg or otherwise, everywhere
: ${MACHINE_ARCH} is compared to "mips".  And similarly for sparc64.

The places MACHINE_ARCH should be compared is /minimal/.  The fact that more
than one MACHINE_ARCH uses the same asm code directories in the NetBSD tree
is a special case, and a regex or glob match is fine.

: I think it's clearly better engineering than scattering ed patterns
: for 3 arches -- mips le/e, 64/ 32; sparc 64/32, powerpc 64/32 one day
: -- all throughout the tree. And I still havent heard any reason _not_
: to do it that way. Curious.


if [ "`uname -m`" = ... ]

-- Todd Vierling (Personal; Bus.