mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-13 05:41:26 +01:00
Merge bmake-20240508
Merge commit '3c2ab5fddc576e58f3ffa70dc5fa95144646a513'
This commit is contained in:
commit
c9f4001f81
@ -1,3 +1,11 @@
|
||||
2024-05-07 Simon J Gerraty <sjg@beast.crufty.net>
|
||||
|
||||
* VERSION (_MAKE_VERSION): 20240508
|
||||
Merge with NetBSD make, pick up
|
||||
o make: ensure variables set on command line get added to
|
||||
.MAKEOVERRIDES (even if they start with '.') so they are passed to
|
||||
sub-makes.
|
||||
|
||||
2024-04-30 Simon J Gerraty <sjg@beast.crufty.net>
|
||||
|
||||
* VERSION (_MAKE_VERSION): 20240430
|
||||
|
@ -1,2 +1,2 @@
|
||||
# keep this compatible with sh and make
|
||||
_MAKE_VERSION=20240430
|
||||
_MAKE_VERSION=20240508
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: job.c,v 1.470 2024/04/27 20:41:32 rillig Exp $ */
|
||||
/* $NetBSD: job.c,v 1.471 2024/05/07 18:26:22 sjg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
|
||||
@ -154,7 +154,7 @@
|
||||
#include "trace.h"
|
||||
|
||||
/* "@(#)job.c 8.2 (Berkeley) 3/19/94" */
|
||||
MAKE_RCSID("$NetBSD: job.c,v 1.470 2024/04/27 20:41:32 rillig Exp $");
|
||||
MAKE_RCSID("$NetBSD: job.c,v 1.471 2024/05/07 18:26:22 sjg Exp $");
|
||||
|
||||
/*
|
||||
* A shell defines how the commands are run. All commands for a target are
|
||||
@ -2190,7 +2190,8 @@ Shell_Init(void)
|
||||
if (shellPath == NULL)
|
||||
InitShellNameAndPath();
|
||||
|
||||
Var_SetWithFlags(SCOPE_CMDLINE, ".SHELL", shellPath, VAR_SET_READONLY);
|
||||
Var_SetWithFlags(SCOPE_CMDLINE, ".SHELL", shellPath,
|
||||
VAR_SET_INTERNAL|VAR_SET_READONLY);
|
||||
if (shell->errFlag == NULL)
|
||||
shell->errFlag = "";
|
||||
if (shell->echoFlag == NULL)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.614 2024/04/30 16:13:33 sjg Exp $ */
|
||||
/* $NetBSD: main.c,v 1.615 2024/05/07 18:26:22 sjg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -111,7 +111,7 @@
|
||||
#include "trace.h"
|
||||
|
||||
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
|
||||
MAKE_RCSID("$NetBSD: main.c,v 1.614 2024/04/30 16:13:33 sjg Exp $");
|
||||
MAKE_RCSID("$NetBSD: main.c,v 1.615 2024/05/07 18:26:22 sjg Exp $");
|
||||
#if defined(MAKE_NATIVE)
|
||||
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
|
||||
"The Regents of the University of California. "
|
||||
@ -1411,7 +1411,7 @@ main_Init(int argc, char **argv)
|
||||
Global_Set(".MAKEOVERRIDES", "");
|
||||
Global_Set("MFLAGS", "");
|
||||
Global_Set(".ALLTARGETS", "");
|
||||
Var_Set(SCOPE_CMDLINE, ".MAKE.LEVEL.ENV", MAKE_LEVEL_ENV);
|
||||
Global_Set_ReadOnly(".MAKE.LEVEL.ENV", MAKE_LEVEL_ENV);
|
||||
|
||||
/* Set some other useful variables. */
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: make.h,v 1.332 2024/04/27 20:41:32 rillig Exp $ */
|
||||
/* $NetBSD: make.h,v 1.333 2024/05/07 18:26:22 sjg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -1013,7 +1013,8 @@ typedef enum VarSetFlags {
|
||||
* except for another call to Var_Set with the same flag. See the
|
||||
* special targets '.NOREADONLY' and '.READONLY'.
|
||||
*/
|
||||
VAR_SET_READONLY = 1 << 1
|
||||
VAR_SET_READONLY = 1 << 1,
|
||||
VAR_SET_INTERNAL = 1 << 2
|
||||
} VarSetFlags;
|
||||
|
||||
typedef enum VarExportMode {
|
||||
|
@ -1,3 +1,10 @@
|
||||
2024-05-04 Simon J Gerraty <sjg@beast.crufty.net>
|
||||
|
||||
* install-mk (MK_VERSION): 20240504
|
||||
|
||||
* dirdeps.mk: allow BUILD_DIRDEPS_OVERRIDES to pass overrides to
|
||||
sub-make building DIRDEPS_CACHE.
|
||||
|
||||
2024-04-24 Simon J Gerraty <sjg@beast.crufty.net>
|
||||
|
||||
* meta.autodep.mk: do not override start_utc
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: dirdeps.mk,v 1.166 2024/01/05 23:16:34 sjg Exp $
|
||||
# $Id: dirdeps.mk,v 1.167 2024/05/06 20:41:08 sjg Exp $
|
||||
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
@ -581,6 +581,7 @@ BUILD_DIRDEPS_MAKEFILE ?= -f dirdeps.mk
|
||||
|
||||
# these should generally do
|
||||
BUILD_DIRDEPS_MAKEFILE ?=
|
||||
BUILD_DIRDEPS_OVERRIDES ?=
|
||||
BUILD_DIRDEPS_TARGETS ?= ${.TARGETS}
|
||||
|
||||
.if ${DIRDEPS_CACHE} != ${STATIC_DIRDEPS_CACHE:Uno} && ${DIRDEPS_CACHE:M${SRCTOP}/*} == ""
|
||||
@ -600,7 +601,9 @@ ${DIRDEPS_CACHE}: .META .NOMETA_CMP
|
||||
TARGET_SPEC=${TARGET_SPEC} \
|
||||
MAKEFLAGS= ${DIRDEP_CACHE_MAKE:U${.MAKE}} -C ${_CURDIR} \
|
||||
${BUILD_DIRDEPS_MAKEFILE} \
|
||||
${BUILD_DIRDEPS_TARGETS} BUILD_DIRDEPS_CACHE=yes \
|
||||
${BUILD_DIRDEPS_TARGETS} \
|
||||
${BUILD_DIRDEPS_OVERRIDES} \
|
||||
BUILD_DIRDEPS_CACHE=yes \
|
||||
.MAKE.DEPENDFILE=.none \
|
||||
${"${DEBUG_DIRDEPS:Nno}":?DEBUG_DIRDEPS='${DEBUG_DIRDEPS}':} \
|
||||
${.MAKEFLAGS:tW:S,-D ,-D,g:tw:M*WITH*} \
|
||||
|
4
contrib/bmake/mk/install-mk
Executable file → Normal file
4
contrib/bmake/mk/install-mk
Executable file → Normal file
@ -59,7 +59,7 @@
|
||||
# Simon J. Gerraty <sjg@crufty.net>
|
||||
|
||||
# RCSid:
|
||||
# $Id: install-mk,v 1.253 2024/04/18 17:18:31 sjg Exp $
|
||||
# $Id: install-mk,v 1.254 2024/05/06 20:41:08 sjg Exp $
|
||||
#
|
||||
# @(#) Copyright (c) 1994-2024 Simon J. Gerraty
|
||||
#
|
||||
@ -74,7 +74,7 @@
|
||||
# sjg@crufty.net
|
||||
#
|
||||
|
||||
MK_VERSION=20240414
|
||||
MK_VERSION=20240504
|
||||
OWNER=
|
||||
GROUP=
|
||||
MODE=444
|
||||
|
@ -23,6 +23,7 @@
|
||||
.MAKE.GID = <details omitted>
|
||||
.MAKE.JOBS.C = <details omitted>
|
||||
.MAKE.LEVEL = <details omitted>
|
||||
.MAKE.LEVEL.ENV = MAKELEVEL
|
||||
.MAKE.MAKEFILES = <details omitted>
|
||||
.MAKE.MAKEFILE_PREFERENCE = <details omitted>
|
||||
.MAKE.OS = <details omitted>
|
||||
@ -41,7 +42,6 @@ MACHINE_ARCH = <details omitted>
|
||||
MAKE = <details omitted>
|
||||
MFLAGS = -r -k -d g1
|
||||
#*** Command-line Variables:
|
||||
.MAKE.LEVEL.ENV = MAKELEVEL
|
||||
|
||||
#*** Directory Cache:
|
||||
# Stats: 0 hits 2 misses 0 near misses 0 losers (0%)
|
||||
|
@ -57,6 +57,7 @@ all : made-target error-target aborted-target
|
||||
.MAKE.GID = <details omitted>
|
||||
.MAKE.JOBS.C = <details omitted>
|
||||
.MAKE.LEVEL = <details omitted>
|
||||
.MAKE.LEVEL.ENV = MAKELEVEL
|
||||
.MAKE.MAKEFILES = <details omitted>
|
||||
.MAKE.MAKEFILE_PREFERENCE = <details omitted>
|
||||
.MAKE.OS = <details omitted>
|
||||
@ -75,7 +76,6 @@ MACHINE_ARCH = <details omitted>
|
||||
MAKE = <details omitted>
|
||||
MFLAGS = -r -k -d g2
|
||||
#*** Command-line Variables:
|
||||
.MAKE.LEVEL.ENV = MAKELEVEL
|
||||
.SHELL = <details omitted>
|
||||
|
||||
#*** Directory Cache:
|
||||
|
@ -57,6 +57,7 @@ all : made-target error-target aborted-target
|
||||
.MAKE.GID = <details omitted>
|
||||
.MAKE.JOBS.C = <details omitted>
|
||||
.MAKE.LEVEL = <details omitted>
|
||||
.MAKE.LEVEL.ENV = MAKELEVEL
|
||||
.MAKE.MAKEFILES = <details omitted>
|
||||
.MAKE.MAKEFILE_PREFERENCE = <details omitted>
|
||||
.MAKE.OS = <details omitted>
|
||||
@ -75,7 +76,6 @@ MACHINE_ARCH = <details omitted>
|
||||
MAKE = <details omitted>
|
||||
MFLAGS = -r -k -d g3
|
||||
#*** Command-line Variables:
|
||||
.MAKE.LEVEL.ENV = MAKELEVEL
|
||||
.SHELL = <details omitted>
|
||||
|
||||
#*** Directory Cache:
|
||||
|
@ -88,6 +88,7 @@ ParseDependency(.MAKEFLAGS: -d0 -dg1)
|
||||
.MAKE.GID = <details omitted>
|
||||
.MAKE.JOBS.C = <details omitted>
|
||||
.MAKE.LEVEL = <details omitted>
|
||||
.MAKE.LEVEL.ENV = MAKELEVEL
|
||||
.MAKE.MAKEFILES = <details omitted>
|
||||
.MAKE.MAKEFILE_PREFERENCE = <details omitted>
|
||||
.MAKE.OS = <details omitted>
|
||||
@ -106,7 +107,6 @@ MACHINE_ARCH = <details omitted>
|
||||
MAKE = <details omitted>
|
||||
MFLAGS = -r -k -d mps -d 0 -d g1
|
||||
#*** Command-line Variables:
|
||||
.MAKE.LEVEL.ENV = MAKELEVEL
|
||||
|
||||
#*** Directory Cache:
|
||||
# Stats: 0 hits 2 misses 0 near misses 0 losers (0%)
|
||||
|
@ -14,6 +14,7 @@
|
||||
.MAKE.GID = <details omitted>
|
||||
.MAKE.JOBS.C = <details omitted>
|
||||
.MAKE.LEVEL = <details omitted>
|
||||
.MAKE.LEVEL.ENV = MAKELEVEL
|
||||
.MAKE.MAKEFILES = <details omitted>
|
||||
.MAKE.MAKEFILE_PREFERENCE = <details omitted>
|
||||
.MAKE.OS = <details omitted>
|
||||
@ -32,7 +33,6 @@ MACHINE_ARCH = <details omitted>
|
||||
MAKE = <details omitted>
|
||||
MFLAGS = -r -k -d g1
|
||||
#*** Command-line Variables:
|
||||
.MAKE.LEVEL.ENV = MAKELEVEL
|
||||
|
||||
#*** Directory Cache:
|
||||
# Stats: 0 hits 2 misses 0 near misses 0 losers (0%)
|
||||
|
@ -1,8 +1,8 @@
|
||||
all: overrides=<>
|
||||
make -f varname-dot-makeoverrides.mk stage_1 VAR=value
|
||||
stage_1: overrides=< VAR>
|
||||
make -f varname-dot-makeoverrides.mk stage_2
|
||||
stage_2: overrides=< VAR>
|
||||
make -f varname-dot-makeoverrides.mk stage_2 .VAR=too
|
||||
stage_2: overrides=< VAR .VAR>
|
||||
make -f varname-dot-makeoverrides.mk stage_3
|
||||
stage_3: overrides=< VAR>
|
||||
stage_3: overrides=< .VAR VAR>
|
||||
exit status 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: varname-dot-makeoverrides.mk,v 1.5 2023/02/25 06:54:08 rillig Exp $
|
||||
# $NetBSD: varname-dot-makeoverrides.mk,v 1.6 2024/05/07 18:26:22 sjg Exp $
|
||||
#
|
||||
# Tests for the special .MAKEOVERRIDES variable, which lists the names of the
|
||||
# variables that are passed on to child processes via the MAKEFLAGS
|
||||
@ -13,7 +13,7 @@ all:
|
||||
|
||||
stage_1:
|
||||
@echo '$@: overrides=<'${.MAKEOVERRIDES:Q}'>'
|
||||
${MAKE} -f ${MAKEFILE} stage_2
|
||||
${MAKE} -f ${MAKEFILE} stage_2 .VAR=too
|
||||
|
||||
stage_2:
|
||||
@echo '$@: overrides=<'${.MAKEOVERRIDES:Q}'>'
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: var.c,v 1.1108 2024/04/28 15:10:19 rillig Exp $ */
|
||||
/* $NetBSD: var.c,v 1.1109 2024/05/07 18:26:22 sjg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -143,7 +143,7 @@
|
||||
#include "metachar.h"
|
||||
|
||||
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
|
||||
MAKE_RCSID("$NetBSD: var.c,v 1.1108 2024/04/28 15:10:19 rillig Exp $");
|
||||
MAKE_RCSID("$NetBSD: var.c,v 1.1109 2024/05/07 18:26:22 sjg Exp $");
|
||||
|
||||
/*
|
||||
* Variables are defined using one of the VAR=value assignments. Their
|
||||
@ -1048,7 +1048,7 @@ Var_SetWithFlags(GNode *scope, const char *name, const char *val,
|
||||
* exported to the environment (as per POSIX standard), except
|
||||
* for internals.
|
||||
*/
|
||||
if (!(flags & VAR_SET_NO_EXPORT) && name[0] != '.') {
|
||||
if (!(flags & VAR_SET_NO_EXPORT)) {
|
||||
|
||||
/*
|
||||
* If requested, don't export these in the
|
||||
@ -1057,14 +1057,11 @@ Var_SetWithFlags(GNode *scope, const char *name, const char *val,
|
||||
* command-line settings continue to override
|
||||
* Makefile settings.
|
||||
*/
|
||||
if (!opts.varNoExportEnv)
|
||||
if (!opts.varNoExportEnv && name[0] != '.')
|
||||
setenv(name, val, 1);
|
||||
/* XXX: What about .MAKE.EXPORTED? */
|
||||
/*
|
||||
* XXX: Why not just mark the variable for
|
||||
* needing export, as in ExportVarPlain?
|
||||
*/
|
||||
Global_Append(".MAKEOVERRIDES", name);
|
||||
|
||||
if (!(flags & VAR_SET_INTERNAL))
|
||||
Global_Append(".MAKEOVERRIDES", name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ SRCTOP?= ${.CURDIR:H:H}
|
||||
|
||||
# things set by configure
|
||||
|
||||
_MAKE_VERSION?=20240430
|
||||
_MAKE_VERSION?=20240508
|
||||
|
||||
prefix?= /usr
|
||||
srcdir= ${SRCTOP}/contrib/bmake
|
||||
|
Loading…
Reference in New Issue
Block a user