From nobody Thu Dec 28 00:03:04 2023 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 4T0pcT1f4nz54ft6; Thu, 28 Dec 2023 00:03:05 +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 4T0pcT14YCz3Bpl; Thu, 28 Dec 2023 00:03:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703721785; 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=7VDuPkbshp1qylVxkgCIyMKfMwYVOF0I6QrdCggWYww=; b=IvQAgevLV3SXtQKoKAFa62kR+a3ZaNDubM2whuzJqc4hKHvt13ah26NdOxTEe9w7WT1vbb x5R/bRJWxyoecgID7xw+l1qNFHc9m43cTblNXcfWoTQcRLBYjoUpufWAJJB2Z6bL/4fHSL V1ZtiCDVaHQ6GLOUcF634wP1OT1ni3nkghEJBMXLvdfPy6WjPzQp1r5n6bhSDYUlZOIdJi SiPSuODTPkDVsvM+KQfY02sBfTEqZzXdNi0mHhG9BnfL/XQzBzatiBAXvDDhBDQdKqPfe0 MbHbE9J4Z9jobUgBHm/Ryt8CYxrycISyPuPk8zpg1xdQpzZSzuEF0XNn3hwlnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703721785; a=rsa-sha256; cv=none; b=TueKSZlEFUSgeycS/WxyYWac63p3z+aLZe54YEThedfDXnofJT+d8pz9CpwkAfSfpalwZk spCToRuPLyTxTb0Lx0pnCiwf6qLRNRrdjcQSrJrlkAMz9mybi/P7IpJRFqbptA6cxE9FFy JXtrSfJZlvj/dAWorSIPvsF1mHjdDgHaMAUJIp/zey+/grQWkbEbFYIq4eQSGbxMqNREnw 4Tr75NJaW0BW/hSMj8qXH7SSqMRfImjx9ert6QNr6LcLVvX56mTmDGL17e4yI481Y/1Ph/ Et4OZRk06m5ChabVG34Dqy8LiqclKfm87+zieRP4W6CmOpsSQAcGq+vvDnPxNw== 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=1703721785; 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=7VDuPkbshp1qylVxkgCIyMKfMwYVOF0I6QrdCggWYww=; b=THqAiGYkPe3jKM1UVfUBZoZzmj+oYhRbdzzWALZDDyLom8axJlhedIzRTgTQ6PP8Mnv6VE 1yDhGgyao1a9E6F4gh6yP9E1E/lLhoQBJAiHzfltuir5Eekd2WushHnGl2uwZNSy1hu2Bl 6gZ7Bx3qAHCgQ64mXl5l2he+7TNR2gETJsJXrWUx8OmMqncs6SA1uBSNIpNs0UYb7obQKE tvzt0N7Mc/Y9P46HuCoT0RoBU8UM6wlSGyT3z90Za99hh2x1HGVa0QisF1RB/gzd+Es7bu Fq0wB7KDWj4qi9ItGPjI5Kt1nB5ZpGL6LRgCzB7iCSlkPpUQ17nBfGHDGJ7LpQ== 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 4T0pcT074wz107g; Thu, 28 Dec 2023 00:03:05 +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 3BS034TY039717; Thu, 28 Dec 2023 00:03:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BS0346k039714; Thu, 28 Dec 2023 00:03:04 GMT (envelope-from git) Date: Thu, 28 Dec 2023 00:03:04 GMT Message-Id: <202312280003.3BS0346k039714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 4ea5e107b1e7 - main - : Allow using SRCS for common sources 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ea5e107b1e778321f2e5e5083cf4eee3888eca8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4ea5e107b1e778321f2e5e5083cf4eee3888eca8 commit 4ea5e107b1e778321f2e5e5083cf4eee3888eca8 Author: VexedUXR AuthorDate: 2023-12-28 00:01:29 +0000 Commit: Warner Losh CommitDate: 2023-12-28 00:01:39 +0000 : Allow using SRCS for common sources Instead of having to do: PROGS= program1 program2 SRCS.program1= program1.c common.c SRCS.program2= program2.c common.c This can now be done instead: PROGS= program1 program2 SRCS= common.c SRCS.program1= program1.c SRCS.program2= program2.c This shouldn't effect any existing projects using . Reviewed by: imp, sjg Pull Request: https://github.com/freebsd/freebsd-src/pull/766 --- share/mk/bsd.progs.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk index fba617b12595..1551516dd6ea 100644 --- a/share/mk/bsd.progs.mk +++ b/share/mk/bsd.progs.mk @@ -22,9 +22,9 @@ PROGS += ${PROGS_CXX} .if defined(PROG) # just one of many PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE CSTD CXXSTD DPSRCS MAN \ - NO_SHARED MK_WERROR PROGNAME SRCS STRIP WARNS MK_ASAN MK_UBSAN -PROG_VARS += CFLAGS CXXFLAGS DEBUG_FLAGS DPADD INTERNALPROG LDADD LIBADD \ - LINKS LDFLAGS MLINKS ${PROG_OVERRIDE_VARS} + NO_SHARED MK_WERROR PROGNAME STRIP WARNS MK_ASAN MK_UBSAN +PROG_VARS += SRCS CFLAGS CXXFLAGS DEBUG_FLAGS DPADD INTERNALPROG LDADD \ + LIBADD LINKS LDFLAGS MLINKS ${PROG_OVERRIDE_VARS} .for v in ${PROG_VARS:O:u} .if empty(${PROG_OVERRIDE_VARS:M$v}) .if defined(${v}.${PROG}) @@ -96,8 +96,8 @@ $v = # Find common sources among the PROGS to depend on them before building # anything. This allows parallelization without them each fighting over # the same objects. -_PROGS_COMMON_SRCS= ${DPSRCS} -_PROGS_ALL_SRCS= +_PROGS_COMMON_SRCS= ${DPSRCS} ${SRCS} +_PROGS_ALL_SRCS= ${SRCS} .for p in ${PROGS} .for s in ${SRCS.${p}} .if ${_PROGS_ALL_SRCS:M${s}} && !${_PROGS_COMMON_SRCS:M${s}}