[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / compat / dirshack

File: [cvs.NetBSD.org] / src / compat / dirshack / Makefile (download)

Revision 1.2, Sun Apr 17 01:29:06 2011 UTC (9 years, 7 months ago) by mrg
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache
Changes since 1.1: +2 -2 lines

catch up with s/MAKEDIROBJPREFIX/MAKEOBJDIR/ changes in comments.

#	$NetBSD: Makefile,v 1.2 2011/04/17 01:29:06 mrg Exp $

# hacky method to get compat multilib base objdirs created before
# make tries to go create the subdirs used for builds.

# the problem is that make handles objdir creation for subdirs before it
# handles this current directory, so when make cd's into $arch/$libtype
# and from there into the ../../lib dirs, it ends up setting the forced
# MAKEOBJDIR to something based upon ${.CURDIR}, since the objdir
# doesn't exist yet.
# 
# our solution is simple - from this Makefile we traverse the same list
# of $arch/$libtype's with "BOOTSTRAP_SUBDIR=".  then the compat/Makefile
# handles these subdirs as normal, with the base objdir created.

.include <bsd.own.mk>

.if ${MKCOMPAT} != "no"
.if make(obj)

.include "../archdirs.mk"

MAKEDIRTARGETENV=	BOOTSTRAP_SUBDIRS=

SUBDIR=	${ARCHDIR_SUBDIR:C/^/..\//}

.endif	# make(obj)
.endif	# MKCOMPAT != no

.include <bsd.subdir.mk>