diff --git a/share/mk/Makefile b/share/mk/Makefile index 1663b787c662..2597ac5b2072 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -1,87 +1,91 @@ # @(#)Makefile 8.1 (Berkeley) 6/8/93 # Only parse this if executing make in this directory, not in other places # in src that lack a Makefile, such as sys/dev/*. Otherwise the MAKESYSPATH # will read this Makefile since it auto includes it into -I. .if ${.CURDIR} == ${.PARSEDIR} # Avoid creating a Makefile.depend here as it would get included anywhere # in the build, similar to the problem above. It would cause dirdeps.mk # to be included more times than desired. UPDATE_DEPENDFILE= no .include FILES= \ auto.obj.mk \ bsd.README \ bsd.arch.inc.mk \ bsd.clang-analyze.mk \ bsd.compiler.mk \ bsd.compat.mk \ bsd.compat.pre.mk \ bsd.confs.mk \ bsd.cpu.mk \ bsd.crunchgen.mk \ bsd.dep.mk \ bsd.dirs.mk \ bsd.doc.mk \ bsd.dtb.mk \ bsd.endian.mk \ bsd.files.mk \ bsd.incs.mk \ bsd.info.mk \ bsd.init.mk \ bsd.kmod.mk \ bsd.lib.mk \ bsd.libnames.mk \ bsd.linker.mk \ bsd.links.mk \ bsd.man.mk \ bsd.mkopt.mk \ bsd.nls.mk \ bsd.obj.mk \ bsd.opts.mk \ bsd.own.mk \ bsd.port.mk \ bsd.port.options.mk \ bsd.port.post.mk \ bsd.port.pre.mk \ bsd.port.subdir.mk \ bsd.prog.mk \ bsd.progs.mk \ bsd.snmpmod.mk \ bsd.subdir.mk \ bsd.suffixes-posix.mk \ bsd.suffixes.mk \ bsd.symver.mk \ bsd.sys.mk \ bsd.sysdir.mk \ bsd.test.mk \ dirdeps.mk \ dirdeps-options.mk \ + dirdeps-targets.mk \ gendirdeps.mk \ + host-target.mk \ install-new.mk \ + jobs.mk \ meta.autodep.mk \ meta.stage.mk \ meta.subdir.mk \ meta.sys.mk \ ${SRCTOP}/contrib/bmake/mk/posix.mk \ stage-install.sh \ sys.mk \ sys.dependfile.mk \ + sys.dirdeps.mk \ version_gen.awk FILESDIR= ${BINDIR}/mk .if ${MK_TESTS} != "no" FILES+= atf.test.mk FILES+= googletest.test.inc.mk FILES+= googletest.test.mk FILES+= plain.test.mk FILES+= suite.test.mk FILES+= tap.test.mk .endif .include .endif # CURDIR == PARSEDIR diff --git a/share/mk/local.sys.env.mk b/share/mk/local.sys.env.mk index c87a4b7dcf71..71a46f122bf4 100644 --- a/share/mk/local.sys.env.mk +++ b/share/mk/local.sys.env.mk @@ -1,59 +1,59 @@ # This makefile is for customizations that should be done early .if !defined(_TARGETS) # some things we do only once _TARGETS:= ${.TARGETS} .export _TARGETS .endif # 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 M_whence = ${M_type}:M/*:[1] # convert a path to a valid shell variable M_P2V = tu:C,[./-],_,g # 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} # Simplify auto.obj.mk mkdir -p handling and avoid unneeded/redundant # error spam and show a proper error. Mkdirs= Mkdirs() { mkdir -p $$* || :; } .if !empty(.MAKEFLAGS:M-s) ECHO_TRACE?= true .endif .include "src.sys.env.mk" .-include .if !defined(HOST_TARGET) || !defined(HOST_MACHINE) # we need HOST_TARGET etc below. .include .export HOST_TARGET .endif -.include +.include diff --git a/share/mk/sys.machine.mk b/share/mk/local.sys.machine.mk similarity index 94% rename from share/mk/sys.machine.mk rename to share/mk/local.sys.machine.mk index 716dd17d5cce..fc801a7cd11c 100644 --- a/share/mk/sys.machine.mk +++ b/share/mk/local.sys.machine.mk @@ -1,23 +1,23 @@ -.-include +.-include PSEUDO_MACHINE_LIST?= common host TARGET_MACHINE_LIST?= amd64 arm arm64 i386 powerpc riscv MACHINE_ARCH_host?= ${_HOST_ARCH} MACHINE_ARCH_LIST_arm?= armv7 ${EXTRA_ARCHES_arm} MACHINE_ARCH_LIST_arm64?= aarch64 MACHINE_ARCH_LIST_powerpc?= powerpc powerpc64 powerpc64le ${EXTRA_ARCHES_powerpc} MACHINE_ARCH_LIST_riscv?= riscv64 .for m in ${TARGET_MACHINE_LIST} MACHINE_ARCH_LIST_$m?= $m MACHINE_ARCH_$m?= ${MACHINE_ARCH_LIST_$m:[1]} # for backwards comatability MACHINE_ARCH.$m?= ${MACHINE_ARCH_$m} .endfor .if empty(MACHINE_ARCH) MACHINE_ARCH:= ${MACHINE_ARCH_${MACHINE}} .endif