summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2020-07-11 22:45:05 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2020-07-11 22:45:05 +0000
commit367d32e2b15fe0397ddecccaa04cf9ed0164c969 (patch)
tree0a2abe7ed935e714ada921e5d94a9859c1298a31 /mk
parent1a2b743f6b4022dada4eeaa96ac47a5c1a2429f5 (diff)
Import bmake-20200710vendor/NetBSD/bmake/20200710
from ChangeLog: o filemon/filemon_dev.c: use O_CLOEXEC rather than extra syscall o meta.c: target flagged .META is out-of-date if meta file missing o cond.c: fix for compare_expression when doEval=0 o unit-tests/Makefile: rework o filemon/filemon_dev.c: ensure filemon fd is closed on exec.
Notes
svn path=/vendor/NetBSD/bmake/dist/; revision=363115 svn path=/vendor/NetBSD/bmake/20200710/; revision=363116; tag=vendor/NetBSD/bmake/20200710
Diffstat (limited to 'mk')
-rw-r--r--mk/ChangeLog4
-rw-r--r--mk/dirdeps.mk35
-rw-r--r--mk/host-target.mk7
-rw-r--r--mk/install-mk4
4 files changed, 32 insertions, 18 deletions
diff --git a/mk/ChangeLog b/mk/ChangeLog
index bd8b1b1f5b72..ca42bc2839c5 100644
--- a/mk/ChangeLog
+++ b/mk/ChangeLog
@@ -1,3 +1,7 @@
+2020-07-10 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * dirdeps.mk: optimize content of dirdeps.cache
+
2020-06-28 Simon J Gerraty <sjg@beast.crufty.net>
* sys/*.mk: make it easier for local*sys.mk to customize by
diff --git a/mk/dirdeps.mk b/mk/dirdeps.mk
index ff38c53b648c..337692479898 100644
--- a/mk/dirdeps.mk
+++ b/mk/dirdeps.mk
@@ -1,4 +1,4 @@
-# $Id: dirdeps.mk,v 1.104 2020/05/16 23:21:48 sjg Exp $
+# $Id: dirdeps.mk,v 1.106 2020/07/11 16:25:17 sjg Exp $
# Copyright (c) 2010-2020, Simon J. Gerraty
# Copyright (c) 2010-2018, Juniper Networks, Inc.
@@ -507,7 +507,7 @@ ${DIRDEPS_CACHE}: .META .NOMETA_CMP
# we want to capture the dirdeps count in the cache
.END: _count_dirdeps
_count_dirdeps: .NOMETA
- @echo '.info $${.newline}$${TRACER}Makefiles read: total=${.MAKE.MAKEFILES:[#]} depend=${.MAKE.MAKEFILES:M*depend*:[#]} dirdeps=${.ALLTARGETS:M${SRCTOP}*:O:u:[#]}' >&3
+ @{ echo; echo '.info $${.newline}$${TRACER}Makefiles read: total=${.MAKE.MAKEFILES:[#]} depend=${.MAKE.MAKEFILES:M*depend*:[#]} dirdeps=${.ALLTARGETS:M${SRCTOP}*:O:u:[#]}'; } >&3
.endif
.elif !make(dirdeps) && !target(_count_dirdeps)
@@ -644,19 +644,19 @@ _build_all_dirs := ${_build_all_dirs:O:u}
.if ${.MAKEFLAGS:M-V${_V_READ_DIRDEPS}} == ""
.if !empty(_build_all_dirs)
.if ${BUILD_DIRDEPS_CACHE} == "yes"
-# guard against _build_all_dirs being too big for a single command line
-# first get list of dirs that need _DIRDEP_USE
-# then export that and _build_all_dirs
+x!= echo; { echo; echo '\# ${DEP_RELDIR}.${DEP_TARGET_SPEC}'; } >&3
+# guard against _new_dirdeps being too big for a single command line
_new_dirdeps := ${_build_all_dirs:@x@${target($x):?:$x}@}
-.export _new_dirdeps _build_all_dirs
-x!= echo; { echo '\# ${DEP_RELDIR}.${DEP_TARGET_SPEC}'; \
- echo "dirdeps: \\"; \
- for x in $$_build_all_dirs; do echo " $$x \\"; done; echo; \
- for x in $$_new_dirdeps; do echo "$$x: _DIRDEP_USE"; done; echo; } >&3
+.if !empty(_new_dirdeps)
+.export _new_dirdeps
+x!= echo; { echo; echo "dirdeps: \\"; \
+ for x in $$_new_dirdeps; do echo " $$x \\"; done; echo; \
+ for x in $$_new_dirdeps; do echo "$$x: _DIRDEP_USE"; done; } >&3
+.endif
.if !empty(DEP_EXPORT_VARS)
# Discouraged, but there are always exceptions.
# Handle it here rather than explain how.
-x!= { echo; ${DEP_EXPORT_VARS:@v@echo '$v=${$v}';@} echo '.export ${DEP_EXPORT_VARS}'; echo; } >&3; echo
+x!= echo; { echo; ${DEP_EXPORT_VARS:@v@echo '$v=${$v}';@} echo '.export ${DEP_EXPORT_VARS}'; echo; } >&3
.endif
.else
# this makes it all happen
@@ -675,6 +675,9 @@ DEP_EXPORT_VARS=
# this builds the dependency graph
.for m in ${_machines}
+.if ${BUILD_DIRDEPS_CACHE} == "yes" && !empty(_build_dirs)
+x!= echo; { echo; echo "${_this_dir}.$m: \\"; } >&3
+.endif
# it would be nice to do :N${.TARGET}
.if !empty(__qual_depdirs)
.for q in ${__qual_depdirs:${M_dep_qual_fixes:ts:}:E:O:u:N$m}
@@ -683,9 +686,10 @@ DEP_EXPORT_VARS=
.endif
.if ${BUILD_DIRDEPS_CACHE} == "yes"
_cache_deps := ${_build_dirs:M*.$q}
+.if !empty(_cache_deps)
.export _cache_deps
-x!= echo; { echo "${_this_dir}.$m: \\"; \
- for x in $$_cache_deps; do echo " $$x \\"; done; echo; } >&3
+x!= echo; for x in $$_cache_deps; do echo " $$x \\"; done >&3
+.endif
.else
${_this_dir}.$m: ${_build_dirs:M*.$q}
.endif
@@ -696,9 +700,10 @@ ${_this_dir}.$m: ${_build_dirs:M*.$q}
.endif
.if ${BUILD_DIRDEPS_CACHE} == "yes"
_cache_deps := ${_build_dirs:M*.$m:N${_this_dir}.$m}
+.if !empty(_cache_deps)
.export _cache_deps
-x!= echo; { echo "${_this_dir}.$m: \\"; \
- for x in $$_cache_deps; do echo " $$x \\"; done; echo; } >&3
+x!= echo; for x in $$_cache_deps; do echo " $$x \\"; done >&3
+.endif
.else
${_this_dir}.$m: ${_build_dirs:M*.$m:N${_this_dir}.$m}
.endif
diff --git a/mk/host-target.mk b/mk/host-target.mk
index f528db9c6d24..a83642c9698c 100644
--- a/mk/host-target.mk
+++ b/mk/host-target.mk
@@ -1,5 +1,5 @@
# RCSid:
-# $Id: host-target.mk,v 1.11 2015/10/25 00:07:20 sjg Exp $
+# $Id: host-target.mk,v 1.12 2020/07/08 23:35:29 sjg Exp $
# Host platform information; may be overridden
.if !defined(_HOST_OSNAME)
@@ -37,6 +37,11 @@ HOST_OSTYPE := ${_HOST_OSNAME:S,/,,g}-${_HOST_OSREL:C/\([^\)]*\)//}-${_HOST_ARC
HOST_OS := ${_HOST_OSNAME}
host_os := ${_HOST_OSNAME:tl}
HOST_TARGET := ${host_os:S,/,,g}${HOST_OSMAJOR}-${_HOST_ARCH}
+# sometimes we want HOST_TARGET32
+MACHINE32.amd64 = i386
+MACHINE32.x86_64 = i386
+_HOST_ARCH32 := ${MACHINE32.${_HOST_ARCH}:U${_HOST_ARCH:S,64$,,}}
+HOST_TARGET32 := ${host_os:S,/,,g}${HOST_OSMAJOR}-${_HOST_ARCH32}
# tr is insanely non-portable, accommodate the lowest common denominator
TR ?= tr
diff --git a/mk/install-mk b/mk/install-mk
index 83542a945cd4..486bcd25d05f 100644
--- a/mk/install-mk
+++ b/mk/install-mk
@@ -55,7 +55,7 @@
# Simon J. Gerraty <sjg@crufty.net>
# RCSid:
-# $Id: install-mk,v 1.173 2020/06/23 04:16:35 sjg Exp $
+# $Id: install-mk,v 1.174 2020/07/10 21:50:14 sjg Exp $
#
# @(#) Copyright (c) 1994 Simon J. Gerraty
#
@@ -70,7 +70,7 @@
# sjg@crufty.net
#
-MK_VERSION=20200622
+MK_VERSION=20200710
OWNER=
GROUP=
MODE=444