From nobody Thu Oct 06 13:35:44 2022 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 4Mjsrw4HJhz4dcdF; Thu, 6 Oct 2022 13:35:44 +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 4Mjsrw3fXqz3F1C; Thu, 6 Oct 2022 13:35:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665063344; 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=PKVEztVqciRQNnO0SfB+N3wBgz2wUt1tr3feObf11Ik=; b=I3xXUdP6FAU0mb9rY96tmQfCVTUqQR/jAUgczR6REP0hM11Bm2R/JIx+r7sf/I1jma3XWW W8tyt5+0BOhWaWm1eljAeCuMsB37Vg/mjgjvOaYahW3ZCKdU3pC+C+DchXd3u60RtCL8hR Az47X9NI98LXJj4oq+71bNwT3OjTrPIbtiH2kRIGCNAlxpswpBQZAXAgZoB3xCtCpdeOqY Me7JdmP1msalkNaUhW0w5Z/nmAd556CP83R7W5mbXE+o5yispde8HtjHYyXixjZUW97zU8 9LYrypibqXmccMzqaQW9CQ4wuPG9G645o9jUFXuAykIeKrALlOkwaOJ9TRHD1Q== 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 4Mjsrw2hvVzGbx; Thu, 6 Oct 2022 13:35:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 296DZiug018674; Thu, 6 Oct 2022 13:35:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 296DZiEP018673; Thu, 6 Oct 2022 13:35:44 GMT (envelope-from git) Date: Thu, 6 Oct 2022 13:35:44 GMT Message-Id: <202210061335.296DZiEP018673@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: dc39a3346e7d - main - Make #if and #endif do what people expect in *_if.m 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc39a3346e7d492114e94ddec7049e720579d6f3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665063344; 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=PKVEztVqciRQNnO0SfB+N3wBgz2wUt1tr3feObf11Ik=; b=wpILaPkdqAUM5wKl1H69iAW7/4mlYfnD+kuBm3h3XXbu1gfwtwnbfM6WKqdOKszF5daKBC rQvfh2AClelfxzBb0vff0gTQqpUmkwTAMCKMltMkrWwjt0M5fg7wPM2TaUbC+TGfQdZRot vidtjo4Z3D8CcF2qaPLd791bAam6TeJrJA/3DWTOSNaOoP2QLLX4Z6AsdHMBitTlY6rqkp YUWWvGxoIo0OWqwhQ2MRvP4h1flGKgo8wB2vsk/rvrcRPItjHwKEktwZshElvuDazlnIFC IiSCspBg3pwr/Q2KEVFHLKrpCgiQH68iHyPtMaw6x4ZESXGc8M3eFOz6DsqvmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665063344; a=rsa-sha256; cv=none; b=GKl1mqx8wLBwJiURnHqhdfK66iJuDKxj2GC2vOBsaF9QI7yYUaXHOFUyVuCzho19eJZwMd /Y3BDbO0IZKRue0sDsgQrSEslsmo3aWELu7UKs7Ef6ECi8yitPBDjdDQCa+SWtzOaO3+mM 8MZXNesuyUOeReog/rFNVv+Ylgpc/udwRcCImeGhLqpbfnihPVdaLfS8T9+FxD1MyGSjaR 4JqQSxpXOz9WuAk70UjzB1TRSjxxhxPbIJP6wyjcTIQhECOmTrrmb40yISTw8bsW4cnkkr tX/+zlqGJAYLMl7hHeOdxkVYhcmSitc3X5yzmc/QlCy36btabSaLa7Kk/1HWkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=dc39a3346e7d492114e94ddec7049e720579d6f3 commit dc39a3346e7d492114e94ddec7049e720579d6f3 Author: Andrew Turner AuthorDate: 2022-09-30 16:02:36 +0000 Commit: Andrew Turner CommitDate: 2022-10-06 13:35:31 +0000 Make #if and #endif do what people expect in *_if.m These are used in a few places. Pass them to the generated .c and .h files to allow us to build the parts of the interface the kernel config supports. Reviewed by: imp, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36882 --- sys/tools/makeobjops.awk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/tools/makeobjops.awk b/sys/tools/makeobjops.awk index 5a4ccf759960..4d764064d6b1 100644 --- a/sys/tools/makeobjops.awk +++ b/sys/tools/makeobjops.awk @@ -466,6 +466,11 @@ for (file_i = 0; file_i < num_files; file_i++) { debug("Included file: " incld); printc("#include " incld); } + else if (/^#[ ]*if/ || /^#[ ]*else/ || /^#[ ]*elif/ || + /^#[ ]*endif/) { + printh($0); + printc($0); + } sub(/#.*/, ""); # remove comments sub(/^[ ]+/, ""); # remove leading ...