Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id D6ACE1A923A for ; Wed, 2 Sep 2020 05:33:59 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 404D484DBE; Wed, 2 Sep 2020 05:33:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id B335684DBD for ; Wed, 2 Sep 2020 05:33:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id 1Zn4nO1byBTh for ; Wed, 2 Sep 2020 05:33:58 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 3A48884D67 for ; Wed, 2 Sep 2020 05:33:58 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 2DCBFFB28; Wed, 2 Sep 2020 05:33:58 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Wed, 2 Sep 2020 05:33:58 +0000 From: "Roland Illig" Subject: CVS commit: src To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20200902053358.2DCBFFB28@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Roland Illig" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: rillig Date: Wed Sep 2 05:33:58 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi src/usr.bin/make/unit-tests: Makefile Added Files: src/usr.bin/make/unit-tests: directive-for.exp directive-for.mk Log Message: make(1): add test for the .for directive For a long time, I had assumed that the iteration variables of a .for loop are just normal global variables. This assumption was wrong but didn't have any consequences. The iteration variables of a .for loop can just be accessed like global variables, therefore it is not obvious that they are implemented in a completely different way. There are some edge cases in conditions used inside .for loops, in which the iteration variables cannot be used like normal variables. An example is brought up in https://gnats.netbsd.org/47888, which observes that the defined() and empty() functions in conditions only work with variables but ignore the iteration "variables", simply because these are not variables but only expressions. To generate a diff of this commit: cvs rdiff -u -r1.914 -r1.915 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.129 -r1.130 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/directive-for.exp \ src/usr.bin/make/unit-tests/directive-for.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.