From nobody Fri May 3 22:49:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VWQwx2x7Wz5Jgl6; Fri, 3 May 2024 22:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VWQwx2fKdz4hFV; Fri, 3 May 2024 22:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714776593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AYBoU3W6hhoavhXMlhgce/wE3GiWixTEGTRgJ4025Is=; b=Ak1UFg9TQHIdV8QMmSIXTeALHLLSkQiumUrGYErqw58FMrhROYI4dm2+yyISO+HjUCBWeG uYnNIEelvIV/gbQ3X/b3i+rpepB5uELeQTbUZIVhOfNAvZmEphfvSY7cEGOHI/6MnD4yQO /2XQpzciJlc6JJDRRdFsyHO1cxcNGBw4C+8Rb2khBq1lhrrF/cF1Y/XqS7ZxR7OeTOyFjI HjSSrKfD8arSZTeqEUBOfRRJmaB0t0Cv7H3HUyYdG95xghVFAOSl556TmPsdBH13hqVVX9 FihtPwyyePuR4cMlMgl/3iTgMW1aBo+mGYCb+DekzFzU95QklJiR6aUKIyN86g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714776593; a=rsa-sha256; cv=none; b=EdTioJvOfXKo8PyhL7CPZjFxI5ObqKaLqT5meukBR6p3ifrkU7kVtjes7trTBc66F7FcF6 wjsvtSjPN5hbhKeLQ27PNyT2OhYOVNt4U5pbLvIf8Oe832M4O2MnVvY3rZXQFpOnayVMf8 ySHUScyUmIiNiYwg2ZMdu0pwbCSjAUv9S2oVPNKEK/C3w6kQ9ur1ZMUP/7MXpfY27OkeQn Zl95sBOJe7R3DnQUUb46jmWaflBbOlWYhqeQynG75aYcNKLc2uiia4R+KlyCLAO9KWIANy 8Z66p6DZ5mapFlz+oKzWGchIOh1l71XlUrpWqk2kAZqXGzQCPWqX4+oxMLqOUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714776593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AYBoU3W6hhoavhXMlhgce/wE3GiWixTEGTRgJ4025Is=; b=WrCMc+OYeOSlA8U9y0NYNQg5+MOlbUNbq+7MA8MJ2VxCOhqng8wHGKxQru43NMfrxiDw/n 8xw4gkalL7MjPZ+5kWMvfUCD9wbJEP+qRJ6+UHovwhA2KU3cZoBdvNFI/Vjz2l1NDyf9LO 16jeCmWJ6/r/Sc8EKQednHOtOtgHJpKAIlhzsUyyCELLyPSNDhbr4r9gXKuJAlLKwtBSEy VeBs3Ftx3lqS1Sa2TOGhp7dfGKGbXnrj+OUL2uVVTsW2Q7ULBgqP+YpAXtHVgtPAl30QOh xQTrpYmZ+SjfBQuetqym5/b8aNlbzrLAYQYfwsnVLORrnHn5FNAkiqoNqN7eYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VWQwx2FQdz14dn; Fri, 3 May 2024 22:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 443MnrMm067325; Fri, 3 May 2024 22:49:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 443MnlqN067299; Fri, 3 May 2024 22:49:47 GMT (envelope-from git) Date: Fri, 3 May 2024 22:49:47 GMT Message-Id: <202405032249.443MnlqN067299@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 548bfc56eb0b - main - Merge bmake-20240430 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 548bfc56eb0b2cefa0fb8dc2478240bfef610309 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=548bfc56eb0b2cefa0fb8dc2478240bfef610309 commit 548bfc56eb0b2cefa0fb8dc2478240bfef610309 Merge: 6faf65670edd 507951f55039 Author: Simon J. Gerraty AuthorDate: 2024-05-03 22:45:05 +0000 Commit: Simon J. Gerraty CommitDate: 2024-05-03 22:48:32 +0000 Merge bmake-20240430 Merge commit '507951f55039f9d1ceae507d510f8cb68225fbc5' contrib/bmake/ChangeLog | 75 +- contrib/bmake/Makefile | 6 +- contrib/bmake/Makefile.config.in | 1 + contrib/bmake/VERSION | 2 +- contrib/bmake/arch.c | 250 +- contrib/bmake/bmake.cat1 | 2585 +++++++++++++------- contrib/bmake/buf.c | 31 +- contrib/bmake/buf.h | 3 +- contrib/bmake/compat.c | 6 +- contrib/bmake/cond.c | 19 +- contrib/bmake/configure | 40 +- contrib/bmake/configure.in | 25 +- contrib/bmake/for.c | 15 +- contrib/bmake/job.c | 11 +- contrib/bmake/lst.c | 8 +- contrib/bmake/lst.h | 11 +- contrib/bmake/main.c | 18 +- contrib/bmake/make-bootstrap.sh.in | 1 + contrib/bmake/make.h | 22 +- contrib/bmake/meta.c | 4 +- contrib/bmake/mk/ChangeLog | 36 + contrib/bmake/mk/FILES | 1 + contrib/bmake/mk/init.mk | 4 +- contrib/bmake/mk/install-mk | 6 +- contrib/bmake/mk/meta.autodep.mk | 4 +- contrib/bmake/mk/meta.subdir.mk | 3 +- contrib/bmake/mk/own.mk | 5 +- contrib/bmake/mk/progs.mk | 22 +- contrib/bmake/mk/subdir.mk | 6 +- contrib/bmake/mk/sys.dirdeps.mk | 15 +- contrib/bmake/mk/sys/Cygwin.mk | 21 + contrib/bmake/os.sh | 6 +- contrib/bmake/parse.c | 26 +- contrib/bmake/str.c | 30 +- contrib/bmake/targ.c | 17 +- contrib/bmake/unit-tests/Makefile | 27 +- contrib/bmake/unit-tests/archive.exp | 8 + contrib/bmake/unit-tests/archive.mk | 33 +- contrib/bmake/unit-tests/cmd-errors-jobs.exp | 6 +- contrib/bmake/unit-tests/cmd-errors-jobs.mk | 31 +- contrib/bmake/unit-tests/cmd-errors-lint.exp | 6 +- contrib/bmake/unit-tests/cmd-errors-lint.mk | 11 +- contrib/bmake/unit-tests/cmd-errors.exp | 6 +- contrib/bmake/unit-tests/cmd-errors.mk | 11 +- contrib/bmake/unit-tests/cmdline-undefined.mk | 4 +- contrib/bmake/unit-tests/cmdline.mk | 4 +- contrib/bmake/unit-tests/comment.mk | 8 +- contrib/bmake/unit-tests/cond-cmp-string.mk | 20 +- contrib/bmake/unit-tests/cond-func-defined.exp | 3 - contrib/bmake/unit-tests/cond-func-defined.mk | 11 +- contrib/bmake/unit-tests/cond-token-string.exp | 2 +- contrib/bmake/unit-tests/cond-token-string.mk | 4 +- contrib/bmake/unit-tests/depsrc-end.mk | 4 +- contrib/bmake/unit-tests/depsrc-nopath.exp | 2 + contrib/bmake/unit-tests/depsrc-nopath.mk | 25 +- contrib/bmake/unit-tests/depsrc-phony.mk | 3 +- contrib/bmake/unit-tests/deptgt-phony.exp | 2 +- contrib/bmake/unit-tests/deptgt.exp | 2 +- contrib/bmake/unit-tests/deptgt.mk | 4 +- contrib/bmake/unit-tests/directive-export-impl.exp | 2 + contrib/bmake/unit-tests/directive-for-errors.exp | 2 +- contrib/bmake/unit-tests/directive-for-errors.mk | 4 +- contrib/bmake/unit-tests/directive-for-escape.exp | 1 + contrib/bmake/unit-tests/directive-for-null.exp | 6 +- contrib/bmake/unit-tests/directive-for-null.mk | 14 +- contrib/bmake/unit-tests/directive-for.exp | 2 +- contrib/bmake/unit-tests/directive-for.mk | 4 +- contrib/bmake/unit-tests/directive-include.exp | 2 +- contrib/bmake/unit-tests/directive-include.mk | 4 +- contrib/bmake/unit-tests/directive-undef.exp | 2 +- contrib/bmake/unit-tests/directive-undef.mk | 4 +- contrib/bmake/unit-tests/lint.exp | 2 +- contrib/bmake/unit-tests/moderrs.exp | 12 +- contrib/bmake/unit-tests/opt-chdir.exp | 2 - contrib/bmake/unit-tests/opt-chdir.mk | 8 +- contrib/bmake/unit-tests/opt-debug-errors-jobs.exp | 6 + contrib/bmake/unit-tests/opt-debug-lint.exp | 6 +- contrib/bmake/unit-tests/opt-debug-lint.mk | 8 +- contrib/bmake/unit-tests/opt-debug-parse.exp | 2 + contrib/bmake/unit-tests/opt-file.exp | 4 +- contrib/bmake/unit-tests/opt-file.mk | 12 +- .../bmake/unit-tests/opt-keep-going-indirect.mk | 10 +- contrib/bmake/unit-tests/opt-m-include-dir.mk | 8 +- contrib/bmake/unit-tests/var-eval-short.exp | 4 +- contrib/bmake/unit-tests/var-eval-short.mk | 4 +- contrib/bmake/unit-tests/var-op-expand.exp | 4 +- contrib/bmake/unit-tests/var-op-expand.mk | 6 +- contrib/bmake/unit-tests/vardebug.exp | 2 +- contrib/bmake/unit-tests/vardebug.mk | 4 +- contrib/bmake/unit-tests/varmisc.exp | 20 +- contrib/bmake/unit-tests/varmod-assign.exp | 2 +- contrib/bmake/unit-tests/varmod-assign.mk | 4 +- contrib/bmake/unit-tests/varmod-edge.exp | 6 +- contrib/bmake/unit-tests/varmod-edge.mk | 8 +- contrib/bmake/unit-tests/varmod-gmtime.exp | 10 +- contrib/bmake/unit-tests/varmod-gmtime.mk | 12 +- contrib/bmake/unit-tests/varmod-hash.exp | 6 +- contrib/bmake/unit-tests/varmod-ifelse.exp | 2 +- contrib/bmake/unit-tests/varmod-ifelse.mk | 6 +- contrib/bmake/unit-tests/varmod-indirect.exp | 8 +- contrib/bmake/unit-tests/varmod-indirect.mk | 10 +- contrib/bmake/unit-tests/varmod-localtime.exp | 10 +- contrib/bmake/unit-tests/varmod-localtime.mk | 12 +- contrib/bmake/unit-tests/varmod-loop-delete.exp | 2 +- contrib/bmake/unit-tests/varmod-loop-delete.mk | 4 +- contrib/bmake/unit-tests/varmod-loop-varname.exp | 8 +- contrib/bmake/unit-tests/varmod-loop-varname.mk | 10 +- contrib/bmake/unit-tests/varmod-loop.exp | 2 + contrib/bmake/unit-tests/varmod-match-escape.exp | 6 +- contrib/bmake/unit-tests/varmod-match-escape.mk | 8 +- contrib/bmake/unit-tests/varmod-match.exp | 22 +- contrib/bmake/unit-tests/varmod-match.mk | 54 +- contrib/bmake/unit-tests/varmod-mtime.exp | 12 +- contrib/bmake/unit-tests/varmod-mtime.mk | 14 +- contrib/bmake/unit-tests/varmod-range.exp | 10 +- contrib/bmake/unit-tests/varmod-range.mk | 12 +- contrib/bmake/unit-tests/varmod-subst-regex.exp | 2 +- contrib/bmake/unit-tests/varmod-subst.exp | 2 +- contrib/bmake/unit-tests/varmod-to-separator.exp | 6 +- contrib/bmake/unit-tests/varmod-to-separator.mk | 8 +- contrib/bmake/unit-tests/varmod.exp | 4 +- contrib/bmake/unit-tests/varmod.mk | 6 +- contrib/bmake/unit-tests/varname-dot-shell.exp | 3 + contrib/bmake/unit-tests/varparse-errors.exp | 4 +- contrib/bmake/unit-tests/varparse-errors.mk | 6 +- contrib/bmake/var.c | 159 +- usr.bin/bmake/Makefile | 4 +- usr.bin/bmake/Makefile.config | 3 +- usr.bin/bmake/config.h | 4 +- usr.bin/bmake/unit-tests/Makefile | 27 +- 130 files changed, 2625 insertions(+), 1616 deletions(-) diff --cc contrib/bmake/Makefile index 3332dcdeaf2d,000000000000..65730df7e3df mode 100644,000000..100644 --- a/contrib/bmake/Makefile +++ b/contrib/bmake/Makefile @@@ -1,237 -1,0 +1,237 @@@ - # $Id: Makefile,v 1.126 2024/03/10 17:46:44 sjg Exp $ ++# $Id: Makefile,v 1.127 2024/03/19 16:03:23 sjg Exp $ + +PROG= bmake + +SRCS= \ + arch.c \ + buf.c \ + compat.c \ + cond.c \ + dir.c \ + for.c \ + hash.c \ + job.c \ + lst.c \ + main.c \ + make.c \ + make_malloc.c \ + meta.c \ + metachar.c \ + parse.c \ + str.c \ + suff.c \ + targ.c \ + trace.c \ + util.c \ + var.c + +.-include "VERSION" +.-include "Makefile.inc" + +# this file gets generated by configure +.-include "Makefile.config" + +.if !empty(LIBOBJS) +SRCS+= ${LIBOBJS:T:.o=.c} +.endif + +# just in case +prefix?= /usr +srcdir?= ${.CURDIR} + +DEFAULT_SYS_PATH?= ${prefix}/share/mk + +CPPFLAGS+= -DUSE_META +CFLAGS+= ${CPPFLAGS} +CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" +CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE +CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} +COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\"" + - .for x in FORCE_MACHINE FORCE_MACHINE_ARCH ++.for x in FORCE_MAKE_OS FORCE_MACHINE FORCE_MACHINE_ARCH +.ifdef $x +COPTS.main.c+= "-D$x=\"${$x}\"" +.endif +.endfor + +# meta mode can be useful even without filemon +# should be set by now +USE_FILEMON ?= no +.if ${USE_FILEMON:tl} != "no" +.PATH: ${srcdir}/filemon +SRCS+= filemon_${USE_FILEMON}.c +COPTS.meta.c+= -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu} +COPTS.job.c+= ${COPTS.meta.c} + +.if ${USE_FILEMON} == "dev" +FILEMON_H ?= /usr/include/dev/filemon/filemon.h +.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h" +COPTS.filemon_dev.c += -DHAVE_FILEMON_H -I${FILEMON_H:H} +.endif +.elif ${USE_FILEMON} == "ktrace" +COPTS.filemon_ktrace.c += -Wno-error=unused-parameter +.endif + +.endif # USE_FILEMON + +.PATH: ${srcdir} + +.if make(obj) || make(clean) +SUBDIR+= unit-tests +.endif + +# start-delete1 for bsd.after-import.mk +# we skip a lot of this when building as part of FreeBSD etc. + +# list of OS's which are derrived from BSD4.4 +BSD44_LIST= NetBSD FreeBSD OpenBSD DragonFly MirBSD Bitrig +# we are... +OS := ${.MAKE.OS:U${uname -s:L:sh}} +# are we 4.4BSD ? +isBSD44:=${BSD44_LIST:M${OS}} + - .if ${isBSD44} == "" && ${OS:NCYGWIN*:NDarwin:NLinux} != "" ++.if ${isBSD44} == "" && ${OS:NCygwin:NDarwin:NLinux} != "" +MANTARGET?= cat +.if ${MACHINE} == "sun386" +# even I don't have one of these anymore :-) +CFLAGS+= -DPORTAR +.elif ${OS} != "SunOS" +# assume the worst +SRCS+= sigcompat.c +CFLAGS+= -DSIGNAL_FLAGS=SA_RESTART +.endif +.else +MANTARGET?= man +.endif + +# turn this on by default - ignored if we are root +WITH_INSTALL_AS_USER= + +# suppress with -DWITHOUT_* +OPTIONS_DEFAULT_YES+= \ + AUTOCONF_MK \ + INSTALL_MK \ + PROG_LINK + +OPTIONS_DEFAULT_NO+= \ + PROG_VERSION + +# process options now +.include + +.if ${MK_PROG_VERSION} == "yes" +PROG_NAME= ${PROG}-${_MAKE_VERSION} +.if ${MK_PROG_LINK} == "yes" +SYMLINKS+= ${PROG_NAME} ${BINDIR}/${PROG} +.endif +.endif + +EXTRACT_MAN=no +# end-delete1 + +MAN= ${PROG}.1 +MAN1= ${MAN} + +.if ${PROG} != "make" +CLEANFILES+= my.history +.if make(${MAN}) || !exists(${srcdir}/${MAN}) +my.history: + @(echo ".Nm"; \ + echo "is derived from NetBSD"; \ + echo ".Xr make 1 ."; \ + echo "It uses autoconf to facilitate portability to other platforms."; \ + echo ".Pp") > $@ + +.NOPATH: ${MAN} +${MAN}: make.1 my.history + @echo making $@ + @sed \ + -e '/^.Dt/s/MAKE/${PROG:tu}/' \ + -e 's/^.Nx/NetBSD/' \ + -e '/^.Nm/s/make/${PROG}/' \ + -e '/^.Sh HISTORY/rmy.history' \ + -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${srcdir}/make.1 > $@ + +all beforeinstall: ${MAN} +_mfromdir=. +.endif +.endif + +MANTARGET?= cat +MANDEST?= ${MANDIR}/${MANTARGET}1 + +.if ${MANTARGET} == "cat" +_mfromdir=${srcdir} +.endif + +.include + +CPPFLAGS+= -DMAKE_NATIVE -DHAVE_CONFIG_H +COPTS.var.c += -Wno-cast-qual +COPTS.job.c += -Wno-format-nonliteral +COPTS.parse.c += -Wno-format-nonliteral +COPTS.var.c += -Wno-format-nonliteral + +# Force these +SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share} +BINDIR= ${BINDIR.bmake:U${prefix}/bin} +MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man} + +${OBJS}: config.h + +# start-delete2 for bsd.after-import.mk + +# make sure that MAKE_VERSION gets updated. +main.o: ${srcdir}/VERSION + +.if ${MK_AUTOCONF_MK} == "yes" +CONFIGURE_DEPS += ${.CURDIR}/VERSION +# we do not need or want the generated makefile +CONFIGURE_ARGS += --without-makefile +AUTOCONF_GENERATED_MAKEFILE = Makefile.config +.include +.endif +SHARE_MK ?= ${SHAREDIR}/mk +MKSRC = ${srcdir}/mk +INSTALL ?= ${srcdir}/install-sh + +.if ${MK_INSTALL_MK} == "yes" +install: install-mk +.endif + +beforeinstall: + test -d ${DESTDIR}${BINDIR} || ${INSTALL} -m ${DIRMODE} -d ${DESTDIR}${BINDIR} + test -d ${DESTDIR}${MANDEST} || ${INSTALL} -m ${DIRMODE} -d ${DESTDIR}${MANDEST} + +install-mk: +.if exists(${MKSRC}/install-mk) + test -d ${DESTDIR}${SHARE_MK} || ${INSTALL} -m ${DIRMODE} -d ${DESTDIR}${SHARE_MK} + sh ${MKSRC}/install-mk -v -m ${NONBINMODE} ${DESTDIR}${SHARE_MK} +.else + @echo need to unpack mk.tar.gz under ${srcdir} or set MKSRC; false +.endif +# end-delete2 + +# A simple unit-test driver to help catch regressions +TEST_MAKE ?= ${.OBJDIR}/${PROG:T} +accept test: .NOMETA + cd ${.CURDIR}/unit-tests && \ + MAKEFLAGS= ${TEST_MAKE} -r -m / ${.TARGET} ${TESTS:DTESTS=${TESTS:Q}} + + +.if make(test) && ${MK_AUTO_OBJ} == "yes" +# The test target above visits unit-tests with -r -m / +# which prevents MK_AUTO_OBJ doing its job +# so do it here +.if defined(MAKEOBJDIRPREFIX) || ${MAKEOBJDIR:U:M*/*} != "" +_utobj = ${.OBJDIR}/unit-tests +.else +_utobj = ${.CURDIR}/unit-tests/${MAKEOBJDIR:Uobj} +.endif +utobj: .NOMETA + @test -d ${_utobj} && exit 0; \ + echo "[Creating ${_utobj}...]"; \ + umask ${OBJDIR_UMASK:U002}; \ + mkdir -p ${_utobj} +test: utobj +.endif diff --cc contrib/bmake/mk/sys/Cygwin.mk index 000000000000,ffc479ad9ef3..ffc479ad9ef3 mode 000000,100644..100644 --- a/contrib/bmake/mk/sys/Cygwin.mk +++ b/contrib/bmake/mk/sys/Cygwin.mk diff --cc usr.bin/bmake/Makefile index 5a0bf44fb0fb,000000000000..b243cd0275b6 mode 100644,000000..100644 --- a/usr.bin/bmake/Makefile +++ b/usr.bin/bmake/Makefile @@@ -1,180 -1,0 +1,180 @@@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# + +SRCTOP?= ${.CURDIR:H:H} + +# look here first for config.h +CFLAGS+= -I${.CURDIR} + +# for after-import +CLEANDIRS+= FreeBSD +CLEANFILES+= bootstrap + - # $Id: Makefile,v 1.126 2024/03/10 17:46:44 sjg Exp $ ++# $Id: Makefile,v 1.127 2024/03/19 16:03:23 sjg Exp $ + +PROG?= ${.CURDIR:T} + +SRCS= \ + arch.c \ + buf.c \ + compat.c \ + cond.c \ + dir.c \ + for.c \ + hash.c \ + job.c \ + lst.c \ + main.c \ + make.c \ + make_malloc.c \ + meta.c \ + metachar.c \ + parse.c \ + str.c \ + suff.c \ + targ.c \ + trace.c \ + util.c \ + var.c + +.sinclude "Makefile.inc" + +# this file gets generated by configure +.sinclude "Makefile.config" + +.if !empty(LIBOBJS) +SRCS+= ${LIBOBJS:T:.o=.c} +.endif + +# just in case +prefix?= /usr +srcdir?= ${.CURDIR} + +DEFAULT_SYS_PATH?= ${prefix}/share/mk + +CPPFLAGS+= -DUSE_META +CFLAGS+= ${CPPFLAGS} +CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" +CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE +CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} +COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\"" + - .for x in FORCE_MACHINE FORCE_MACHINE_ARCH ++.for x in FORCE_MAKE_OS FORCE_MACHINE FORCE_MACHINE_ARCH +.ifdef $x +COPTS.main.c+= "-D$x=\"${$x}\"" +.endif +.endfor + +# meta mode can be useful even without filemon +# should be set by now +USE_FILEMON ?= no +.if ${USE_FILEMON:tl} != "no" +.PATH: ${srcdir}/filemon +SRCS+= filemon_${USE_FILEMON}.c +COPTS.meta.c+= -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu} +COPTS.job.c+= ${COPTS.meta.c} + +.if ${USE_FILEMON} == "dev" +FILEMON_H ?= /usr/include/dev/filemon/filemon.h +.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h" +COPTS.filemon_dev.c += -DHAVE_FILEMON_H -I${FILEMON_H:H} +.endif +.elif ${USE_FILEMON} == "ktrace" +COPTS.filemon_ktrace.c += -Wno-error=unused-parameter +.endif + +.endif # USE_FILEMON + +.PATH: ${srcdir} + +.if make(obj) || make(clean) +SUBDIR+= unit-tests +.endif + + +MAN= ${PROG}.1 +MAN1= ${MAN} + +.if ${PROG} != "make" +CLEANFILES+= my.history +.if make(${MAN}) || !exists(${srcdir}/${MAN}) +my.history: + @(echo ".Nm"; \ + echo "is derived from NetBSD"; \ + echo ".Xr make 1 ."; \ + echo "It uses autoconf to facilitate portability to other platforms."; \ + echo ".Pp") > $@ + +.NOPATH: ${MAN} +${MAN}: make.1 my.history + @echo making $@ + @sed \ + -e '/^.Dt/s/MAKE/${PROG:tu}/' \ + -e 's/^.Nx/NetBSD/' \ + -e '/^.Nm/s/make/${PROG}/' \ + -e '/^.Sh HISTORY/rmy.history' \ + -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${srcdir}/make.1 > $@ + +all beforeinstall: ${MAN} +_mfromdir=. +.endif +.endif + +MANTARGET?= cat +MANDEST?= ${MANDIR}/${MANTARGET}1 + +.if ${MANTARGET} == "cat" +_mfromdir=${srcdir} +.endif + +.include + +CPPFLAGS+= -DMAKE_NATIVE -DHAVE_CONFIG_H +COPTS.var.c += -Wno-cast-qual +COPTS.job.c += -Wno-format-nonliteral +COPTS.parse.c += -Wno-format-nonliteral +COPTS.var.c += -Wno-format-nonliteral + +# Force these +SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share} +BINDIR= ${BINDIR.bmake:U${prefix}/bin} +MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man} + +${OBJS}: config.h + + +# A simple unit-test driver to help catch regressions +TEST_MAKE ?= ${.OBJDIR}/${PROG:T} +accept test: .NOMETA + cd ${.CURDIR}/unit-tests && \ + MAKEFLAGS= ${TEST_MAKE} -r -m / ${.TARGET} ${TESTS:DTESTS=${TESTS:Q}} + + +.if make(test) && ${MK_AUTO_OBJ} == "yes" +# The test target above visits unit-tests with -r -m / +# which prevents MK_AUTO_OBJ doing its job +# so do it here +.if defined(MAKEOBJDIRPREFIX) || ${MAKEOBJDIR:U:M*/*} != "" +_utobj = ${.OBJDIR}/unit-tests +.else +_utobj = ${.CURDIR}/unit-tests/${MAKEOBJDIR:Uobj} +.endif +utobj: .NOMETA + @test -d ${_utobj} && exit 0; \ + echo "[Creating ${_utobj}...]"; \ + umask ${OBJDIR_UMASK:U002}; \ + mkdir -p ${_utobj} +test: utobj +.endif + +# override some simple things +BINDIR= /usr/bin +MANDIR= /usr/share/man/man + +# make sure we get this +CFLAGS+= ${COPTS.${.IMPSRC:T}} + +after-import: ${SRCTOP}/contrib/bmake/bsd.after-import.mk + cd ${.CURDIR} && ${.MAKE} -f ${SRCTOP}/contrib/bmake/bsd.after-import.mk + diff --cc usr.bin/bmake/Makefile.config index 88ec643b8a4a,000000000000..ee717d952846 mode 100644,000000..100644 --- a/usr.bin/bmake/Makefile.config +++ b/usr.bin/bmake/Makefile.config @@@ -1,27 -1,0 +1,28 @@@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# + +SRCTOP?= ${.CURDIR:H:H} + +# things set by configure + - _MAKE_VERSION?=20240309 ++_MAKE_VERSION?=20240430 + +prefix?= /usr +srcdir= ${SRCTOP}/contrib/bmake +CC?= cc ++MAKE_OS?= +DEFAULT_SYS_PATH?= .../share/mk:/usr/share/mk + +EGREP = egrep +CPPFLAGS+= +CFLAGS+= ${CPPFLAGS} -DHAVE_CONFIG_H +LDFLAGS+= +LIBOBJS+= ${LIBOBJDIR}stresep$U.o +LDADD+= +USE_META?= yes +USE_FILEMON?= dev +FILEMON_H?= /usr/include/dev/filemon/filemon.h +BMAKE_PATH_MAX?= 1024 +# used if MAXPATHLEN not defined +CPPFLAGS+= -DBMAKE_PATH_MAX=${BMAKE_PATH_MAX} diff --cc usr.bin/bmake/config.h index 281e105d853d,000000000000..3ca313216962 mode 100644,000000..100644 --- a/usr.bin/bmake/config.h +++ b/usr.bin/bmake/config.h @@@ -1,448 -1,0 +1,448 @@@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.in by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Path of default shell */ +/* #undef DEFSHELL_CUSTOM */ + +/* Shell spec to use by default */ +/* #undef DEFSHELL_INDEX */ + +/* Path of default shell */ +/* #undef DEFSHELL_PATH */ + +/* Define to 1 if you have the header file. */ +#define HAVE_AR_H 1 + +/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you + don't. */ +#define HAVE_DECL_SYS_SIGLIST 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the `dirname' function. */ +#define HAVE_DIRNAME 1 + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Define to 1 if you have the `err' function. */ +#define HAVE_ERR 1 + +/* Define to 1 if you have the `errx' function. */ +#define HAVE_ERRX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ERR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getenv' function. */ +#define HAVE_GETENV 1 + +/* Define to 1 if you have the `getopt' function. */ +#define HAVE_GETOPT 1 + +/* Define to 1 if you have the `getwd' function. */ +#define HAVE_GETWD 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `killpg' function. */ +#define HAVE_KILLPG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIBGEN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if the system has the type `long long int'. */ +#define HAVE_LONG_LONG_INT 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if you have the `mmap' function. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_PATHS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_RANLIB_H 1 + +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_REGEX_H 1 + +/* Define to 1 if you have the `select' function. */ +#define HAVE_SELECT 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setpgid' function. */ +#define HAVE_SETPGID 1 + +/* Define to 1 if you have the `setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + +/* Define to 1 if you have the `setsid' function. */ +#define HAVE_SETSID 1 + +/* Define to 1 if you have the `sigaction' function. */ +#define HAVE_SIGACTION 1 + +/* Define to 1 if you have the `sigaddset' function. */ +#define HAVE_SIGADDSET 1 + +/* Define to 1 if you have the `sigpending' function. */ +#define HAVE_SIGPENDING 1 + +/* Define to 1 if you have the `sigprocmask' function. */ +#define HAVE_SIGPROCMASK 1 + +/* Define to 1 if you have the `sigsetmask' function. */ +#define HAVE_SIGSETMASK 1 + +/* Define to 1 if you have the `sigsuspend' function. */ +#define HAVE_SIGSUSPEND 1 + +/* Define to 1 if you have the `sigvec' function. */ +#define HAVE_SIGVEC 1 + +/* Define to 1 if the system has the type `sig_atomic_t'. */ +#define HAVE_SIG_ATOMIC_T 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the `stresep' function. */ +/* #undef HAVE_STRESEP */ + +/* Define to 1 if you have the `strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* Define to 1 if you have the `strsep' function. */ +#define HAVE_STRSEP 1 + +/* Define to 1 if you have the `strtod' function. */ +#define HAVE_STRTOD 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + +/* Define to 1 if you have the `strtoul' function. */ +#define HAVE_STRTOUL 1 + +/* Define to 1 if you have the `sysctl' function. */ +#define HAVE_SYSCTL 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SYSCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `unsetenv' function. */ +#define HAVE_UNSETENV 1 + +/* Define to 1 if the system has the type `unsigned long long int'. */ +#define HAVE_UNSIGNED_LONG_LONG_INT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UTIME_H 1 + +/* Define to 1 if you have the `vfork' function. */ +#define HAVE_VFORK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VFORK_H */ + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Define to 1 if you have the `vsnprintf' function. */ +#define HAVE_VSNPRINTF 1 + +/* Define to 1 if you have the `wait3' function. */ +#define HAVE_WAIT3 1 + +/* Define to 1 if you have the `wait4' function. */ +#define HAVE_WAIT4 1 + +/* Define to 1 if you have the `waitpid' function. */ +#define HAVE_WAITPID 1 + +/* Define to 1 if you have the `warn' function. */ +#define HAVE_WARN 1 + +/* Define to 1 if you have the `warnx' function. */ +#define HAVE_WARNX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if `fork' works. */ +#define HAVE_WORKING_FORK 1 + +/* Define to 1 if `vfork' works. */ +#define HAVE_WORKING_VFORK 1 + +/* define if your compiler has __attribute__ */ +#define HAVE___ATTRIBUTE__ 1 + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "sjg@NetBSD.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "bmake" + +/* Define to the full name and version of this package. */ - #define PACKAGE_STRING "bmake 20240212" ++#define PACKAGE_STRING "bmake 20240314" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "bmake" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ - #define PACKAGE_VERSION "20240212" ++#define PACKAGE_VERSION "20240314" + +/* Define to 1 if the `S_IS*' macros in do not work properly. */ +/* #undef STAT_MACROS_BROKEN */ + +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 *** 1001 LINES SKIPPED ***