summaryrefslogtreecommitdiff
path: root/mk/tools/make.mk
blob: d64cb6add19753aab10637cd631e080e98e061af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# $NetBSD: make.mk,v 1.9 2005/05/15 22:50:53 jlam Exp $
#
# This Makefile fragment creates a tool called "make" under ${TOOLS_DIR}
# that corresponds to the make program used to build the package.
# This lets a bare "make" invoke the correct program if called from
# within a makefile or script.  It also sets MAKE_PROGRAM to the path
# of that make program.  Lastly, pass ${MAKE_PROGRAM} to GNU configure
# scripts in the MAKE variable so that the scripts will embed the
# correct path to the make program used to build the package
# into the generated Makefiles.
#

# Define MAKE_PROGRAM to be the "make" used to build the package.
.if !empty(_USE_TOOLS:Mgmake)
MAKE_PROGRAM=		${GMAKE}
.elif !empty(_USE_TOOLS:Mimake) && defined(_IMAKE_MAKE)
MAKE_PROGRAM=		${_IMAKE_MAKE}
.else
MAKE_PROGRAM=		${MAKE}
.endif

TOOLS_CREATE+=		make
TOOLS_REAL_CMD.make=	${MAKE_PROGRAM}

CONFIGURE_ENV+=		MAKE=make