From owner-svn-src-vendor@FreeBSD.ORG Wed Jun 10 20:10:53 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BD6824F; Wed, 10 Jun 2015 20:10:53 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3855811FE; Wed, 10 Jun 2015 20:10:53 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5AKArDi040770; Wed, 10 Jun 2015 20:10:53 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5AKAnFo040750; Wed, 10 Jun 2015 20:10:49 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201506102010.t5AKAnFo040750@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 10 Jun 2015 20:10:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r284243 - in vendor/NetBSD/bmake/dist: . mk X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 20:10:53 -0000 Author: sjg Date: Wed Jun 10 20:10:48 2015 New Revision: 284243 URL: https://svnweb.freebsd.org/changeset/base/284243 Log: bmake-20150606 Modified: vendor/NetBSD/bmake/dist/ChangeLog vendor/NetBSD/bmake/dist/Makefile vendor/NetBSD/bmake/dist/bmake.1 vendor/NetBSD/bmake/dist/bmake.cat1 vendor/NetBSD/bmake/dist/make.1 vendor/NetBSD/bmake/dist/mk/ChangeLog vendor/NetBSD/bmake/dist/mk/dirdeps.mk vendor/NetBSD/bmake/dist/mk/gendirdeps.mk vendor/NetBSD/bmake/dist/mk/install-mk vendor/NetBSD/bmake/dist/mk/meta.stage.mk vendor/NetBSD/bmake/dist/mk/meta.sys.mk vendor/NetBSD/bmake/dist/mk/mkopt.sh vendor/NetBSD/bmake/dist/targ.c Modified: vendor/NetBSD/bmake/dist/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/ChangeLog Wed Jun 10 19:51:35 2015 (r284242) +++ vendor/NetBSD/bmake/dist/ChangeLog Wed Jun 10 20:10:48 2015 (r284243) @@ -1,3 +1,9 @@ +2015-06-06 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150606 + Merge with NetBSD make, pick up + o make.1: document .OBJDIR target + 2015-05-05 Simon J. Gerraty * Makefile (MAKE_VERSION): 20150505 Modified: vendor/NetBSD/bmake/dist/Makefile ============================================================================== --- vendor/NetBSD/bmake/dist/Makefile Wed Jun 10 19:51:35 2015 (r284242) +++ vendor/NetBSD/bmake/dist/Makefile Wed Jun 10 20:10:48 2015 (r284243) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.38 2015/05/05 21:58:05 sjg Exp $ +# $Id: Makefile,v 1.39 2015/06/07 15:54:37 sjg Exp $ # Base version on src date -MAKE_VERSION= 20150505 +MAKE_VERSION= 20150606 PROG= bmake Modified: vendor/NetBSD/bmake/dist/bmake.1 ============================================================================== --- vendor/NetBSD/bmake/dist/bmake.1 Wed Jun 10 19:51:35 2015 (r284242) +++ vendor/NetBSD/bmake/dist/bmake.1 Wed Jun 10 20:10:48 2015 (r284243) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.247 2015/04/10 08:43:32 wiz Exp $ +.\" $NetBSD: make.1,v 1.249 2015/06/05 07:33:40 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 April 9, 2015 +.Dd June 4, 2015 .Dt MAKE 1 .Os .Sh NAME @@ -993,14 +993,15 @@ This is especially useful with .Ql Ev MAKEOBJDIR . .Pp .Ql Va .OBJDIR -may be modified in the makefile as a global variable. +may be modified in the makefile via the special target +.Ql Ic .OBJDIR . In all cases, .Nm will .Xr chdir 2 -to +to the specified directory if it exists, and set .Ql Va .OBJDIR -and set +and .Ql Ev PWD to that directory before executing any targets. . @@ -2001,6 +2002,15 @@ Disable parallel mode. Synonym for .Ic .NOTPARALLEL , for compatibility with other pmake variants. +.It Ic .OBJDIR +The source is a new value for +.Ql Va .OBJDIR . +If it exists, +.Nm +will +.Xr chdir 2 +to it and update the value of +.Ql Va .OBJDIR . .It Ic .ORDER The named targets are made in sequence. This ordering does not add targets to the list of targets to be made. Modified: vendor/NetBSD/bmake/dist/bmake.cat1 ============================================================================== --- vendor/NetBSD/bmake/dist/bmake.cat1 Wed Jun 10 19:51:35 2015 (r284242) +++ vendor/NetBSD/bmake/dist/bmake.cat1 Wed Jun 10 20:10:48 2015 (r284243) @@ -647,10 +647,10 @@ VVAARRIIAABBLLEE AASSSSIIGG may be used. This is especially useful with `MAKEOBJDIR'. - `_._O_B_J_D_I_R' may be modified in the makefile as a global - variable. In all cases, bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' - and set `PWD' to that directory before executing any tar- - gets. + `_._O_B_J_D_I_R' may be modified in the makefile via the special + target `..OOBBJJDDIIRR'. In all cases, bbmmaakkee will chdir(2) to + the specified directory if it exists, and set `_._O_B_J_D_I_R' + and `PWD' to that directory before executing any targets. _._P_A_R_S_E_D_I_R A path to the directory of the current `_M_a_k_e_f_i_l_e' being parsed. @@ -1271,6 +1271,9 @@ SSPPEECCIIAALL TTAARRGGEETT Synonym for ..NNOOTTPPAARRAALLLLEELL, for compatibility with other pmake variants. + ..OOBBJJDDIIRR The source is a new value for `_._O_B_J_D_I_R'. If it exists, bbmmaakkee + will chdir(2) to it and update the value of `_._O_B_J_D_I_R'. + ..OORRDDEERR The named targets are made in sequence. This ordering does not add targets to the list of targets to be made. Since the depen- dents of a target do not get built until the target itself could @@ -1449,4 +1452,4 @@ BBUUGGSS There is no way of escaping a space character in a filename. -NetBSD 5.1 April 9, 2015 NetBSD 5.1 +NetBSD 5.1 June 4, 2015 NetBSD 5.1 Modified: vendor/NetBSD/bmake/dist/make.1 ============================================================================== --- vendor/NetBSD/bmake/dist/make.1 Wed Jun 10 19:51:35 2015 (r284242) +++ vendor/NetBSD/bmake/dist/make.1 Wed Jun 10 20:10:48 2015 (r284243) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.247 2015/04/10 08:43:32 wiz Exp $ +.\" $NetBSD: make.1,v 1.249 2015/06/05 07:33:40 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 April 9, 2015 +.Dd June 4, 2015 .Dt MAKE 1 .Os .Sh NAME @@ -993,14 +993,15 @@ This is especially useful with .Ql Ev MAKEOBJDIR . .Pp .Ql Va .OBJDIR -may be modified in the makefile as a global variable. +may be modified in the makefile via the special target +.Ql Ic .OBJDIR . In all cases, .Nm will .Xr chdir 2 -to +to the specified directory if it exists, and set .Ql Va .OBJDIR -and set +and .Ql Ev PWD to that directory before executing any targets. . @@ -2001,6 +2002,15 @@ Disable parallel mode. Synonym for .Ic .NOTPARALLEL , for compatibility with other pmake variants. +.It Ic .OBJDIR +The source is a new value for +.Ql Va .OBJDIR . +If it exists, +.Nm +will +.Xr chdir 2 +to it and update the value of +.Ql Va .OBJDIR . .It Ic .ORDER The named targets are made in sequence. This ordering does not add targets to the list of targets to be made. Modified: vendor/NetBSD/bmake/dist/mk/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/mk/ChangeLog Wed Jun 10 19:51:35 2015 (r284242) +++ vendor/NetBSD/bmake/dist/mk/ChangeLog Wed Jun 10 20:10:48 2015 (r284243) @@ -1,3 +1,29 @@ +2015-06-06 Simon J. Gerraty + + * install-mk (MK_VERSION): 20150606 + + * dirdeps.mk: don't rely on manually maintained Makefile.depend + to set DEP_RELDIR and reset DIRDEPS. + By setting DEP_RELDIR ourselves we can skip :tA + + * gendirdeps.mk: skip setting DEP_RELDIR. + +2015-05-24 Simon J. Gerraty + + * dirdeps.mk: avoid wildcards like make(bootstrap*) + +2015-05-20 Simon J. Gerraty + + * install-mk (MK_VERSION): 20150520 + + * dirdeps.mk: when we are building dirdeps cache file we *want* + meta_oodate to look at all the Makefile.depend files, so + set .MAKE.DEPENDFILE to something that won't match. + + * meta.stage.mk: for STAGE_AS_* basename of file may not be unique + so first use absolute path as key. + Also skip staging at level 0. + 2015-04-30 Simon J. Gerraty * install-mk (MK_VERSION): 20150430 Modified: vendor/NetBSD/bmake/dist/mk/dirdeps.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/dirdeps.mk Wed Jun 10 19:51:35 2015 (r284242) +++ vendor/NetBSD/bmake/dist/mk/dirdeps.mk Wed Jun 10 20:10:48 2015 (r284243) @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.51 2015/05/06 06:07:30 sjg Exp $ +# $Id: dirdeps.mk,v 1.54 2015/06/08 20:55:11 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -383,6 +383,7 @@ ${DIRDEPS_CACHE}: .META .NOMETA_CMP DIRDEPS="${DIRDEPS}" \ MAKEFLAGS= ${.MAKE} -C ${_CURDIR} -f ${BUILD_DIRDEPS_MAKEFILE} \ ${BUILD_DIRDEPS_TARGETS} BUILD_DIRDEPS_CACHE=yes \ + .MAKE.DEPENDFILE=.none \ 3>&1 1>&2 | sed 's,${SRCTOP},$${SRCTOP},g' >> ${.TARGET}.new && \ mv ${.TARGET}.new ${.TARGET} @@ -587,6 +588,11 @@ _qm := ${_m:C;(\.depend)$;\1.${d:E};:${M _DEP_TARGET_SPEC := ${d:E} # some makefiles may still look at this _DEP_MACHINE := ${d:E:C/,.*//} +# set this "just in case" +# we can skip :tA since we computed the path above +DEP_RELDIR := ${_m:H:S,${SRCTOP}/,,} +# and reset this +DIRDEPS = .if ${_debug_reldir} && ${_qm} != ${_m} .info loading ${_m} for ${d:E} .endif @@ -602,13 +608,15 @@ _DEP_MACHINE := ${d:E:C/,.*//} .elif ${.MAKE.LEVEL} > 42 .error You should have stopped recursing by now. .else -_DEP_RELDIR := ${DEP_RELDIR} +# we are building something +DEP_RELDIR := ${RELDIR} +_DEP_RELDIR := ${RELDIR} # pickup local dependencies .-include <.depend> .endif # bootstrapping new dependencies made easy? -.if make(bootstrap*) && !target(bootstrap) +.if (make(bootstrap) || make(bootstrap-recurse)) && !target(bootstrap) .if exists(${.CURDIR}/${.MAKE.DEPENDFILE:T}) # stop here Modified: vendor/NetBSD/bmake/dist/mk/gendirdeps.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/gendirdeps.mk Wed Jun 10 19:51:35 2015 (r284242) +++ vendor/NetBSD/bmake/dist/mk/gendirdeps.mk Wed Jun 10 20:10:48 2015 (r284243) @@ -1,4 +1,4 @@ -# $Id: gendirdeps.mk,v 1.26 2014/09/05 04:40:52 sjg Exp $ +# $Id: gendirdeps.mk,v 1.27 2015/06/08 20:55:11 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -311,7 +311,6 @@ CAT_DEPEND ?= .depend # to output _{VAR} tokens which we will turn into proper ${VAR} references. ${_DEPENDFILE}: ${CAT_DEPEND:M.depend} ${META_FILES:O:u:@m@${exists($m):?$m:}@} ${_this} ${META2DEPS} @(echo '# Autogenerated - do NOT edit!'; echo; \ - echo 'DEP_RELDIR := $${_PARSEDIR:S,$${SRCTOP}/,,}'; echo; \ echo 'DIRDEPS = \'; \ echo '${DIRDEPS:@d@ $d \\${.newline}@}'; echo; \ ${_include_src_dirdeps} \ @@ -332,7 +331,6 @@ all: ${_DEPENDFILE} ${_DEPENDFILE}: ${MAKEFILE} ${_this} @(echo '# Autogenerated - do NOT edit!'; echo; \ - echo 'DEP_RELDIR := $${_PARSEDIR:S,$${SRCTOP}/,,}'; echo; \ echo 'DIRDEPS = \'; \ echo '${DIRDEPS:@d@ $d \\${.newline}@}'; echo; \ echo '.include '; \ Modified: vendor/NetBSD/bmake/dist/mk/install-mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/install-mk Wed Jun 10 19:51:35 2015 (r284242) +++ vendor/NetBSD/bmake/dist/mk/install-mk Wed Jun 10 20:10:48 2015 (r284243) @@ -55,7 +55,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.110 2015/05/01 06:37:49 sjg Exp $ +# $Id: install-mk,v 1.112 2015/06/08 20:55:11 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # sjg@crufty.net # -MK_VERSION=20150430 +MK_VERSION=20150606 OWNER= GROUP= MODE=444 Modified: vendor/NetBSD/bmake/dist/mk/meta.stage.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/meta.stage.mk Wed Jun 10 19:51:35 2015 (r284242) +++ vendor/NetBSD/bmake/dist/mk/meta.stage.mk Wed Jun 10 20:10:48 2015 (r284243) @@ -1,4 +1,4 @@ -# $Id: meta.stage.mk,v 1.34 2014/11/20 22:40:08 sjg Exp $ +# $Id: meta.stage.mk,v 1.35 2015/05/20 06:40:33 sjg Exp $ # # @(#) Copyright (c) 2011, Simon J. Gerraty # @@ -218,7 +218,7 @@ STAGE_AS.$s ?= ${.ALLSRC:N.dirdep} stage_as: stage_as.$s stage_as.$s: .dirdep - @${STAGE_AS_SCRIPT}; StageAs ${FLAGS.$@} ${STAGE_FILES_DIR.$s:U${STAGE_DIR.$s}:${STAGE_DIR_FILTER}} ${STAGE_AS.$s:@f@$f ${STAGE_AS_${f:T}:U${f:T}}@} + @${STAGE_AS_SCRIPT}; StageAs ${FLAGS.$@} ${STAGE_FILES_DIR.$s:U${STAGE_DIR.$s}:${STAGE_DIR_FILTER}} ${STAGE_AS.$s:@f@$f ${STAGE_AS_${f:tA}:U${STAGE_AS_${f:T}:U${f:T}}}@} @touch $@ .endfor @@ -238,7 +238,9 @@ staging: # generally we want staging to wait until everything else is done STAGING_WAIT ?= .WAIT +.if ${.MAKE.LEVEL} > 0 all: ${STAGING_WAIT} staging +.endif .if exists(${.PARSEDIR}/stage-install.sh) && !defined(STAGE_INSTALL) # this will run install(1) and then followup with .dirdep files. Modified: vendor/NetBSD/bmake/dist/mk/meta.sys.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/meta.sys.mk Wed Jun 10 19:51:35 2015 (r284242) +++ vendor/NetBSD/bmake/dist/mk/meta.sys.mk Wed Jun 10 20:10:48 2015 (r284243) @@ -1,4 +1,4 @@ -# $Id: meta.sys.mk,v 1.20 2014/08/04 05:12:27 sjg Exp $ +# $Id: meta.sys.mk,v 1.21 2015/06/01 22:43:49 sjg Exp $ # # @(#) Copyright (c) 2010, Simon J. Gerraty @@ -108,11 +108,16 @@ _metaError: .NOMETA .NOTMAIN .if ${.MAKE.MODE:Mmeta*} != "" MKDEP_MK = meta.autodep.mk -# if we think we are updating dependencies, -# then filemon had better be present -.if ${UPDATE_DEPENDFILE:Uyes:tl} != "no" && !exists(/dev/filemon) +.if ${UPDATE_DEPENDFILE:Uyes:tl} != "no" +.if ${.MAKEFLAGS:Uno:M-k} != "" +# make this more obvious +.warning Setting UPDATE_DEPENDFILE=NO due to -k +UPDATE_DEPENDFILE= NO +.export UPDATE_DEPENDFILE +.elif !exists(/dev/filemon) .error ${.newline}ERROR: The filemon module (/dev/filemon) is not loaded. .endif +.endif .if ${.MAKE.LEVEL} == 0 # make sure dirdeps target exists and do it first Modified: vendor/NetBSD/bmake/dist/mk/mkopt.sh ============================================================================== --- vendor/NetBSD/bmake/dist/mk/mkopt.sh Wed Jun 10 19:51:35 2015 (r284242) +++ vendor/NetBSD/bmake/dist/mk/mkopt.sh Wed Jun 10 20:10:48 2015 (r284243) @@ -1,5 +1,5 @@ : -# $Id: mkopt.sh,v 1.8 2014/11/15 07:07:18 sjg Exp $ +# $Id: mkopt.sh,v 1.10 2015/06/07 17:29:08 sjg Exp $ # # @(#) Copyright (c) 2014, Simon J. Gerraty # @@ -19,9 +19,10 @@ # no need to be included more than once _MKOPT_SH=: +_MKOPT_PREFIX=${_MKOPT_PREFIX:-MK_} # -# _mk_opt OPT default +# _mk_opt default OPT # # Set MK_$OPT # @@ -35,7 +36,7 @@ _MKOPT_SH=: # _mk_opt() { _d=$1 - _mo=MK_$2 _wo=WITHOUT_$2 _wi=WITH_$2 + _mo=${_MKOPT_PREFIX}$2 _wo=WITHOUT_$2 _wi=WITH_$2 eval "_mov=\$$_mo _wov=\$$_wo _wiv=\$$_wi" case "$_wiv" in @@ -63,15 +64,23 @@ _mk_opts() { _d=no for _o in "$@" do - case "$_o" in + case "$_o" in + */*) # option is dirname default comes from basename + eval "_d=\$${_MKOPT_PREFIX}${_o#*/}" + _o=${_o%/*} + ;; yes|no) _d=$_o; continue;; esac _mk_opt $_d $_o done } +# handle either options.mk style OPTIONS_DEFAULT_* +# or FreeBSD's new bsd.mkopt.mk style __DEFAULT_*_OPTIONS _mk_opts_defaults() { - _mk_opts no $__DEFAULT_NO_OPTIONS yes $__DEFAULT_YES_OPTIONS + _mk_opts no $OPTIONS_DEFAULT_NO $__DEFAULT_NO_OPTIONS \ + yes $OPTIONS_DEFAULT_YES $__DEFAULT_YES_OPTIONS \ + $OPTIONS_DEFAULT_DEPENDENT $__DEFAULT_DEPENDENT_OPTIONS } case "/$0" in Modified: vendor/NetBSD/bmake/dist/targ.c ============================================================================== --- vendor/NetBSD/bmake/dist/targ.c Wed Jun 10 19:51:35 2015 (r284242) +++ vendor/NetBSD/bmake/dist/targ.c Wed Jun 10 20:10:48 2015 (r284243) @@ -1,4 +1,4 @@ -/* $NetBSD: targ.c,v 1.59 2014/09/07 20:55:34 joerg Exp $ */ +/* $NetBSD: targ.c,v 1.60 2015/05/25 09:01:06 manu Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: targ.c,v 1.59 2014/09/07 20:55:34 joerg Exp $"; +static char rcsid[] = "$NetBSD: targ.c,v 1.60 2015/05/25 09:01:06 manu Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)targ.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: targ.c,v 1.59 2014/09/07 20:55:34 joerg Exp $"); +__RCSID("$NetBSD: targ.c,v 1.60 2015/05/25 09:01:06 manu Exp $"); #endif #endif /* not lint */ #endif