Date: Wed, 1 Jul 2020 02:13:05 +0000 (UTC) From: "Simon J. Gerraty" <sjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362821 - in vendor/NetBSD/bmake/dist: . mk mk/sys unit-tests Message-ID: <202007010213.0612D5Zp099698@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sjg Date: Wed Jul 1 02:13:04 2020 New Revision: 362821 URL: https://svnweb.freebsd.org/changeset/base/362821 Log: Import bmake-20200629 from ChangeLog: o cond.c: do not eval unnecessary terms of conditionals. o meta.c: report error if lseek in filemon_read fails o str.c: performance improvement for Str_Match for multiple '*' o dieQuietly: supress the failure output from make when failing node is a sub-make or a sibling failed. This cuts down greatly on unhelpful noise at the end of build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no o unit test for :Or Added: vendor/NetBSD/bmake/dist/LICENSE vendor/NetBSD/bmake/dist/unit-tests/cond-short.exp vendor/NetBSD/bmake/dist/unit-tests/cond-short.mk (contents, props changed) Modified: vendor/NetBSD/bmake/dist/ChangeLog vendor/NetBSD/bmake/dist/FILES vendor/NetBSD/bmake/dist/VERSION vendor/NetBSD/bmake/dist/cond.c vendor/NetBSD/bmake/dist/job.c vendor/NetBSD/bmake/dist/main.c vendor/NetBSD/bmake/dist/make.h vendor/NetBSD/bmake/dist/meta.c vendor/NetBSD/bmake/dist/mk/ChangeLog vendor/NetBSD/bmake/dist/mk/FILES vendor/NetBSD/bmake/dist/mk/gendirdeps.mk vendor/NetBSD/bmake/dist/mk/install-mk vendor/NetBSD/bmake/dist/mk/mkopt.sh vendor/NetBSD/bmake/dist/mk/sys/AIX.mk vendor/NetBSD/bmake/dist/mk/sys/Darwin.mk vendor/NetBSD/bmake/dist/mk/sys/Generic.mk vendor/NetBSD/bmake/dist/mk/sys/HP-UX.mk vendor/NetBSD/bmake/dist/mk/sys/IRIX.mk vendor/NetBSD/bmake/dist/mk/sys/Linux.mk vendor/NetBSD/bmake/dist/mk/sys/NetBSD.mk vendor/NetBSD/bmake/dist/mk/sys/OSF1.mk vendor/NetBSD/bmake/dist/mk/sys/OpenBSD.mk vendor/NetBSD/bmake/dist/mk/sys/SunOS.mk vendor/NetBSD/bmake/dist/mk/sys/UnixWare.mk vendor/NetBSD/bmake/dist/str.c vendor/NetBSD/bmake/dist/unit-tests/Makefile vendor/NetBSD/bmake/dist/unit-tests/modmatch.mk vendor/NetBSD/bmake/dist/unit-tests/modorder.exp vendor/NetBSD/bmake/dist/unit-tests/modorder.mk Modified: vendor/NetBSD/bmake/dist/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/ChangeLog Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/ChangeLog Wed Jul 1 02:13:04 2020 (r362821) @@ -1,3 +1,42 @@ +2020-06-29 Simon J Gerraty <sjg@beast.crufty.net> + + * VERSION (_MAKE_VERSION): 20200629 + Merge with NetBSD make, pick up + o cond.c: do not eval unnecessary terms of conditionals. + +2020-06-25 Simon J Gerraty <sjg@beast.crufty.net> + + * VERSION (_MAKE_VERSION): 20200625 + Merge with NetBSD make, pick up + o meta.c: report error if lseek in filemon_read fails + +2020-06-22 Simon J Gerraty <sjg@beast.crufty.net> + + * VERSION (_MAKE_VERSION): 20200622 + Merge with NetBSD make, pick up + o dieQuietly: ignore OP_SUBMAKE as too aggressive + +2020-06-19 Simon J Gerraty <sjg@beast.crufty.net> + + * VERSION (_MAKE_VERSION): 20200619 + Merge with NetBSD make, pick up + o str.c: performance improvement for Str_Match for multiple '*' + o dieQuietly: supress the failure output from make + when failing node is a sub-make or a sibling failed. + This cuts down greatly on unhelpful noise at the end of + build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no + +2020-06-10 Simon J Gerraty <sjg@beast.crufty.net> + + * FILES: add LICENSE to appease some packagers. + This is an attempt to fairly represent the license on almost + 200 files, which are almost all BSD-3-Clause + The few exceptions being more liberal. + + * VERSION (_MAKE_VERSION): 20200610 + Merge with NetBSD make, pick up + o unit test for :Or + 2020-06-06 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20200606 Modified: vendor/NetBSD/bmake/dist/FILES ============================================================================== --- vendor/NetBSD/bmake/dist/FILES Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/FILES Wed Jul 1 02:13:04 2020 (r362821) @@ -1,5 +1,6 @@ ChangeLog FILES +LICENSE Makefile Makefile.config.in PSD.doc/Makefile @@ -107,6 +108,8 @@ unit-tests/cond2.exp unit-tests/cond2.mk unit-tests/cond-late.mk unit-tests/cond-late.exp +unit-tests/cond-short.mk +unit-tests/cond-short.exp unit-tests/dollar.exp unit-tests/dollar.mk unit-tests/doterror.exp Added: vendor/NetBSD/bmake/dist/LICENSE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/bmake/dist/LICENSE Wed Jul 1 02:13:04 2020 (r362821) @@ -0,0 +1,59 @@ +The individual files in this distribution are copyright their +original contributors or assignees. +Including: + + Copyright (c) 1993-2020, Simon J Gerraty + Copyright (c) 2009-2016, Juniper Networks, Inc. + Copyright (c) 2009, John Birrell. + Copyright (c) 1997-2020 The NetBSD Foundation, Inc. + Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> + Copyright (c) 1989 by Berkeley Softworks + Copyright (c) 1988, 1989, 1990, 1992, 1993 + The Regents of the University of California. + Copyright (c) 1988, 1989 by Adam de Boor + +With the exception of the GNU configure script, which states: + + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. + # + # This configure script is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. + +The license for this distribution is considered to be: + + SPDX-License-Identifier: BSD-3-Clause + +example (from https://opensource.org/licenses/BSD-3-Clause): + + Copyright <YEAR> <COPYRIGHT HOLDER> + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + Modified: vendor/NetBSD/bmake/dist/VERSION ============================================================================== --- vendor/NetBSD/bmake/dist/VERSION Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/VERSION Wed Jul 1 02:13:04 2020 (r362821) @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20200606 +_MAKE_VERSION=20200629 Modified: vendor/NetBSD/bmake/dist/cond.c ============================================================================== --- vendor/NetBSD/bmake/dist/cond.c Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/cond.c Wed Jul 1 02:13:04 2020 (r362821) @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $ */ +/* $NetBSD: cond.c,v 1.76 2020/06/28 11:06:26 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.76 2020/06/28 11:06:26 rillig Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $"); +__RCSID("$NetBSD: cond.c,v 1.76 2020/06/28 11:06:26 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -146,7 +146,7 @@ typedef enum { * last two fields are stored in condInvert and condDefProc, respectively. */ static void CondPushBack(Token); -static int CondGetArg(char **, char **, const char *); +static int CondGetArg(Boolean, char **, char **, const char *); static Boolean CondDoDefined(int, const char *); static int CondStrMatch(const void *, const void *); static Boolean CondDoMake(int, const char *); @@ -225,9 +225,6 @@ CondPushBack(Token t) * CondGetArg -- * Find the argument of a built-in function. * - * Input: - * parens TRUE if arg should be bounded by parens - * * Results: * The length of the argument and the address of the argument. * @@ -238,7 +235,7 @@ CondPushBack(Token t) *----------------------------------------------------------------------- */ static int -CondGetArg(char **linePtr, char **argPtr, const char *func) +CondGetArg(Boolean doEval, char **linePtr, char **argPtr, const char *func) { char *cp; int argLen; @@ -290,7 +287,8 @@ CondGetArg(char **linePtr, char **argPtr, const char * int len; void *freeIt; - cp2 = Var_Parse(cp, VAR_CMD, VARF_UNDEFERR|VARF_WANTRES, + cp2 = Var_Parse(cp, VAR_CMD, VARF_UNDEFERR| + (doEval ? VARF_WANTRES : 0), &len, &freeIt); Buf_AddBytes(&buf, strlen(cp2), cp2); free(freeIt); @@ -577,7 +575,7 @@ CondGetString(Boolean doEval, Boolean *quoted, void ** /* if we are in quotes, then an undefined variable is ok */ str = Var_Parse(condExpr, VAR_CMD, ((!qt && doEval) ? VARF_UNDEFERR : 0) | - VARF_WANTRES, &len, freeIt); + (doEval ? VARF_WANTRES : 0), &len, freeIt); if (str == var_Error) { if (*freeIt) { free(*freeIt); @@ -813,7 +811,7 @@ done: } static int -get_mpt_arg(char **linePtr, char **argPtr, const char *func MAKE_ATTR_UNUSED) +get_mpt_arg(Boolean doEval, char **linePtr, char **argPtr, const char *func MAKE_ATTR_UNUSED) { /* * Use Var_Parse to parse the spec in parens and return @@ -827,7 +825,7 @@ get_mpt_arg(char **linePtr, char **argPtr, const char /* We do all the work here and return the result as the length */ *argPtr = NULL; - val = Var_Parse(cp - 1, VAR_CMD, VARF_WANTRES, &length, &freeIt); + val = Var_Parse(cp - 1, VAR_CMD, doEval ? VARF_WANTRES : 0, &length, &freeIt); /* * Advance *linePtr to beyond the closing ). Note that * we subtract one because 'length' is calculated from 'cp - 1'. @@ -864,7 +862,7 @@ compare_function(Boolean doEval) static const struct fn_def { const char *fn_name; int fn_name_len; - int (*fn_getarg)(char **, char **, const char *); + int (*fn_getarg)(Boolean, char **, char **, const char *); Boolean (*fn_proc)(int, const char *); } fn_defs[] = { { "defined", 7, CondGetArg, CondDoDefined }, @@ -892,7 +890,7 @@ compare_function(Boolean doEval) if (*cp != '(') break; - arglen = fn_def->fn_getarg(&cp, &arg, fn_def->fn_name); + arglen = fn_def->fn_getarg(doEval, &cp, &arg, fn_def->fn_name); if (arglen <= 0) { condExpr = cp; return arglen < 0 ? TOK_ERROR : TOK_FALSE; @@ -917,7 +915,7 @@ compare_function(Boolean doEval) * would be invalid if we did "defined(a)" - so instead treat as an * expression. */ - arglen = CondGetArg(&cp, &arg, NULL); + arglen = CondGetArg(doEval, &cp, &arg, NULL); for (cp1 = cp; isspace(*(unsigned char *)cp1); cp1++) continue; if (*cp1 == '=' || *cp1 == '!') Modified: vendor/NetBSD/bmake/dist/job.c ============================================================================== --- vendor/NetBSD/bmake/dist/job.c Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/job.c Wed Jul 1 02:13:04 2020 (r362821) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.197 2020/02/06 01:13:19 sjg Exp $ */ +/* $NetBSD: job.c,v 1.198 2020/06/19 21:17:48 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.197 2020/02/06 01:13:19 sjg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.198 2020/06/19 21:17:48 sjg Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.197 2020/02/06 01:13:19 sjg Exp $"); +__RCSID("$NetBSD: job.c,v 1.198 2020/06/19 21:17:48 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -1058,10 +1058,11 @@ JobFinish (Job *job, WAIT_T status) meta_job_error(job, job->node, job->flags, WEXITSTATUS(status)); } #endif - (void)printf("*** [%s] Error code %d%s\n", - job->node->name, - WEXITSTATUS(status), - (job->flags & JOB_IGNERR) ? " (ignored)" : ""); + if (!dieQuietly(job->node, -1)) + (void)printf("*** [%s] Error code %d%s\n", + job->node->name, + WEXITSTATUS(status), + (job->flags & JOB_IGNERR) ? " (ignored)" : ""); if (job->flags & JOB_IGNERR) { WAIT_STATUS(status) = 0; } else { @@ -3039,6 +3040,8 @@ Job_TokenWithdraw(void) /* And put the stopper back */ while (write(tokenWaitJob.outPipe, &tok, 1) == -1 && errno == EAGAIN) continue; + if (dieQuietly(NULL, 1)) + exit(2); Fatal("A failure has been detected in another branch of the parallel make"); } Modified: vendor/NetBSD/bmake/dist/main.c ============================================================================== --- vendor/NetBSD/bmake/dist/main.c Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/main.c Wed Jul 1 02:13:04 2020 (r362821) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $ */ +/* $NetBSD: main.c,v 1.276 2020/06/22 20:15:25 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.276 2020/06/22 20:15:25 sjg Exp $"; #else #include <sys/cdefs.h> #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.276 2020/06/22 20:15:25 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -1889,6 +1889,8 @@ void Finish(int errors) /* number of errors encountered in Make_Make */ { + if (dieQuietly(NULL, -1)) + exit(2); Fatal("%d error%s", errors, errors == 1 ? "" : "s"); } @@ -2041,12 +2043,37 @@ addErrorCMD(void *cmdp, void *gnp MAKE_ATTR_UNUSED) return 0; } +/* + * Return true if we should die without noise. + * For example our failing child was a sub-make + * or failure happend elsewhere. + */ +int +dieQuietly(GNode *gn, int bf) +{ + static int quietly = -1; + + if (quietly < 0) { + if (DEBUG(JOB) || getBoolean(".MAKE.DIE_QUIETLY", 1) == 0) + quietly = 0; + else if (bf >= 0) + quietly = bf; + else + quietly = (gn) ? ((gn->type & (OP_MAKE)) != 0) : 0; + } + return quietly; +} + void PrintOnError(GNode *gn, const char *s) { static GNode *en = NULL; char tmp[64]; char *cp; + + /* we generally want to keep quiet if a sub-make died */ + if (dieQuietly(gn, -1)) + return; if (s) printf("%s", s); Modified: vendor/NetBSD/bmake/dist/make.h ============================================================================== --- vendor/NetBSD/bmake/dist/make.h Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/make.h Wed Jul 1 02:13:04 2020 (r362821) @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.107 2020/04/03 03:35:16 sjg Exp $ */ +/* $NetBSD: make.h,v 1.108 2020/06/19 21:17:48 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -503,6 +503,7 @@ void Make_DoAllVar(GNode *); Boolean Make_Run(Lst); char * Check_Cwd_Cmd(const char *); void Check_Cwd(const char **); +int dieQuietly(GNode *, int); void PrintOnError(GNode *, const char *); void Main_ExportMAKEFLAGS(Boolean); Boolean Main_SetObjdir(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2); Modified: vendor/NetBSD/bmake/dist/meta.c ============================================================================== --- vendor/NetBSD/bmake/dist/meta.c Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/meta.c Wed Jul 1 02:13:04 2020 (r362821) @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.81 2020/04/03 03:32:28 sjg Exp $ */ +/* $NetBSD: meta.c,v 1.82 2020/06/25 15:45:37 sjg Exp $ */ /* * Implement 'meta' mode. @@ -174,14 +174,18 @@ filemon_read(FILE *mfp, int fd) return 0; } /* rewind */ - (void)lseek(fd, (off_t)0, SEEK_SET); + if (lseek(fd, (off_t)0, SEEK_SET) < 0) { + error = errno; + warn("Could not rewind filemon"); + fprintf(mfp, "\n"); + } else { + error = 0; + fprintf(mfp, "\n-- filemon acquired metadata --\n"); - error = 0; - fprintf(mfp, "\n-- filemon acquired metadata --\n"); - - while ((n = read(fd, buf, sizeof(buf))) > 0) { - if ((int)fwrite(buf, 1, n, mfp) < n) - error = EIO; + while ((n = read(fd, buf, sizeof(buf))) > 0) { + if ((int)fwrite(buf, 1, n, mfp) < n) + error = EIO; + } } fflush(mfp); if (close(fd) < 0) Modified: vendor/NetBSD/bmake/dist/mk/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/mk/ChangeLog Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/ChangeLog Wed Jul 1 02:13:04 2020 (r362821) @@ -1,3 +1,20 @@ +2020-06-28 Simon J Gerraty <sjg@beast.crufty.net> + + * sys/*.mk: make it easier for local*sys.mk to customize by + using ?= + +2020-06-22 Simon J Gerraty <sjg@beast.crufty.net> + + * gendirdeps.mk (LOCAL_DEPENDS_GUARD): if we don't build at level 0 + it is much safer to guard local depends with a simple check for + .MAKE.LEVEL > 0 + +2020-06-10 Simon J Gerraty <sjg@beast.crufty.net> + + * install-mk (MK_VERSION): 20200610 + + * mkopt.sh: this needs posix shell so #!/bin/sh should be ok + 2020-06-06 Simon J Gerraty <sjg@beast.crufty.net> * install-mk (MK_VERSION): 20200606 Modified: vendor/NetBSD/bmake/dist/mk/FILES ============================================================================== --- vendor/NetBSD/bmake/dist/mk/FILES Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/FILES Wed Jul 1 02:13:04 2020 (r362821) @@ -1,5 +1,6 @@ ChangeLog FILES +LICENSE README auto.obj.mk autoconf.mk Modified: vendor/NetBSD/bmake/dist/mk/gendirdeps.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/gendirdeps.mk Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/gendirdeps.mk Wed Jul 1 02:13:04 2020 (r362821) @@ -1,4 +1,4 @@ -# $Id: gendirdeps.mk,v 1.42 2020/05/16 23:21:48 sjg Exp $ +# $Id: gendirdeps.mk,v 1.44 2020/06/23 04:21:51 sjg Exp $ # Copyright (c) 2011-2020, Simon J. Gerraty # Copyright (c) 2010-2018, Juniper Networks, Inc. @@ -51,7 +51,7 @@ all: _CURDIR ?= ${.CURDIR} _OBJDIR ?= ${.OBJDIR} _OBJTOP ?= ${OBJTOP} -_OBJROOT ?= ${OBJROOT:U${_OBJTOP}} +_OBJROOT ?= ${OBJROOT:U${_OBJTOP:H}} .if ${_OBJROOT:M*/} _slash=/ .else @@ -339,6 +339,12 @@ CAT_DEPEND ?= .depend .PHONY: ${_DEPENDFILE} .endif +.if ${BUILD_AT_LEVEL0:Uno:tl} == "no" +LOCAL_DEPENDS_GUARD ?= _{.MAKE.LEVEL} > 0 +.else +LOCAL_DEPENDS_GUARD ?= _{DEP_RELDIR} == _{_DEP_RELDIR} +.endif + # 'cat .depend' should suffice, but if we are mixing build modes # .depend may contain things we don't want. # The sed command at the end of the stream, allows for the filters @@ -350,7 +356,7 @@ ${_DEPENDFILE}: .NOMETA ${CAT_DEPEND:M.depend} ${META_ ${_include_src_dirdeps} \ echo '.include <dirdeps.mk>'; \ echo; \ - echo '.if $${DEP_RELDIR} == $${_DEP_RELDIR}'; \ + echo '.if ${LOCAL_DEPENDS_GUARD}'; \ echo '# local dependencies - needed for -jN in clean tree'; \ [ -s ${CAT_DEPEND} ] && { grep : ${CAT_DEPEND} | grep -v '[/\\]'; }; \ echo '.endif' ) | sed 's,_\([{(]\),$$\1,g' > $@.new${.MAKE.PID} Modified: vendor/NetBSD/bmake/dist/mk/install-mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/install-mk Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/install-mk Wed Jul 1 02:13:04 2020 (r362821) @@ -55,7 +55,7 @@ # Simon J. Gerraty <sjg@crufty.net> # RCSid: -# $Id: install-mk,v 1.172 2020/06/06 22:41:15 sjg Exp $ +# $Id: install-mk,v 1.173 2020/06/23 04:16:35 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # sjg@crufty.net # -MK_VERSION=20200606 +MK_VERSION=20200622 OWNER= GROUP= MODE=444 Modified: vendor/NetBSD/bmake/dist/mk/mkopt.sh ============================================================================== --- vendor/NetBSD/bmake/dist/mk/mkopt.sh Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/mkopt.sh Wed Jul 1 02:13:04 2020 (r362821) @@ -1,7 +1,8 @@ -: -# $Id: mkopt.sh,v 1.11 2017/03/18 21:36:42 sjg Exp $ +#!/bin/sh + +# $Id: mkopt.sh,v 1.12 2020/06/23 04:16:35 sjg Exp $ # -# @(#) Copyright (c) 2014, Simon J. Gerraty +# @(#) Copyright (c) 2014, 2020, Simon J. Gerraty # # This file is provided in the hope that it will # be of use. There is absolutely NO WARRANTY. Modified: vendor/NetBSD/bmake/dist/mk/sys/AIX.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/AIX.mk Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/sys/AIX.mk Wed Jul 1 02:13:04 2020 (r362821) @@ -1,80 +1,80 @@ # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 -OS= AIX -unix= We run ${OS}. -ROOT_GROUP= system +OS ?= AIX +unix ?= We run ${OS}. +ROOT_GROUP ?= system # This needs a lot of work yet... -NOPIC=no # no shared libs? +NOPIC ?=no # no shared libs? .SUFFIXES: .out .a .ln .o .c ${CXX_SUFFIXES} .F .f .r .y .l .s .S .cl .p .h .sh .m4 .LIBS: .a -AR= ar -ARFLAGS= rl -RANLIB= ranlib +AR ?= ar +ARFLAGS ?= rl +RANLIB ?= ranlib -AS= as +AS ?= as AFLAGS= -COMPILE.s= ${AS} ${AFLAGS} -LINK.s= ${CC} ${AFLAGS} ${LDFLAGS} -COMPILE.S= ${CC} ${AFLAGS} ${CPPFLAGS} -c -LINK.S= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} +COMPILE.s ?= ${AS} ${AFLAGS} +LINK.s ?= ${CC} ${AFLAGS} ${LDFLAGS} +COMPILE.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} -c +LINK.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} .if exists(/usr/local/bin/gcc) -CC= gcc -DBG= -O -g -STATIC?= -static +CC ?= gcc +DBG ?= -O -g +STATIC ?= -static .else -CC= cc -DBG= -g -STATIC= +CC ?= cc +DBG ?= -g +STATIC ?= .endif -CFLAGS= ${DBG} -COMPILE.c= ${CC} ${CFLAGS} ${CPPFLAGS} -c -LINK.c= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} +CFLAGS ?= ${DBG} +COMPILE.c ?= ${CC} ${CFLAGS} ${CPPFLAGS} -c +LINK.c ?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -CXX= g++ -CXXFLAGS= ${CFLAGS} -COMPILE.cc= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c -LINK.cc= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} +CXX ?= g++ +CXXFLAGS ?= ${CFLAGS} +COMPILE.cc ?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c +LINK.cc ?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} -CPP= cpp +CPP ?= cpp .if defined(DESTDIR) CPPFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include .endif -MK_DEP= mkdeps.sh -N -FC= f77 -FFLAGS= -O +MK_DEP ?= mkdeps.sh -N +FC ?= f77 +FFLAGS ?= -O RFLAGS= -COMPILE.f= ${FC} ${FFLAGS} -c -LINK.f= ${FC} ${FFLAGS} ${LDFLAGS} -COMPILE.F= ${FC} ${FFLAGS} ${CPPFLAGS} -c -LINK.F= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} -COMPILE.r= ${FC} ${FFLAGS} ${RFLAGS} -c -LINK.r= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} +COMPILE.f ?= ${FC} ${FFLAGS} -c +LINK.f ?= ${FC} ${FFLAGS} ${LDFLAGS} +COMPILE.F ?= ${FC} ${FFLAGS} ${CPPFLAGS} -c +LINK.F ?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} +COMPILE.r ?= ${FC} ${FFLAGS} ${RFLAGS} -c +LINK.r ?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} -LEX= lex +LEX ?= lex LFLAGS= -LEX.l= ${LEX} ${LFLAGS} +LEX.l ?= ${LEX} ${LFLAGS} -LD= ld +LD ?= ld LDFLAGS= -LINT= lint -LINTFLAGS= -chapbx +LINT ?= lint +LINTFLAGS ?= -chapbx -PC= pc +PC ?= pc PFLAGS= -COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c -LINK.p= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} +COMPILE.p ?= ${PC} ${PFLAGS} ${CPPFLAGS} -c +LINK.p ?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} -YACC= yacc -YFLAGS= -d -YACC.y= ${YACC} ${YFLAGS} +YACC ?= yacc +YFLAGS ?= -d +YACC.y ?= ${YACC} ${YFLAGS} # C .c: Modified: vendor/NetBSD/bmake/dist/mk/sys/Darwin.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/Darwin.mk Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/sys/Darwin.mk Wed Jul 1 02:13:04 2020 (r362821) @@ -1,108 +1,108 @@ # $NetBSD: Darwin.sys.mk,v 1.3 2003/02/16 09:44:41 grant Exp $ # @(#)sys.mk 8.2 (Berkeley) 3/21/94 -OS= Darwin -unix?= We run ${OS}. +OS ?= Darwin +unix ?= We run ${OS}. .SUFFIXES: .out .a .ln .o .s .S .c .m ${CXX_SUFFIXES} .F .f .r .y .l .cl .p .h .SUFFIXES: .sh .m4 .dylib .LIBS: .a .dylib -SHLIBEXT = .dylib -HOST_LIBEXT = .dylib -DSHLIBEXT = .dylib +SHLIBEXT ?= .dylib +HOST_LIBEXT ?= .dylib +DSHLIBEXT ?= .dylib -AR?= ar -ARFLAGS?= rl +AR ?= ar +ARFLAGS ?= rl RANLIB = -AS?= as -AFLAGS?= -COMPILE.s?= ${AS} ${AFLAGS} -LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS} -COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} +AS ?= as +AFLAGS ?= +COMPILE.s ?= ${AS} ${AFLAGS} +LINK.s ?= ${CC} ${AFLAGS} ${LDFLAGS} +COMPILE.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} -c +LINK.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} -PIPE?= -pipe +PIPE ?= -pipe .if exists(/usr/bin/clang) -CC?= cc ${PIPE} -CXX?= c++ +CC ?= cc ${PIPE} +CXX ?= c++ .elif exists(/usr/bin/gcc) -CC?= gcc ${PIPE} +CC ?= gcc ${PIPE} .else -CC?= cc ${PIPE} +CC ?= cc ${PIPE} .endif -DBG?= -O2 -CFLAGS?= ${DBG} -COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c -LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} +DBG ?= -O2 +CFLAGS ?= ${DBG} +COMPILE.c ?= ${CC} ${CFLAGS} ${CPPFLAGS} -c +LINK.c ?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} .if exists(/usr/bin/g++) -CXX?= g++ +CXX ?= g++ .else -CXX?= c++ +CXX ?= c++ .endif -CXXFLAGS?= ${CFLAGS} -COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c -LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} +CXXFLAGS ?= ${CFLAGS} +COMPILE.cc ?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c +LINK.cc ?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} -OBJC?= ${CC} -OBJCFLAGS?= ${CFLAGS} -COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS} +OBJC ?= ${CC} +OBJCFLAGS ?= ${CFLAGS} +COMPILE.m ?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c +LINK.m ?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS} -CPP?= cpp -NOLINT= 1 -CPPFLAGS?= +CPP ?= cpp +NOLINT ?= 1 +CPPFLAGS ?= -MK_DEP?= mkdep +MK_DEP ?= mkdep -FC?= f77 -FFLAGS?= -O -RFLAGS?= -COMPILE.f?= ${FC} ${FFLAGS} -c -LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS} -COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c -LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} -COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c -LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} +FC ?= f77 +FFLAGS ?= -O +RFLAGS ?= +COMPILE.f ?= ${FC} ${FFLAGS} -c +LINK.f ?= ${FC} ${FFLAGS} ${LDFLAGS} +COMPILE.F ?= ${FC} ${FFLAGS} ${CPPFLAGS} -c +LINK.F ?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} +COMPILE.r ?= ${FC} ${FFLAGS} ${RFLAGS} -c +LINK.r ?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} -INSTALL?= install +INSTALL ?= install -LEX?= lex -LFLAGS?= -LEX.l?= ${LEX} ${LFLAGS} +LEX ?= lex +LFLAGS ?= +LEX.l ?= ${LEX} ${LFLAGS} -LD?= ld -LDFLAGS?= +LD ?= ld +LDFLAGS ?= -SHLIB_TEENY = 0 -SHLIB_MINOR = 0 +SHLIB_TEENY ?= 0 +SHLIB_MINOR ?= 0 -MKPICLIB = no -LIBEXT = .dylib +MKPICLIB ?= no +LIBEXT ?= .dylib -LINT?= lint -LINTFLAGS?= -chapbx +LINT ?= lint +LINTFLAGS ?= -chapbx -LORDER?= lorder +LORDER ?= lorder -NM?= nm +NM ?= nm -PC?= pc -PFLAGS?= -COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c -LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} +PC ?= pc +PFLAGS ?= +COMPILE.p ?= ${PC} ${PFLAGS} ${CPPFLAGS} -c +LINK.p ?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} -SIZE?= size +SIZE ?= size -TSORT?= tsort -q +TSORT ?= tsort -q -YACC?= bison -y -YFLAGS?= -d -YACC.y?= ${YACC} ${YFLAGS} +YACC ?= bison -y +YFLAGS ?= -d +YACC.y ?= ${YACC} ${YFLAGS} # C .c: Modified: vendor/NetBSD/bmake/dist/mk/sys/Generic.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/Generic.mk Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/sys/Generic.mk Wed Jul 1 02:13:04 2020 (r362821) @@ -1,4 +1,4 @@ -# $Id: Generic.mk,v 1.14 2020/04/17 21:08:17 sjg Exp $ +# $Id: Generic.mk,v 1.16 2020/06/29 14:34:42 sjg Exp $ # # some reasonable defaults @@ -7,7 +7,7 @@ .LIBS: .a -tools = \ +tools ?= \ ar \ lorder \ ranlib \ @@ -27,71 +27,71 @@ MACHINE_ARCH = ${MACHINE_ARCH.${MACHINE}} TSORT += -q .endif -ARFLAGS?= rl +ARFLAGS ?= rl -AS?= as -AFLAGS?= +AS ?= as +AFLAGS ?= .if ${MACHINE_ARCH} == "sparc64" AFLAGS+= -Wa,-Av9a .endif -COMPILE.s?= ${CC} ${AFLAGS} -c -LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS} -COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp -LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} +COMPILE.s ?= ${CC} ${AFLAGS} -c +LINK.s ?= ${CC} ${AFLAGS} ${LDFLAGS} +COMPILE.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp +LINK.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} -CC?= cc -DBG?= -O2 -CFLAGS?= ${DBG} -COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c -LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} +CC ?= cc +DBG ?= -O2 +CFLAGS ?= ${DBG} +COMPILE.c ?= ${CC} ${CFLAGS} ${CPPFLAGS} -c +LINK.c ?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -CXX?= c++ -CXXFLAGS?= ${CFLAGS} -COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c -LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} +CXX ?= c++ +CXXFLAGS ?= ${CFLAGS} +COMPILE.cc ?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c +LINK.cc ?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} -OBJC?= ${CC} -OBJCFLAGS?= ${CFLAGS} -COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS} +OBJC ?= ${CC} +OBJCFLAGS ?= ${CFLAGS} +COMPILE.m ?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c +LINK.m ?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS} -CPP?= cpp -CPPFLAGS?= +CPP ?= cpp +CPPFLAGS ?= -FC?= f77 -FFLAGS?= -O -RFLAGS?= -COMPILE.f?= ${FC} ${FFLAGS} -c -LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS} -COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c -LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} -COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c -LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} +FC ?= f77 +FFLAGS ?= -O +RFLAGS ?= +COMPILE.f ?= ${FC} ${FFLAGS} -c +LINK.f ?= ${FC} ${FFLAGS} ${LDFLAGS} +COMPILE.F ?= ${FC} ${FFLAGS} ${CPPFLAGS} -c +LINK.F ?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} +COMPILE.r ?= ${FC} ${FFLAGS} ${RFLAGS} -c +LINK.r ?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} -INSTALL?= install +INSTALL ?= install -LEX?= lex -LFLAGS?= -LEX.l?= ${LEX} ${LFLAGS} +LEX ?= lex +LFLAGS ?= +LEX.l ?= ${LEX} ${LFLAGS} -LD?= ld -LDFLAGS?= +LD ?= ld +LDFLAGS ?= -LINT?= lint -LINTFLAGS?= -chapbxzF +LINT ?= lint +LINTFLAGS ?= -chapbxzF -NM?= nm +NM ?= nm -PC?= pc -PFLAGS?= -COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c -LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} +PC ?= pc +PFLAGS ?= +COMPILE.p ?= ${PC} ${PFLAGS} ${CPPFLAGS} -c +LINK.p ?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} -SIZE?= size +SIZE ?= size -YACC?= yacc -YFLAGS?= -YACC.y?= ${YACC} ${YFLAGS} +YACC ?= yacc +YFLAGS ?= +YACC.y ?= ${YACC} ${YFLAGS} # C .c: Modified: vendor/NetBSD/bmake/dist/mk/sys/HP-UX.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/HP-UX.mk Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/sys/HP-UX.mk Wed Jul 1 02:13:04 2020 (r362821) @@ -1,122 +1,122 @@ -# $Id: HP-UX.mk,v 1.12 2020/04/17 21:08:17 sjg Exp $ +# $Id: HP-UX.mk,v 1.14 2020/06/29 14:34:42 sjg Exp $ # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 -OS= HP-UX -ROOT_GROUP= root -unix?= We run ${OS}. +OS ?= HP-UX +ROOT_GROUP ?= root +unix ?= We run ${OS}. # HP-UX's cc does not provide any clues as to wether this is 9.x or 10.x # nor does sys/param.h, so we'll use the existence of /hp-ux .if exists("/hp-ux") -OSMAJOR?=9 +OSMAJOR ?=9 .endif -OSMAJOR?=10 -__HPUX_VERSION?=${OSMAJOR} +OSMAJOR ?=10 +__HPUX_VERSION ?=${OSMAJOR} .SUFFIXES: .out .a .ln .o .c ${CXX_SUFFIXES} .F .f .r .y .l .s .S .cl .p .h .sh .m4 -LIBMODE= 755 -LIBCRT0= /lib/crt0.o *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007010213.0612D5Zp099698>