2012-08-22 19:25:57 +00:00
|
|
|
WITH_INSTALL_AS_USER= yes
|
|
|
|
|
2014-08-19 06:50:54 +00:00
|
|
|
.if !defined(_TARGETS)
|
|
|
|
# some things we do only once
|
2015-05-26 21:44:15 +00:00
|
|
|
_TARGETS:= ${.TARGETS}
|
2014-08-19 06:50:54 +00:00
|
|
|
.export _TARGETS
|
|
|
|
.endif
|
2015-05-26 21:44:15 +00:00
|
|
|
|
|
|
|
.if (!empty(_TARGETS) && ${_TARGETS:Nbuildworld:Nuniverse:Ninstallworld} == "") || defined(WITHOUT_META_MODE)
|
2015-05-29 06:45:32 +00:00
|
|
|
MK_AUTO_OBJ?= no
|
2015-05-26 21:44:15 +00:00
|
|
|
MK_META_MODE= no
|
|
|
|
MK_STAGING= no
|
|
|
|
MK_STAGING_PROG= no
|
|
|
|
MK_SYSROOT= no
|
2014-08-19 06:50:54 +00:00
|
|
|
UPDATE_DEPENDFILE=NO
|
|
|
|
.endif
|
2015-05-26 21:44:15 +00:00
|
|
|
|
2012-08-22 19:25:57 +00:00
|
|
|
# some handy macros
|
|
|
|
_this = ${.PARSEDIR:tA}/${.PARSEFILE}
|
|
|
|
# some useful modifiers
|
|
|
|
|
|
|
|
# A useful trick for testing multiple :M's against something
|
|
|
|
# :L says to use the variable's name as its value - ie. literal
|
|
|
|
# got = ${clean* destroy:${M_ListToMatch:S,V,.TARGETS,}}
|
|
|
|
M_ListToMatch = L:@m@$${V:M$$m}@
|
|
|
|
# match against our initial targets (see above)
|
|
|
|
M_L_TARGETS = ${M_ListToMatch:S,V,_TARGETS,}
|
|
|
|
|
|
|
|
# turn a list into a set of :N modifiers
|
|
|
|
# NskipFoo = ${Foo:${M_ListToSkip}}
|
|
|
|
M_ListToSkip= O:u:ts::S,:,:N,g:S,^,N,
|
|
|
|
|
|
|
|
# type should be a builtin in any sh since about 1980,
|
|
|
|
# AUTOCONF := ${autoconf:L:${M_whence}}
|
|
|
|
M_type = @x@(type $$x 2> /dev/null); echo;@:sh:[0]:N* found*:[@]:C,[()],,g
|
2014-05-10 00:23:12 +00:00
|
|
|
M_whence = ${M_type}:M/*:[1]
|
2012-08-22 19:25:57 +00:00
|
|
|
|
|
|
|
# convert a path to a valid shell variable
|
|
|
|
M_P2V = tu:C,[./-],_,g
|
|
|
|
|
|
|
|
MAKE_PRINT_VAR_ON_ERROR+= \
|
|
|
|
.CURDIR \
|
|
|
|
.MAKE \
|
|
|
|
.OBJDIR \
|
|
|
|
.TARGETS \
|
|
|
|
DESTDIR \
|
|
|
|
LD_LIBRARY_PATH \
|
|
|
|
MACHINE \
|
|
|
|
MACHINE_ARCH \
|
|
|
|
MAKEOBJDIRPREFIX \
|
2012-11-04 02:52:03 +00:00
|
|
|
MAKESYSPATH \
|
2012-08-22 19:25:57 +00:00
|
|
|
MAKE_VERSION\
|
2015-05-26 21:44:15 +00:00
|
|
|
SRCTOP \
|
2012-08-22 19:25:57 +00:00
|
|
|
OBJTOP \
|
|
|
|
${MAKE_PRINT_VAR_ON_ERROR_XTRAS}
|
|
|
|
|
2013-02-16 01:19:18 +00:00
|
|
|
.if ${.MAKE.LEVEL} > 0
|
|
|
|
MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH
|
|
|
|
.endif
|
|
|
|
|
2012-11-09 05:43:15 +00:00
|
|
|
# these are handy
|
|
|
|
# we can use this for a cheap timestamp at the start of a target's script,
|
|
|
|
# but not at the end - since make will expand both at the same time.
|
|
|
|
TIME_STAMP_FMT = @ %s [%Y-%m-%d %T]
|
|
|
|
TIME_STAMP = ${TIME_STAMP_FMT:localtime}
|
|
|
|
# this will produce the same output but as of when date(1) is run.
|
|
|
|
TIME_STAMP_DATE = `date '+${TIME_STAMP_FMT}'`
|
|
|
|
TIME_STAMP_END?= ${TIME_STAMP_DATE}
|
|
|
|
|