Makefile revision 1.1
11.1Smrg#	$NetBSD: Makefile,v 1.1 2011/06/15 09:45:59 mrg Exp $
21.1Smrg
31.1Smrg# hacky method to get compat multilib base objdirs created before
41.1Smrg# make tries to go create the subdirs used for builds.
51.1Smrg
61.1Smrg# the problem is that make handles objdir creation for subdirs before it
71.1Smrg# handles this current directory, so when make cd's into $arch/$libtype
81.1Smrg# and from there into the ../../lib dirs, it ends up setting the forced
91.1Smrg# MAKEOBJDIR to something based upon ${.CURDIR}, since the objdir
101.1Smrg# doesn't exist yet.
111.1Smrg# 
121.1Smrg# our solution is simple - from this Makefile we traverse the same list
131.1Smrg# of $arch/$libtype's with "BOOTSTRAP_SUBDIR=".  then the compat/Makefile
141.1Smrg# handles these subdirs as normal, with the base objdir created.
151.1Smrg
161.1Smrg.include <bsd.own.mk>
171.1Smrg
181.1Smrg.if ${MKCOMPATMODULES} != "no"
191.1Smrg.if make(obj)
201.1Smrg
211.1Smrg.include "../archdirs.mk"
221.1Smrg
231.1SmrgMAKEDIRTARGETENV=	BOOTSTRAP_SUBDIRS=
241.1Smrg
251.1SmrgSUBDIR=	${ARCHDIR_SUBDIR:C/^/..\//}
261.1Smrg
271.1Smrg.endif	# make(obj)
281.1Smrg.endif	# MKCOMPATMODULES != no
291.1Smrg
301.1Smrg.include <bsd.subdir.mk>
31