Home | History | Annotate | Line # | Download | only in dirshack
      1 #	$NetBSD: Makefile,v 1.4 2023/05/13 10:56:08 riastradh Exp $
      2 
      3 # hacky method to get compat multilib base objdirs created before
      4 # make tries to go create the subdirs used for builds.
      5 
      6 # the problem is that make handles objdir creation for subdirs before it
      7 # handles this current directory, so when make cd's into $arch/$libtype
      8 # and from there into the ../../lib dirs, it ends up setting the forced
      9 # MAKEOBJDIR to something based upon ${.CURDIR}, since the objdir
     10 # doesn't exist yet.
     11 #
     12 # our solution is simple - from this Makefile we traverse the same list
     13 # of $arch/$libtype's with "BOOTSTRAP_SUBDIR=".  then the compat/Makefile
     14 # handles these subdirs as normal, with the base objdir created.
     15 
     16 .include <bsd.own.mk>
     17 
     18 TARGETS+=	build_install
     19 
     20 .if ${MKCOMPAT} != "no"
     21 .if make(obj)
     22 
     23 .include "../archdirs.mk"
     24 
     25 MAKEDIRTARGETENV=	BOOTSTRAP_SUBDIRS=
     26 
     27 SUBDIR=	${ARCHDIR_SUBDIR:C/^/..\//}
     28 
     29 .endif	# make(obj)
     30 .endif	# MKCOMPAT != no
     31 
     32 .include <bsd.subdir.mk>
     33