svn commit: r301499 - in projects/vnet: . bin/sh contrib/bmake contrib/bmake/mk contrib/elftoolchain/brandelf contrib/elftoolchain/elfcopy contrib/elftoolchain/elfdump contrib/elftoolchain/libdwarf...
Bjoern A. Zeeb
bz at FreeBSD.org
Mon Jun 6 10:21:56 UTC 2016
Author: bz
Date: Mon Jun 6 10:21:53 2016
New Revision: 301499
URL: https://svnweb.freebsd.org/changeset/base/301499
Log:
MfH @r301498
Sponsored by: The FreeBSD Foundation
Added:
projects/vnet/contrib/libucl/src/mum.h
- copied unchanged from r301498, head/contrib/libucl/src/mum.h
projects/vnet/etc/rc.d/ypldap
- copied unchanged from r301498, head/etc/rc.d/ypldap
projects/vnet/lib/clang/freebsd_cc_version.h
- copied unchanged from r301498, head/lib/clang/freebsd_cc_version.h
projects/vnet/lib/libblacklist/Makefile.depend
- copied unchanged from r301498, head/lib/libblacklist/Makefile.depend
projects/vnet/lib/libdevdctl/Makefile.depend
- copied unchanged from r301498, head/lib/libdevdctl/Makefile.depend
projects/vnet/libexec/blacklistd-helper/Makefile.depend
- copied unchanged from r301498, head/libexec/blacklistd-helper/Makefile.depend
projects/vnet/sys/boot/efi/libefi/time_event.c
- copied unchanged from r301498, head/sys/boot/efi/libefi/time_event.c
projects/vnet/sys/dev/bhnd/bhnd_nexus.c
- copied unchanged from r301498, head/sys/dev/bhnd/bhnd_nexus.c
projects/vnet/sys/dev/bhnd/bhnd_nexusvar.h
- copied unchanged from r301498, head/sys/dev/bhnd/bhnd_nexusvar.h
projects/vnet/sys/dev/bhnd/cores/chipc/chipc_cfi.c
- copied unchanged from r301498, head/sys/dev/bhnd/cores/chipc/chipc_cfi.c
projects/vnet/sys/dev/bhnd/cores/chipc/chipc_slicer.c
- copied unchanged from r301498, head/sys/dev/bhnd/cores/chipc/chipc_slicer.c
projects/vnet/sys/dev/bhnd/cores/chipc/chipc_slicer.h
- copied unchanged from r301498, head/sys/dev/bhnd/cores/chipc/chipc_slicer.h
projects/vnet/sys/dev/bhnd/cores/chipc/chipc_spi.c
- copied unchanged from r301498, head/sys/dev/bhnd/cores/chipc/chipc_spi.c
projects/vnet/sys/dev/bhnd/cores/chipc/chipc_spi.h
- copied unchanged from r301498, head/sys/dev/bhnd/cores/chipc/chipc_spi.h
projects/vnet/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c
- copied unchanged from r301498, head/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c
projects/vnet/sys/dev/hyperv/vmbus/hyperv_machdep.h
- copied unchanged from r301498, head/sys/dev/hyperv/vmbus/hyperv_machdep.h
projects/vnet/sys/dev/hyperv/vmbus/i386/hyperv_machdep.c
- copied unchanged from r301498, head/sys/dev/hyperv/vmbus/i386/hyperv_machdep.c
projects/vnet/usr.bin/bsdcat/Makefile.depend
- copied unchanged from r301498, head/usr.bin/bsdcat/Makefile.depend
projects/vnet/usr.bin/resizewin/Makefile.depend
- copied unchanged from r301498, head/usr.bin/resizewin/Makefile.depend
projects/vnet/usr.bin/sdiff/Makefile.depend
- copied unchanged from r301498, head/usr.bin/sdiff/Makefile.depend
projects/vnet/usr.sbin/blacklistctl/Makefile.depend
- copied unchanged from r301498, head/usr.sbin/blacklistctl/Makefile.depend
projects/vnet/usr.sbin/blacklistd/Makefile.depend
- copied unchanged from r301498, head/usr.sbin/blacklistd/Makefile.depend
projects/vnet/usr.sbin/zonectl/Makefile.depend
- copied unchanged from r301498, head/usr.sbin/zonectl/Makefile.depend
Deleted:
projects/vnet/contrib/libucl/src/xxhash.c
projects/vnet/contrib/libucl/src/xxhash.h
projects/vnet/sys/dev/bhnd/soc/bhnd_soc.c
projects/vnet/sys/dev/bhnd/soc/bhnd_soc.h
projects/vnet/sys/dev/siba/siba_cc.c
projects/vnet/sys/dev/siba/siba_mips.c
projects/vnet/sys/dev/siba/siba_pcib.c
projects/vnet/sys/dev/siba/siba_pcibvar.h
Modified:
projects/vnet/Makefile
projects/vnet/Makefile.inc1
projects/vnet/bin/sh/Makefile
projects/vnet/bin/sh/miscbltin.c
projects/vnet/contrib/bmake/ChangeLog
projects/vnet/contrib/bmake/Makefile
projects/vnet/contrib/bmake/bmake.1
projects/vnet/contrib/bmake/bmake.cat1
projects/vnet/contrib/bmake/boot-strap
projects/vnet/contrib/bmake/main.c
projects/vnet/contrib/bmake/make-bootstrap.sh.in
projects/vnet/contrib/bmake/make.1
projects/vnet/contrib/bmake/make.h
projects/vnet/contrib/bmake/meta.c
projects/vnet/contrib/bmake/mk/ChangeLog
projects/vnet/contrib/bmake/mk/dpadd.mk
projects/vnet/contrib/bmake/mk/install-mk
projects/vnet/contrib/bmake/mk/meta.autodep.mk
projects/vnet/contrib/bmake/mk/meta.stage.mk
projects/vnet/contrib/bmake/nonints.h
projects/vnet/contrib/bmake/var.c
projects/vnet/contrib/elftoolchain/brandelf/brandelf.c
projects/vnet/contrib/elftoolchain/elfcopy/main.c
projects/vnet/contrib/elftoolchain/elfdump/elfdump.c
projects/vnet/contrib/elftoolchain/libdwarf/libdwarf_reloc.c
projects/vnet/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c
projects/vnet/contrib/elftoolchain/readelf/readelf.c
projects/vnet/contrib/gcclibs/include/objalloc.h
projects/vnet/contrib/gcclibs/libiberty/objalloc.c
projects/vnet/contrib/libucl/src/Makefile.am
projects/vnet/contrib/libucl/src/ucl_hash.c
projects/vnet/contrib/libucl/src/ucl_internal.h
projects/vnet/contrib/libucl/src/ucl_msgpack.c
projects/vnet/contrib/libucl/src/ucl_parser.c
projects/vnet/contrib/libucl/src/ucl_util.c
projects/vnet/contrib/libucl/uthash/uthash.h
projects/vnet/contrib/one-true-awk/b.c
projects/vnet/contrib/one-true-awk/lex.c
projects/vnet/contrib/one-true-awk/maketab.c
projects/vnet/contrib/one-true-awk/parse.c
projects/vnet/contrib/one-true-awk/run.c
projects/vnet/contrib/one-true-awk/tran.c
projects/vnet/crypto/openssl/crypto/opensslv.h
projects/vnet/etc/defaults/periodic.conf
projects/vnet/etc/defaults/rc.conf
projects/vnet/etc/mtree/BSD.usr.dist
projects/vnet/etc/rc.d/Makefile
projects/vnet/gnu/usr.bin/cc/c++/Makefile.depend
projects/vnet/gnu/usr.bin/cc/cc/Makefile.depend
projects/vnet/gnu/usr.bin/cc/cc1/Makefile.depend
projects/vnet/gnu/usr.bin/cc/cc1plus/Makefile.depend
projects/vnet/gnu/usr.bin/cc/cc_tools/Makefile.depend
projects/vnet/gnu/usr.bin/cc/cpp/Makefile.depend
projects/vnet/gnu/usr.bin/cc/gcov/Makefile.depend
projects/vnet/gnu/usr.bin/groff/src/libs/libdriver/Makefile.depend
projects/vnet/gnu/usr.bin/groff/src/libs/libgroff/Makefile.depend
projects/vnet/kerberos5/Makefile.inc
projects/vnet/kerberos5/lib/libasn1/Makefile
projects/vnet/kerberos5/lib/libgssapi_spnego/Makefile
projects/vnet/kerberos5/lib/libhdb/Makefile
projects/vnet/kerberos5/lib/libhx509/Makefile
projects/vnet/kerberos5/tools/asn1_compile/Makefile.depend
projects/vnet/lib/clang/include/clang/Basic/Version.inc
projects/vnet/lib/clang/libclangbasic/Makefile
projects/vnet/lib/libc/gen/fnmatch.c
projects/vnet/lib/libc/gen/glob.c
projects/vnet/lib/libc/locale/collate.h
projects/vnet/lib/libc/locale/collcmp.c
projects/vnet/lib/libc/regex/regcomp.c
projects/vnet/lib/libc/stdlib/random.3
projects/vnet/lib/libc/sys/_umtx_op.2
projects/vnet/lib/libc/sys/cpuset_getaffinity.2
projects/vnet/lib/libc/sys/thr_new.2
projects/vnet/lib/libelftc/Makefile
projects/vnet/lib/libthr/libthr.3
projects/vnet/lib/libucl/Makefile
projects/vnet/libexec/rlogind/Makefile
projects/vnet/libexec/rlogind/rlogind.c
projects/vnet/release/release.conf.sample
projects/vnet/release/release.sh
projects/vnet/sbin/ifconfig/ifconfig.8
projects/vnet/sbin/ifconfig/ifvlan.c
projects/vnet/share/examples/Makefile
projects/vnet/share/man/man3/pthread_attr_affinity_np.3
projects/vnet/share/man/man3/pthread_create.3
projects/vnet/share/man/man4/bcma.4
projects/vnet/share/man/man4/bhnd.4
projects/vnet/share/man/man4/bhndb.4
projects/vnet/share/man/man4/siba.4
projects/vnet/share/man/man4/vlan.4
projects/vnet/share/man/man5/src.conf.5
projects/vnet/share/mk/bsd.compiler.mk
projects/vnet/share/mk/bsd.dep.mk
projects/vnet/share/mk/bsd.info.mk
projects/vnet/share/mk/bsd.lib.mk
projects/vnet/share/mk/bsd.man.mk
projects/vnet/share/mk/bsd.nls.mk
projects/vnet/share/mk/bsd.prog.mk
projects/vnet/share/mk/bsd.snmpmod.mk
projects/vnet/share/mk/local.meta.sys.mk
projects/vnet/share/mk/meta.stage.mk
projects/vnet/share/mk/src.opts.mk
projects/vnet/share/mk/sys.mk
projects/vnet/sys/amd64/amd64/pmap.c
projects/vnet/sys/arm/arm/nexus.c
projects/vnet/sys/arm/mv/mv_common.c
projects/vnet/sys/arm/nvidia/tegra124/tegra124_cpufreq.c
projects/vnet/sys/arm64/arm64/gic_v3.c
projects/vnet/sys/arm64/arm64/nexus.c
projects/vnet/sys/boot/efi/include/efilib.h
projects/vnet/sys/boot/efi/libefi/Makefile
projects/vnet/sys/boot/efi/libefi/time.c
projects/vnet/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c
projects/vnet/sys/boot/efi/loader/arch/arm/exec.c
projects/vnet/sys/boot/efi/loader/arch/arm64/exec.c
projects/vnet/sys/boot/efi/loader/arch/i386/elf32_freebsd.c
projects/vnet/sys/boot/efi/loader/main.c
projects/vnet/sys/cam/ctl/ctl_frontend_iscsi.c
projects/vnet/sys/cam/ctl/ctl_frontend_iscsi.h
projects/vnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
projects/vnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
projects/vnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
projects/vnet/sys/conf/files
projects/vnet/sys/conf/files.amd64
projects/vnet/sys/conf/files.i386
projects/vnet/sys/conf/kern.post.mk
projects/vnet/sys/conf/kern.pre.mk
projects/vnet/sys/conf/kmod.mk
projects/vnet/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h
projects/vnet/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c
projects/vnet/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_mci.c
projects/vnet/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c
projects/vnet/sys/contrib/dev/ath/ath_hal/ar9300/ar9462_2p0_initvals.h
projects/vnet/sys/dev/acpica/acpi_lid.c
projects/vnet/sys/dev/ath/ath_hal/ah_btcoex.h
projects/vnet/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c
projects/vnet/sys/dev/ath/if_ath_btcoex.c
projects/vnet/sys/dev/bhnd/bcma/bcma.c
projects/vnet/sys/dev/bhnd/bcma/bcma_nexus.c
projects/vnet/sys/dev/bhnd/bhnd.h
projects/vnet/sys/dev/bhnd/bhnd_bus_if.m
projects/vnet/sys/dev/bhnd/bhnd_subr.c
projects/vnet/sys/dev/bhnd/cores/chipc/bhnd_chipc_if.m
projects/vnet/sys/dev/bhnd/cores/chipc/bhnd_sprom_chipc.c
projects/vnet/sys/dev/bhnd/cores/chipc/chipc.c
projects/vnet/sys/dev/bhnd/cores/chipc/chipc.h
projects/vnet/sys/dev/bhnd/cores/chipc/chipcreg.h
projects/vnet/sys/dev/bhnd/cores/chipc/chipcvar.h
projects/vnet/sys/dev/bhnd/nvram/bhnd_nvram.h
projects/vnet/sys/dev/bhnd/nvram/bhnd_sprom.c
projects/vnet/sys/dev/bhnd/nvram/bhnd_sprom_subr.c
projects/vnet/sys/dev/bhnd/nvram/bhnd_spromvar.h
projects/vnet/sys/dev/bhnd/siba/siba.c
projects/vnet/sys/dev/bhnd/siba/siba_nexus.c
projects/vnet/sys/dev/bhnd/siba/siba_subr.c
projects/vnet/sys/dev/bwn/if_bwn.c
projects/vnet/sys/dev/bwn/if_bwn_phy_n.c
projects/vnet/sys/dev/cesa/cesa.c
projects/vnet/sys/dev/cesa/cesa.h
projects/vnet/sys/dev/etherswitch/mtkswitch/mtkswitch_mt7620.c
projects/vnet/sys/dev/fdt/simplebus.c
projects/vnet/sys/dev/filemon/filemon.c
projects/vnet/sys/dev/filemon/filemon_wrapper.c
projects/vnet/sys/dev/gpio/ofw_gpiobus.c
projects/vnet/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
projects/vnet/sys/dev/hyperv/vmbus/hv_connection.c
projects/vnet/sys/dev/hyperv/vmbus/hv_vmbus_priv.h
projects/vnet/sys/dev/hyperv/vmbus/hyperv.c
projects/vnet/sys/dev/hyperv/vmbus/vmbus.c
projects/vnet/sys/dev/hyperv/vmbus/vmbus_reg.h
projects/vnet/sys/dev/hyperv/vmbus/vmbus_var.h
projects/vnet/sys/dev/iicbus/ofw_iicbus.c
projects/vnet/sys/dev/ioat/ioat.c
projects/vnet/sys/dev/ioat/ioat.h
projects/vnet/sys/dev/ioat/ioat_internal.h
projects/vnet/sys/dev/iscsi/iscsi.c
projects/vnet/sys/dev/iscsi/iscsi_ioctl.h
projects/vnet/sys/dev/ntb/ntb_hw/ntb_hw.c
projects/vnet/sys/dev/nxge/xgehal/xgehal-device.c
projects/vnet/sys/dev/ofw/ofw_bus_subr.c
projects/vnet/sys/dev/ofw/ofw_bus_subr.h
projects/vnet/sys/dev/ofw/ofwbus.c
projects/vnet/sys/dev/pci/pci_host_generic.c
projects/vnet/sys/dev/sfxge/common/ef10_ev.c
projects/vnet/sys/dev/sfxge/common/ef10_nic.c
projects/vnet/sys/dev/sfxge/common/ef10_tlv_layout.h
projects/vnet/sys/dev/sfxge/common/efx.h
projects/vnet/sys/dev/sfxge/common/efx_ev.c
projects/vnet/sys/dev/sfxge/sfxge.c
projects/vnet/sys/dev/sfxge/sfxge_ev.c
projects/vnet/sys/dev/sfxge/sfxge_intr.c
projects/vnet/sys/dev/sfxge/sfxge_rx.c
projects/vnet/sys/dev/sfxge/sfxge_tx.c
projects/vnet/sys/dev/usb/wlan/if_run.c
projects/vnet/sys/dev/vnic/mrml_bridge.c
projects/vnet/sys/dev/vnic/thunder_mdio_fdt.c
projects/vnet/sys/kern/bus_if.m
projects/vnet/sys/kern/init_main.c
projects/vnet/sys/kern/kern_fork.c
projects/vnet/sys/kern/kern_proc.c
projects/vnet/sys/kern/kern_synch.c
projects/vnet/sys/kern/kern_thread.c
projects/vnet/sys/kern/sched_4bsd.c
projects/vnet/sys/kern/sched_ule.c
projects/vnet/sys/kern/subr_bus.c
projects/vnet/sys/kern/subr_intr.c
projects/vnet/sys/mips/broadcom/files.broadcom
projects/vnet/sys/mips/broadcom/uart_bus_chipc.c
projects/vnet/sys/mips/conf/BCM
projects/vnet/sys/mips/conf/BCM.hints
projects/vnet/sys/mips/conf/SENTRY5
projects/vnet/sys/mips/conf/SENTRY5.hints
projects/vnet/sys/mips/mips/locore.S
projects/vnet/sys/mips/mips/nexus.c
projects/vnet/sys/modules/hyperv/vmbus/Makefile
projects/vnet/sys/modules/sfxge/Makefile
projects/vnet/sys/net/if.h
projects/vnet/sys/net/if_vlan.c
projects/vnet/sys/net/if_vlan_var.h
projects/vnet/sys/netinet/icmp6.h
projects/vnet/sys/netpfil/ipfw/ip_fw_table_algo.c
projects/vnet/sys/sys/bus.h
projects/vnet/sys/sys/intr.h
projects/vnet/sys/sys/priv.h
projects/vnet/sys/sys/proc.h
projects/vnet/sys/sys/soundcard.h
projects/vnet/sys/x86/x86/local_apic.c
projects/vnet/targets/pseudo/bootstrap-tools/Makefile
projects/vnet/targets/pseudo/tests/Makefile.depend
projects/vnet/targets/pseudo/userland/Makefile.depend
projects/vnet/targets/pseudo/userland/lib/Makefile.depend
projects/vnet/targets/pseudo/userland/libexec/Makefile.depend
projects/vnet/tools/build/mk/OptionalObsoleteFiles.inc
projects/vnet/tools/build/options/WITH_META_MODE
projects/vnet/usr.bin/bmake/Makefile
projects/vnet/usr.bin/elfcopy/Makefile
projects/vnet/usr.bin/getent/getent.1
projects/vnet/usr.bin/getent/getent.c
projects/vnet/usr.bin/iscsictl/iscsictl.c
projects/vnet/usr.sbin/acpi/iasl/Makefile
projects/vnet/usr.sbin/bluetooth/btpand/btpand.c
projects/vnet/usr.sbin/bsnmpd/bsnmpd/Makefile
projects/vnet/usr.sbin/ctladm/ctladm.c
projects/vnet/usr.sbin/ctld/ctld.h
projects/vnet/usr.sbin/ctld/kernel.c
projects/vnet/usr.sbin/ctld/login.c
projects/vnet/usr.sbin/pw/pw_group.c
projects/vnet/usr.sbin/pw/pw_user.c
Directory Properties:
projects/vnet/ (props changed)
projects/vnet/contrib/bmake/ (props changed)
projects/vnet/contrib/elftoolchain/ (props changed)
projects/vnet/contrib/elftoolchain/brandelf/ (props changed)
projects/vnet/contrib/elftoolchain/elfdump/ (props changed)
projects/vnet/contrib/libucl/ (props changed)
projects/vnet/contrib/one-true-awk/ (props changed)
projects/vnet/crypto/openssl/ (props changed)
projects/vnet/gnu/usr.bin/cc/cc_tools/ (props changed)
projects/vnet/sys/cddl/contrib/opensolaris/ (props changed)
Modified: projects/vnet/Makefile
==============================================================================
--- projects/vnet/Makefile Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/Makefile Mon Jun 6 10:21:53 2016 (r301499)
@@ -103,7 +103,9 @@
# This is included so CC is set to ccache for -V, and COMPILER_TYPE/VERSION
# can be cached for sub-makes.
+.if ${MAKE_VERSION} >= 20140620
.include <bsd.compiler.mk>
+.endif
# Note: we use this awkward construct to be compatible with FreeBSD's
# old make used in 10.0 and 9.2 and earlier.
@@ -162,17 +164,26 @@ _MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH
# We cannot blindly use a make which may not be the one we want
# so be exlicit - until all choice is removed.
WANT_MAKE= bmake
+.if !empty(.MAKE.MODE:Mmeta)
+# 20160604 - support missing-meta,missing-filemon and performance improvements
+WANT_MAKE_VERSION= 20160604
+.else
# 20160220 - support .dinclude for FAST_DEPEND.
WANT_MAKE_VERSION= 20160220
+.endif
MYMAKE= ${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE}/${WANT_MAKE}
.if defined(.PARSEDIR)
HAVE_MAKE= bmake
.else
HAVE_MAKE= fmake
.endif
+.if ${HAVE_MAKE} != ${WANT_MAKE} || \
+ (defined(WANT_MAKE_VERSION) && ${MAKE_VERSION} < ${WANT_MAKE_VERSION})
+NEED_MAKE_UPGRADE= t
+.endif
.if exists(${MYMAKE})
SUB_MAKE:= ${MYMAKE} -m ${.CURDIR}/share/mk
-.elif ${WANT_MAKE} != ${HAVE_MAKE}
+.elif defined(NEED_MAKE_UPGRADE)
# It may not exist yet but we may cause it to.
# In the case of fmake, upgrade_checks may cause a newer version to be built.
SUB_MAKE= `test -x ${MYMAKE} && echo ${MYMAKE} || echo ${MAKE}` \
@@ -313,8 +324,7 @@ kernel: buildkernel installkernel
# for building the world.
#
upgrade_checks:
-.if ${HAVE_MAKE} != ${WANT_MAKE} || \
- (defined(WANT_MAKE_VERSION) && ${MAKE_VERSION} < ${WANT_MAKE_VERSION})
+.if defined(NEED_MAKE_UPGRADE)
@${_+_}(cd ${.CURDIR} && ${MAKE} ${WANT_MAKE:S,^f,,})
.endif
Modified: projects/vnet/Makefile.inc1
==============================================================================
--- projects/vnet/Makefile.inc1 Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/Makefile.inc1 Mon Jun 6 10:21:53 2016 (r301499)
@@ -99,7 +99,7 @@ _expected_compiler_type= gcc
.if ${_expected_compiler_type} == "clang"
CROSS_COMPILER_FREEBSD_VERSION!= \
awk '$$2 == "FREEBSD_CC_VERSION" {printf("%d\n", $$3)}' \
- ${SRCDIR}/lib/clang/include/clang/Basic/Version.inc || echo unknown
+ ${SRCDIR}/lib/clang/freebsd_cc_version.h || echo unknown
CROSS_COMPILER_VERSION!= \
awk '$$2 == "CLANG_VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \
${SRCDIR}/lib/clang/include/clang/Basic/Version.inc || echo unknown
@@ -118,9 +118,6 @@ CROSS_COMPILER_VERSION!= \
# Everything matches, disable the bootstrap compiler.
MK_CLANG_BOOTSTRAP= no
MK_GCC_BOOTSTRAP= no
-CROSSENV+= COMPILER_VERSION=${COMPILER_VERSION} \
- COMPILER_TYPE=${COMPILER_TYPE} \
- COMPILER_FREEBSD_VERSION=${COMPILER_FREEBSD_VERSION}
.if make(buildworld)
.info SYSTEM_COMPILER: Determined that CC=${CC} matches the source tree. Not bootstrapping a cross-compiler.
.endif
@@ -128,6 +125,21 @@ CROSSENV+= COMPILER_VERSION=${COMPILER_V
.endif # ${_expected_compiler_type} == ${COMPILER_TYPE}
.endif # ${XCC:N${CCACHE_BIN}:M/*}
+# For installworld need to ensure that the looked-up compiler metadata is
+# passed along rather than trying to run cc from the restricted
+# STRICTTMPPATH.
+.if ${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no"
+.if !defined(X_COMPILER_TYPE)
+CROSSENV+= COMPILER_VERSION=${COMPILER_VERSION} \
+ COMPILER_TYPE=${COMPILER_TYPE} \
+ COMPILER_FREEBSD_VERSION=${COMPILER_FREEBSD_VERSION}
+.else
+CROSSENV+= COMPILER_VERSION=${X_COMPILER_VERSION} \
+ COMPILER_TYPE=${X_COMPILER_TYPE} \
+ COMPILER_FREEBSD_VERSION=${X_COMPILER_FREEBSD_VERSION}
+.endif
+.endif
+
# Handle external binutils.
.if defined(CROSS_TOOLCHAIN_PREFIX)
CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX}
@@ -419,6 +431,9 @@ PACKAGE= kernel
#
BOOTSTRAPPING?= 0
+# Keep these in sync
+MINIMUM_SUPPORTED_OSREL?= 900044
+MINIMUM_SUPPORTED_REL?= 9.1
# Common environment for world related stages
CROSSENV+= MAKEOBJDIRPREFIX=${OBJTREE} \
@@ -1500,8 +1515,8 @@ _elftoolchain_libs= lib/libelf lib/libdw
.endif
legacy: .PHONY
-.if ${BOOTSTRAPPING} < 800107 && ${BOOTSTRAPPING} != 0
- @echo "ERROR: Source upgrades from versions prior to 8.0 are not supported."; \
+.if ${BOOTSTRAPPING} < ${MINIMUM_SUPPORTED_OSREL} && ${BOOTSTRAPPING} != 0
+ @echo "ERROR: Source upgrades from versions prior to ${MINIMUM_SUPPORTED_REL} are not supported."; \
false
.endif
.for _tool in tools/build ${_elftoolchain_libs}
@@ -1509,8 +1524,9 @@ legacy: .PHONY
cd ${.CURDIR}/${_tool}; \
${MAKE} DIRPRFX=${_tool}/ obj; \
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \
- ${MAKE} DIRPRFX=${_tool}/ all; \
- ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
+ ${MAKE} DIRPRFX=${_tool}/ MK_INCLUDES=no all; \
+ ${MAKE} DIRPRFX=${_tool}/ MK_INCLUDES=no \
+ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
.endfor
#
Modified: projects/vnet/bin/sh/Makefile
==============================================================================
--- projects/vnet/bin/sh/Makefile Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/bin/sh/Makefile Mon Jun 6 10:21:53 2016 (r301499)
@@ -39,6 +39,7 @@ CLEANFILES+= ${GENSRCS} ${GENHDRS}
build-tools: mknodes mksyntax
.ORDER: builtins.c builtins.h
+builtins.h: .NOMETA
builtins.c builtins.h: mkbuiltins builtins.def
sh ${.CURDIR}/mkbuiltins ${.CURDIR}
@@ -51,10 +52,12 @@ mknodes: mknodes.o ${BUILD_TOOLS_META}
mksyntax: mksyntax.o ${BUILD_TOOLS_META}
.ORDER: nodes.c nodes.h
+nodes.h: .NOMETA
nodes.c nodes.h: mknodes nodetypes nodes.c.pat
${BTOOLSPATH:U.}/mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
.ORDER: syntax.c syntax.h
+syntax.h: .NOMETA
syntax.c syntax.h: mksyntax
${BTOOLSPATH:U.}/mksyntax
Modified: projects/vnet/bin/sh/miscbltin.c
==============================================================================
--- projects/vnet/bin/sh/miscbltin.c Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/bin/sh/miscbltin.c Mon Jun 6 10:21:53 2016 (r301499)
@@ -406,7 +406,7 @@ static const struct limits limits[] = {
{ "swap limit", "kbytes", RLIMIT_SWAP, 1024, 'w' },
#endif
#ifdef RLIMIT_SBSIZE
- { "sbsize", "bytes", RLIMIT_SBSIZE, 1, 'b' },
+ { "socket buffer size", "bytes", RLIMIT_SBSIZE, 1, 'b' },
#endif
#ifdef RLIMIT_NPTS
{ "pseudo-terminals", (char *)0, RLIMIT_NPTS, 1, 'p' },
@@ -415,7 +415,7 @@ static const struct limits limits[] = {
{ "kqueues", (char *)0, RLIMIT_KQUEUES, 1, 'k' },
#endif
#ifdef RLIMIT_UMTXP
- { "umtxp", (char *)0, RLIMIT_UMTXP, 1, 'o' },
+ { "umtx shared locks", (char *)0, RLIMIT_UMTXP, 1, 'o' },
#endif
{ (char *) 0, (char *)0, 0, 0, '\0' }
};
Modified: projects/vnet/contrib/bmake/ChangeLog
==============================================================================
--- projects/vnet/contrib/bmake/ChangeLog Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/ChangeLog Mon Jun 6 10:21:53 2016 (r301499)
@@ -1,3 +1,26 @@
+2016-06-04 Simon J. Gerraty <sjg at bad.crufty.net>
+
+ * Makefile (_MAKE_VERSION): 20160604
+ Merge with NetBSD make, pick up
+ o meta.c: missing filemon data is only relevant if we read a
+ meta file.
+ Also do not return oodate for a missing metafile if gn->path
+ points to .CURDIR
+
+2016-06-02 Simon J. Gerraty <sjg at bad.crufty.net>
+
+ * Makefile (_MAKE_VERSION): 20160602
+ Merge with NetBSD make, pick up
+ o cached_realpath(): avoid hitting filesystem more than necessary.
+ o meta.c: refactor need_meta decision, add knobs for
+ missing meta file and filemon data wrt out-of-datedness.
+
+2016-05-28 Simon J. Gerraty <sjg at bad.crufty.net>
+
+ * Makefile (_MAKE_VERSION): 20160528
+
+ * boot-strap, make-bootstrap.sh.in: Makefile now uses _MAKE_VERSION
+
2016-05-12 Simon J. Gerraty <sjg at bad.crufty.net>
* Makefile (_MAKE_VERSION): 20160512
Modified: projects/vnet/contrib/bmake/Makefile
==============================================================================
--- projects/vnet/contrib/bmake/Makefile Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/Makefile Mon Jun 6 10:21:53 2016 (r301499)
@@ -1,7 +1,7 @@
-# $Id: Makefile,v 1.63 2016/05/12 20:34:46 sjg Exp $
+# $Id: Makefile,v 1.66 2016/06/04 22:21:15 sjg Exp $
# Base version on src date
-_MAKE_VERSION= 20160512
+_MAKE_VERSION= 20160604
PROG= bmake
Modified: projects/vnet/contrib/bmake/bmake.1
==============================================================================
--- projects/vnet/contrib/bmake/bmake.1 Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/bmake.1 Mon Jun 6 10:21:53 2016 (r301499)
@@ -1,4 +1,4 @@
-.\" $NetBSD: make.1,v 1.257 2016/05/10 23:45:45 sjg Exp $
+.\" $NetBSD: make.1,v 1.259 2016/06/03 07:07:37 wiz Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" from: @(#)make.1 8.4 (Berkeley) 3/19/94
.\"
-.Dd May 10, 2016
+.Dd June 2, 2016
.Dt MAKE 1
.Os
.Sh NAME
@@ -846,7 +846,7 @@ Can affect the mode that
.Nm
runs in.
It can contain a number of keywords:
-.Bl -hang -width ignore-cmd
+.Bl -hang -width missing-filemon=bf.
.It Pa compat
Like
.Fl B ,
@@ -870,6 +870,17 @@ will not create .meta files in
This can be overridden by setting
.Va bf
to a value which represents True.
+.It Pa missing-meta= Ar bf
+If
+.Va bf
+is True, then a missing .meta file makes the target out-of-date.
+.It Pa missing-filemon= Ar bf
+If
+.Va bf
+is True, then missing filemon data makes the target out-of-date.
+.It Pa nofilemon
+Do not use
+.Xr filemon 4 .
.It Pa env
For debugging, it can be useful to include the environment
in the .meta file.
Modified: projects/vnet/contrib/bmake/bmake.cat1
==============================================================================
--- projects/vnet/contrib/bmake/bmake.cat1 Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/bmake.cat1 Mon Jun 6 10:21:53 2016 (r301499)
@@ -531,37 +531,51 @@ VVAARRIIAABBLLEE AASSSSIIGG
mode that bbmmaakkee runs in. It can contain a number of key-
words:
- _c_o_m_p_a_t Like --BB, puts bbmmaakkee into "compat" mode.
+ _c_o_m_p_a_t Like --BB, puts bbmmaakkee into "compat"
+ mode.
- _m_e_t_a Puts bbmmaakkee into "meta" mode, where meta files
- are created for each target to capture the
- command run, the output generated and if
- filemon(4) is available, the system calls
- which are of interest to bbmmaakkee. The captured
- output can be very useful when diagnosing
- errors.
-
- _c_u_r_d_i_r_O_k_= _b_f Normally bbmmaakkee will not create .meta files
- in `_._C_U_R_D_I_R'. This can be overridden by set-
- ting _b_f to a value which represents True.
-
- _e_n_v For debugging, it can be useful to include
- the environment in the .meta file.
-
- _v_e_r_b_o_s_e If in "meta" mode, print a clue about the
- target being built. This is useful if the
- build is otherwise running silently. The
- message printed the value of:
- _._M_A_K_E_._M_E_T_A_._P_R_E_F_I_X.
-
- _i_g_n_o_r_e_-_c_m_d Some makefiles have commands which are simply
- not stable. This keyword causes them to be
- ignored for determining whether a target is
- out of date in "meta" mode. See also
- ..NNOOMMEETTAA__CCMMPP.
+ _m_e_t_a Puts bbmmaakkee into "meta" mode, where
+ meta files are created for each tar-
+ get to capture the command run, the
+ output generated and if filemon(4)
+ is available, the system calls which
+ are of interest to bbmmaakkee. The cap-
+ tured output can be very useful when
+ diagnosing errors.
+
+ _c_u_r_d_i_r_O_k_= _b_f Normally bbmmaakkee will not create .meta
+ files in `_._C_U_R_D_I_R'. This can be
+ overridden by setting _b_f to a value
+ which represents True.
+
+ _m_i_s_s_i_n_g_-_m_e_t_a_= _b_f If _b_f is True, then a missing .meta
+ file makes the target out-of-date.
+
+ _m_i_s_s_i_n_g_-_f_i_l_e_m_o_n_= _b_f If _b_f is True, then missing filemon
+ data makes the target out-of-date.
+
+ _n_o_f_i_l_e_m_o_n Do not use filemon(4).
+
+ _e_n_v For debugging, it can be useful to
+ include the environment in the .meta
+ file.
+
+ _v_e_r_b_o_s_e If in "meta" mode, print a clue
+ about the target being built. This
+ is useful if the build is otherwise
+ running silently. The message
+ printed the value of:
+ _._M_A_K_E_._M_E_T_A_._P_R_E_F_I_X.
+
+ _i_g_n_o_r_e_-_c_m_d Some makefiles have commands which
+ are simply not stable. This keyword
+ causes them to be ignored for deter-
+ mining whether a target is out of
+ date in "meta" mode. See also
+ ..NNOOMMEETTAA__CCMMPP.
- _s_i_l_e_n_t_= _b_f If _b_f is True, when a .meta file is created,
- mark the target ..SSIILLEENNTT.
+ _s_i_l_e_n_t_= _b_f If _b_f is True, when a .meta file is
+ created, mark the target ..SSIILLEENNTT.
_._M_A_K_E_._M_E_T_A_._B_A_I_L_I_W_I_C_K
In "meta" mode, provides a list of prefixes which match
@@ -1475,4 +1489,4 @@ BBUUGGSS
There is no way of escaping a space character in a filename.
-NetBSD 5.1 May 10, 2016 NetBSD 5.1
+NetBSD 5.1 June 2, 2016 NetBSD 5.1
Modified: projects/vnet/contrib/bmake/boot-strap
==============================================================================
--- projects/vnet/contrib/bmake/boot-strap Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/boot-strap Mon Jun 6 10:21:53 2016 (r301499)
@@ -111,7 +111,7 @@
# Simon J. Gerraty <sjg at crufty.net>
# RCSid:
-# $Id: boot-strap,v 1.48 2015/10/25 05:20:48 sjg Exp $
+# $Id: boot-strap,v 1.49 2016/05/29 00:09:14 sjg Exp $
#
# @(#) Copyright (c) 2001 Simon J. Gerraty
#
@@ -451,7 +451,7 @@ op_all() {
op_install
else
op_test
- MAKE_VERSION=`sed -n '/^MAKE_VERSION/ { s,.*= *,,;p; }' $srcdir/Makefile`
+ MAKE_VERSION=`sed -n '/^_MAKE_VERSION/ { s,.*= *,,;p; }' $srcdir/Makefile`
echo You can install by running:
echo
echo $0 $cmd_args op=install
Modified: projects/vnet/contrib/bmake/main.c
==============================================================================
--- projects/vnet/contrib/bmake/main.c Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/main.c Mon Jun 6 10:21:53 2016 (r301499)
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.244 2016/04/05 04:25:43 sjg Exp $ */
+/* $NetBSD: main.c,v 1.245 2016/06/03 01:21:59 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.244 2016/04/05 04:25:43 sjg Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.245 2016/06/03 01:21:59 sjg Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: main.c,v 1.244 2016/04/05 04:25:43 sjg Exp $");
+__RCSID("$NetBSD: main.c,v 1.245 2016/06/03 01:21:59 sjg Exp $");
#endif
#endif /* not lint */
#endif
@@ -1014,7 +1014,7 @@ main(int argc, char **argv)
/*
* A relative path, canonicalize it.
*/
- p1 = realpath(argv[0], mdpath);
+ p1 = cached_realpath(argv[0], mdpath);
if (!p1 || *p1 != '/' || stat(p1, &sb) < 0) {
p1 = argv[0]; /* realpath failed */
}
@@ -1884,6 +1884,40 @@ usage(void)
}
+/*
+ * realpath(3) can get expensive, cache results...
+ */
+char *
+cached_realpath(const char *pathname, char *resolved)
+{
+ static GNode *cache;
+ char *rp, *cp;
+
+ if (!pathname || !pathname[0])
+ return NULL;
+
+ if (!cache) {
+ cache = Targ_NewGN("Realpath");
+#ifndef DEBUG_REALPATH_CACHE
+ cache->flags = INTERNAL;
+#endif
+ }
+
+ rp = Var_Value(pathname, cache, &cp);
+ if (rp) {
+ /* a hit */
+ if (resolved)
+ strlcpy(resolved, rp, MAXPATHLEN);
+ else
+ resolved = bmake_strdup(rp);
+ } else {
+ if ((rp = realpath(pathname, resolved))) {
+ Var_Set(pathname, rp, cache, 0);
+ }
+ }
+ return rp ? resolved : NULL;
+}
+
int
PrintAddr(void *a, void *b)
{
Modified: projects/vnet/contrib/bmake/make-bootstrap.sh.in
==============================================================================
--- projects/vnet/contrib/bmake/make-bootstrap.sh.in Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/make-bootstrap.sh.in Mon Jun 6 10:21:53 2016 (r301499)
@@ -13,7 +13,7 @@ esac
CC="@CC@"
CFLAGS="@CFLAGS@ -I. -I${srcdir} @DEFS@ @CPPFLAGS@ -DMAKE_NATIVE ${XDEFS} -DBMAKE_PATH_MAX=@bmake_path_max@"
-MAKE_VERSION=`sed -n '/^MAKE_VERSION=/s,.*=[^0-9]*,,p' $srcdir/Makefile`
+MAKE_VERSION=`sed -n '/^_MAKE_VERSION=/s,.*=[^0-9]*,,p' $srcdir/Makefile`
MDEFS="-DMAKE_VERSION=\"$MAKE_VERSION\" \
-D at force_machine@MACHINE=\"@machine@\" -DMACHINE_ARCH=\"@machine_arch@\" \
Modified: projects/vnet/contrib/bmake/make.1
==============================================================================
--- projects/vnet/contrib/bmake/make.1 Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/make.1 Mon Jun 6 10:21:53 2016 (r301499)
@@ -1,4 +1,4 @@
-.\" $NetBSD: make.1,v 1.257 2016/05/10 23:45:45 sjg Exp $
+.\" $NetBSD: make.1,v 1.259 2016/06/03 07:07:37 wiz Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" from: @(#)make.1 8.4 (Berkeley) 3/19/94
.\"
-.Dd May 10, 2016
+.Dd June 2, 2016
.Dt MAKE 1
.Os
.Sh NAME
@@ -857,7 +857,7 @@ Can affect the mode that
.Nm
runs in.
It can contain a number of keywords:
-.Bl -hang -width ignore-cmd
+.Bl -hang -width missing-filemon=bf.
.It Pa compat
Like
.Fl B ,
@@ -881,6 +881,17 @@ will not create .meta files in
This can be overridden by setting
.Va bf
to a value which represents True.
+.It Pa missing-meta= Ar bf
+If
+.Va bf
+is True, then a missing .meta file makes the target out-of-date.
+.It Pa missing-filemon= Ar bf
+If
+.Va bf
+is True, then missing filemon data makes the target out-of-date.
+.It Pa nofilemon
+Do not use
+.Xr filemon 4 .
.It Pa env
For debugging, it can be useful to include the environment
in the .meta file.
Modified: projects/vnet/contrib/bmake/make.h
==============================================================================
--- projects/vnet/contrib/bmake/make.h Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/make.h Mon Jun 6 10:21:53 2016 (r301499)
@@ -1,4 +1,4 @@
-/* $NetBSD: make.h,v 1.98 2016/02/18 18:29:14 christos Exp $ */
+/* $NetBSD: make.h,v 1.99 2016/06/03 01:21:59 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -199,6 +199,7 @@ typedef struct GNode {
#define DONE_ALLSRC 0x40 /* We do it once only */
#define CYCLE 0x1000 /* Used by MakePrintStatus */
#define DONECYCLE 0x2000 /* Used by MakePrintStatus */
+#define INTERNAL 0x4000 /* Internal use only */
enum enum_made {
UNMADE, DEFERRED, REQUESTED, BEINGMADE,
MADE, UPTODATE, ERROR, ABORTED
Modified: projects/vnet/contrib/bmake/meta.c
==============================================================================
--- projects/vnet/contrib/bmake/meta.c Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/meta.c Mon Jun 6 10:21:53 2016 (r301499)
@@ -1,4 +1,4 @@
-/* $NetBSD: meta.c,v 1.57 2016/05/12 20:28:34 sjg Exp $ */
+/* $NetBSD: meta.c,v 1.60 2016/06/04 22:17:14 sjg Exp $ */
/*
* Implement 'meta' mode.
@@ -73,6 +73,8 @@ static char *metaIgnorePathsStr; /* stri
Boolean useMeta = FALSE;
static Boolean useFilemon = FALSE;
static Boolean writeMeta = FALSE;
+static Boolean metaMissing = FALSE; /* oodate if missing */
+static Boolean filemonMissing = FALSE; /* oodate if missing */
static Boolean metaEnv = FALSE; /* don't save env unless asked */
static Boolean metaVerbose = FALSE;
static Boolean metaIgnoreCMDs = FALSE; /* ignore CMDs in .meta files */
@@ -237,24 +239,13 @@ eat_dots(char *buf, size_t bufsz, int do
static char *
meta_name(struct GNode *gn, char *mname, size_t mnamelen,
const char *dname,
- const char *tname)
+ const char *tname,
+ const char *cwd)
{
char buf[MAXPATHLEN];
- char cwd[MAXPATHLEN];
char *rp;
char *cp;
char *tp;
- char *p[4]; /* >= number of possible uses */
- int i;
-
- i = 0;
- if (!dname)
- dname = Var_Value(".OBJDIR", gn, &p[i++]);
- if (!tname)
- tname = Var_Value(TARGET, gn, &p[i++]);
-
- if (realpath(dname, cwd))
- dname = cwd;
/*
* Weed out relative paths from the target file name.
@@ -264,7 +255,7 @@ meta_name(struct GNode *gn, char *mname,
* basename as given to us.
*/
if ((cp = strrchr(tname, '/'))) {
- if (realpath(tname, buf)) {
+ if (cached_realpath(tname, buf)) {
if ((rp = strrchr(buf, '/'))) {
rp++;
cp++;
@@ -309,9 +300,6 @@ meta_name(struct GNode *gn, char *mname,
}
}
free(tp);
- for (i--; i >= 0; i--) {
- free(p[i]);
- }
return (mname);
}
@@ -391,29 +379,26 @@ printCMD(void *cmdp, void *mfpp)
*/
#define SKIP_META_TYPE(_type) do { \
if ((gn->type & __CONCAT(OP_, _type))) { \
- if (DEBUG(META)) { \
+ if (verbose) { \
fprintf(debug_file, "Skipping meta for %s: .%s\n", \
gn->name, __STRING(_type)); \
} \
- return (NULL); \
+ return FALSE; \
} \
} while (0)
-static FILE *
-meta_create(BuildMon *pbm, GNode *gn)
+
+/*
+ * Do we need/want a .meta file ?
+ */
+static Boolean
+meta_needed(GNode *gn, const char *dname, const char *tname,
+ char *objdir, int verbose)
{
- meta_file_t mf;
- char buf[MAXPATHLEN];
- char objdir[MAXPATHLEN];
- char **ptr;
- const char *dname;
- const char *tname;
- char *fname;
- const char *cp;
- char *p[4]; /* >= possible uses */
- int i;
struct stat fs;
+ if (verbose)
+ verbose = DEBUG(META);
/* This may be a phony node which we don't want meta data for... */
/* Skip .meta for .BEGIN, .END, .ERROR etc as well. */
@@ -426,48 +411,70 @@ meta_create(BuildMon *pbm, GNode *gn)
SKIP_META_TYPE(MAKE);
}
- mf.fp = NULL;
-
- i = 0;
-
- dname = Var_Value(".OBJDIR", gn, &p[i++]);
- tname = Var_Value(TARGET, gn, &p[i++]);
-
- /* The object directory may not exist. Check it.. */
- if (stat(dname, &fs) != 0) {
- if (DEBUG(META))
- fprintf(debug_file, "Skipping meta for %s: no .OBJDIR\n",
- gn->name);
- goto out;
- }
/* Check if there are no commands to execute. */
if (Lst_IsEmpty(gn->commands)) {
- if (DEBUG(META))
+ if (verbose)
fprintf(debug_file, "Skipping meta for %s: no commands\n",
gn->name);
- goto out;
+ return FALSE;
+ }
+ if ((gn->type & (OP_META|OP_SUBMAKE)) == OP_SUBMAKE) {
+ /* OP_SUBMAKE is a bit too aggressive */
+ if (Lst_ForEach(gn->commands, is_submake, gn)) {
+ if (DEBUG(META))
+ fprintf(debug_file, "Skipping meta for %s: .SUBMAKE\n",
+ gn->name);
+ return FALSE;
+ }
+ }
+
+ /* The object directory may not exist. Check it.. */
+ if (stat(dname, &fs) != 0) {
+ if (verbose)
+ fprintf(debug_file, "Skipping meta for %s: no .OBJDIR\n",
+ gn->name);
+ return FALSE;
}
/* make sure these are canonical */
- if (realpath(dname, objdir))
+ if (cached_realpath(dname, objdir))
dname = objdir;
/* If we aren't in the object directory, don't create a meta file. */
if (!metaCurdirOk && strcmp(curdir, dname) == 0) {
- if (DEBUG(META))
+ if (verbose)
fprintf(debug_file, "Skipping meta for %s: .OBJDIR == .CURDIR\n",
gn->name);
- goto out;
- }
- if (!(gn->type & OP_META)) {
- /* We do not generate .meta files for sub-makes */
- if (Lst_ForEach(gn->commands, is_submake, gn)) {
- if (DEBUG(META))
- fprintf(debug_file, "Skipping meta for %s: .MAKE\n",
- gn->name);
- goto out;
- }
+ return FALSE;
}
+ return TRUE;
+}
+
+
+static FILE *
+meta_create(BuildMon *pbm, GNode *gn)
+{
+ meta_file_t mf;
+ char buf[MAXPATHLEN];
+ char objdir[MAXPATHLEN];
+ char **ptr;
+ const char *dname;
+ const char *tname;
+ char *fname;
+ const char *cp;
+ char *p[4]; /* >= possible uses */
+ int i;
+
+ mf.fp = NULL;
+ i = 0;
+
+ dname = Var_Value(".OBJDIR", gn, &p[i++]);
+ tname = Var_Value(TARGET, gn, &p[i++]);
+
+ /* if this succeeds objdir is realpath of dname */
+ if (!meta_needed(gn, dname, tname, objdir, TRUE))
+ goto out;
+ dname = objdir;
if (metaVerbose) {
char *mp;
@@ -492,7 +499,7 @@ meta_create(BuildMon *pbm, GNode *gn)
goto out;
fname = meta_name(gn, pbm->meta_fname, sizeof(pbm->meta_fname),
- dname, tname);
+ dname, tname, objdir);
#ifdef DEBUG_META_MODE
if (DEBUG(META))
@@ -561,6 +568,10 @@ meta_init(void)
}
+#define get_mode_bf(bf, token) \
+ if ((cp = strstr(make_mode, token))) \
+ bf = boolValue(&cp[sizeof(token) - 1])
+
/*
* Initialization we need after reading makefiles.
*/
@@ -583,17 +594,13 @@ meta_mode_init(const char *make_mode)
writeMeta = FALSE;
if (strstr(make_mode, "nofilemon"))
useFilemon = FALSE;
- if ((cp = strstr(make_mode, "curdirok="))) {
- metaCurdirOk = boolValue(&cp[9]);
- }
- if ((cp = strstr(make_mode, "silent="))) {
- metaSilent = boolValue(&cp[7]);
- }
if (strstr(make_mode, "ignore-cmd"))
metaIgnoreCMDs = TRUE;
- /* for backwards compatability */
- Var_Set(".MAKE.META_CREATED", "${.MAKE.META.CREATED}", VAR_GLOBAL, 0);
- Var_Set(".MAKE.META_FILES", "${.MAKE.META.FILES}", VAR_GLOBAL, 0);
+ if (useFilemon)
+ get_mode_bf(filemonMissing, "missing-filemon=");
+ get_mode_bf(metaCurdirOk, "curdirok=");
+ get_mode_bf(metaMissing, "missing-meta=");
+ get_mode_bf(metaSilent, "silent=");
}
if (metaVerbose && !Var_Exists(MAKE_META_PREFIX, VAR_GLOBAL)) {
/*
@@ -921,6 +928,8 @@ meta_oodate(GNode *gn, Boolean oodate)
char fname1[MAXPATHLEN];
char fname2[MAXPATHLEN];
char fname3[MAXPATHLEN];
+ const char *dname;
+ const char *tname;
char *p;
char *cp;
char *link_src;
@@ -930,10 +939,23 @@ meta_oodate(GNode *gn, Boolean oodate)
FILE *fp;
Boolean needOODATE = FALSE;
Lst missingFiles;
-
+ char *pa[4]; /* >= possible uses */
+ int i;
+ int have_filemon = FALSE;
+
if (oodate)
return oodate; /* we're done */
+ i = 0;
+
+ dname = Var_Value(".OBJDIR", gn, &pa[i++]);
+ tname = Var_Value(TARGET, gn, &pa[i++]);
+
+ /* if this succeeds fname3 is realpath of dname */
+ if (!meta_needed(gn, dname, tname, fname3, FALSE))
+ goto oodate_out;
+ dname = fname3;
+
missingFiles = Lst_Init(FALSE);
/*
@@ -944,7 +966,7 @@ meta_oodate(GNode *gn, Boolean oodate)
*/
Make_DoAllVar(gn);
- meta_name(gn, fname, sizeof(fname), NULL, NULL);
+ meta_name(gn, fname, sizeof(fname), dname, tname, dname);
#ifdef DEBUG_META_MODE
if (DEBUG(META))
@@ -957,7 +979,6 @@ meta_oodate(GNode *gn, Boolean oodate)
int lineno = 0;
int lastpid = 0;
int pid;
- int f = 0;
int x;
LstNode ln;
struct stat fs;
@@ -996,13 +1017,13 @@ meta_oodate(GNode *gn, Boolean oodate)
link_src = NULL;
move_target = NULL;
/* Find the start of the build monitor section. */
- if (!f) {
+ if (!have_filemon) {
if (strncmp(buf, "-- filemon", 10) == 0) {
- f = 1;
+ have_filemon = TRUE;
continue;
}
if (strncmp(buf, "# buildmon", 10) == 0) {
- f = 1;
+ have_filemon = TRUE;
continue;
}
}
@@ -1014,7 +1035,7 @@ meta_oodate(GNode *gn, Boolean oodate)
fprintf(debug_file, "%s: %d: %s\n", fname, lineno, buf);
#endif
strsep(&p, " ");
- if (f) {
+ if (have_filemon) {
/*
* We are in the 'filemon' output section.
* Each record from filemon follows the general form:
@@ -1239,7 +1260,7 @@ meta_oodate(GNode *gn, Boolean oodate)
* they are _expected_ to change.
*/
if (*p == '/') {
- realpath(p, fname1); /* clean it up */
+ cached_realpath(p, fname1); /* clean it up */
if (Lst_ForEach(metaIgnorePaths, prefix_match, fname1)) {
#ifdef DEBUG_META_MODE
if (DEBUG(META))
@@ -1324,7 +1345,7 @@ meta_oodate(GNode *gn, Boolean oodate)
oodate = TRUE;
} else if (S_ISDIR(fs.st_mode)) {
/* Update the latest directory. */
- realpath(p, latestdir);
+ cached_realpath(p, latestdir);
}
} else if (errno == ENOENT && *p == '/' &&
strncmp(p, cwd, cwdlen) != 0) {
@@ -1434,12 +1455,27 @@ meta_oodate(GNode *gn, Boolean oodate)
fname, (char *)Lst_Datum(Lst_First(missingFiles)));
oodate = TRUE;
}
- } else {
- if ((gn->type & OP_META)) {
+ if (!oodate && !have_filemon && filemonMissing) {
if (DEBUG(META))
- fprintf(debug_file, "%s: required but missing\n", fname);
+ fprintf(debug_file, "%s: missing filemon data\n", fname);
oodate = TRUE;
}
+ } else {
+ if (writeMeta && metaMissing) {
+ cp = NULL;
+
+ /* if target is in .CURDIR we do not need a meta file */
+ if (gn->path && (cp = strrchr(gn->path, '/')) && cp > gn->path) {
+ if (strncmp(curdir, gn->path, (cp - gn->path)) != 0) {
+ cp = NULL; /* not in .CURDIR */
+ }
+ }
+ if (!cp) {
+ if (DEBUG(META))
+ fprintf(debug_file, "%s: required but missing\n", fname);
+ oodate = TRUE;
+ }
+ }
}
Lst_Destroy(missingFiles, (FreeProc *)free);
@@ -1454,6 +1490,11 @@ meta_oodate(GNode *gn, Boolean oodate)
Var_Set(OODATE, Var_Value(ALLSRC, gn, &cp), gn, 0);
free(cp);
}
+
+ oodate_out:
+ for (i--; i >= 0; i--) {
+ free(pa[i]);
+ }
return oodate;
}
Modified: projects/vnet/contrib/bmake/mk/ChangeLog
==============================================================================
--- projects/vnet/contrib/bmake/mk/ChangeLog Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/mk/ChangeLog Mon Jun 6 10:21:53 2016 (r301499)
@@ -1,3 +1,16 @@
+2016-06-02 Simon J. Gerraty <sjg at bad.crufty.net>
+
+ * install-mk (MK_VERSION): 20160602
+ * meta.autodep.mk: when passing META_FILES to gendirdeps.mk
+ do not apply :T to META_XTRAS
+ patch from Bryan Drewery at FreeBSD.org.
+
+2016-05-30 Simon J. Gerraty <sjg at bad.crufty.net>
+
+ * install-mk (MK_VERSION): 20160530
+ * meta.stage.mk: we assume ${CLEANFILES} gets .NOPATH
+ make it so.
+
2016-05-12 Simon J. Gerraty <sjg at bad.crufty.net>
* install-mk (MK_VERSION): 20160512
Modified: projects/vnet/contrib/bmake/mk/dpadd.mk
==============================================================================
--- projects/vnet/contrib/bmake/mk/dpadd.mk Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/mk/dpadd.mk Mon Jun 6 10:21:53 2016 (r301499)
@@ -1,4 +1,4 @@
-# $Id: dpadd.mk,v 1.21 2016/05/18 20:54:55 sjg Exp $
+# $Id: dpadd.mk,v 1.22 2016/05/31 23:30:59 sjg Exp $
#
# @(#) Copyright (c) 2004, Simon J. Gerraty
#
@@ -100,7 +100,7 @@ __dpadd_libs := ${DPADD:M*/lib*}
# Order -L's to search ours first.
# Avoids picking up old versions already installed.
-__dpadd_libdirs := ${__dpadd_libs}:R:H:S/^/-L/g:O:u:N-L}
+__dpadd_libdirs := ${__dpadd_libs:R:H:S/^/-L/g:O:u:N-L}
LDADD += ${__dpadd_libdirs:M-L${OBJTOP}/*}
LDADD += ${__dpadd_libdirs:N-L${OBJTOP}/*:N-L${HOST_LIBDIR:U/usr/lib}}
.if defined(HOST_LIBDIR) && ${HOST_LIBDIR} != "/usr/lib"
Modified: projects/vnet/contrib/bmake/mk/install-mk
==============================================================================
--- projects/vnet/contrib/bmake/mk/install-mk Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/mk/install-mk Mon Jun 6 10:21:53 2016 (r301499)
@@ -55,7 +55,7 @@
# Simon J. Gerraty <sjg at crufty.net>
# RCSid:
-# $Id: install-mk,v 1.126 2016/05/18 20:54:55 sjg Exp $
+# $Id: install-mk,v 1.128 2016/06/03 17:22:32 sjg Exp $
#
# @(#) Copyright (c) 1994 Simon J. Gerraty
#
@@ -70,7 +70,7 @@
# sjg at crufty.net
#
-MK_VERSION=20160512
+MK_VERSION=20160602
OWNER=
GROUP=
MODE=444
Modified: projects/vnet/contrib/bmake/mk/meta.autodep.mk
==============================================================================
--- projects/vnet/contrib/bmake/mk/meta.autodep.mk Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/mk/meta.autodep.mk Mon Jun 6 10:21:53 2016 (r301499)
@@ -1,4 +1,4 @@
-# $Id: meta.autodep.mk,v 1.44 2016/04/07 17:00:38 sjg Exp $
+# $Id: meta.autodep.mk,v 1.45 2016/06/03 17:22:32 sjg Exp $
#
# @(#) Copyright (c) 2010, Simon J. Gerraty
@@ -266,7 +266,7 @@ ${_DEPENDFILE}: ${_depend} ${.PARSEDIR}/
DPADD='${FORCE_DPADD:O:u}' ${_gendirdeps_mutex} \
MAKESYSPATH=${_makesyspath} \
${.MAKE} -f gendirdeps.mk RELDIR=${RELDIR} _DEPENDFILE=${_DEPENDFILE} \
- META_FILES='${META_XTRAS:T:O:u} ${META_FILES:T:O:u:${META_FILE_FILTER:ts:}}')
+ META_FILES='${META_XTRAS:O:u} ${META_FILES:T:O:u:${META_FILE_FILTER:ts:}}')
@test -s $@ && touch $@; :
.endif
Modified: projects/vnet/contrib/bmake/mk/meta.stage.mk
==============================================================================
--- projects/vnet/contrib/bmake/mk/meta.stage.mk Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/mk/meta.stage.mk Mon Jun 6 10:21:53 2016 (r301499)
@@ -1,4 +1,4 @@
-# $Id: meta.stage.mk,v 1.44 2016/03/16 18:21:23 sjg Exp $
+# $Id: meta.stage.mk,v 1.45 2016/05/26 03:59:09 sjg Exp $
#
# @(#) Copyright (c) 2011, Simon J. Gerraty
#
@@ -270,6 +270,8 @@ beforeinstall: .dirdep
.NOPATH: ${STAGE_FILES}
.if !empty(STAGE_TARGETS)
+.NOPATH: ${CLEANFILES}
+
MK_STALE_STAGED?= no
.if ${MK_STALE_STAGED} == "yes"
all: stale_staged
Modified: projects/vnet/contrib/bmake/nonints.h
==============================================================================
--- projects/vnet/contrib/bmake/nonints.h Mon Jun 6 10:13:48 2016 (r301498)
+++ projects/vnet/contrib/bmake/nonints.h Mon Jun 6 10:21:53 2016 (r301499)
@@ -1,4 +1,4 @@
-/* $NetBSD: nonints.h,v 1.72 2016/02/18 20:25:08 sjg Exp $ */
+/* $NetBSD: nonints.h,v 1.73 2016/06/03 01:21:59 sjg Exp $ */
/*-
* Copyright (c) 1988, 1989, 1990, 1993
@@ -122,6 +122,7 @@ void execError(const char *, const char
char *getTmpdir(void);
Boolean s2Boolean(const char *, Boolean);
Boolean getBoolean(const char *, Boolean);
+char *cached_realpath(const char *, char *);
/* parse.c */
void Parse_Error(int, const char *, ...) MAKE_ATTR_PRINTFLIKE(2, 3);
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list