Subject: Re: Driver hierarchy
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Simon Burge <simonb@netbsd.org>
List: tech-kern
Date: 03/20/2000 15:45:30
der Mouse wrote:

> > 	MACHINE_ARCH_DIRS= ${ARCHDIRS.${MACHINE_ARCH}}
> 
> Does that work now?  Didn't last I looked, which admittedly was quite a
> while back.  (When I checked, it worked when, and only when, the inner
> variable was the formal of a .for loop.)

Seems to.  Here's the complete makefile I was tinkering with

	ARCHDIRS.alpha= alpha
	ARCHDIRS.arm32= arm32
	ARCHDIRS.i386=  i386
	ARCHDIRS.m68k=  m68k    amiga atari hp300 luna68k mac68k mvme68k news68k next68k sun3 x68k
	ARCHDIRS.mipseb=mips    arc hpcmips newsmips pmax
	ARCHDIRS.mipsel=${ARCHDIRS.mipseb}
	ARCHDIRS.ns32k= pc532
	ARCHDIRS.ppc=   powerpc bebox macppc ofppc
	ARCHDIRS.sh3=   sh3     evbsh3 mmeye
	ARCHDIRS.sparc= sparc   sparc64
	ARCHDIRS.vax=   vax

	#MACHINE_ARCH_DIRS= ${ARCHDIRS.${ARCHSUBDIR}}
	MACHINE_ARCH_DIRS= ${ARCHDIRS.${MACHINE_ARCH}}

	all:
		@echo MACHINE_ARCH_DIRS = ${MACHINE_ARCH_DIRS}

and worked ok for various "make MACHINE_ARCH=foo" incantations.  There
is a similar construct in /usr/share/mk/bsd.own.mk for MACHINE_GNU_ARCH.

Simon.