Home | History | Annotate | Download | only in unit-tests
History log of /src/usr.bin/make/unit-tests/varmod-remember.mk
RevisionDateAuthorComments
 1.9  09-Feb-2023  rillig tests/make: remove debugging directive from test for ':_'
 1.8  09-Feb-2023  rillig tests/make: extend and explain test for the ':_' modifier
 1.7  09-Feb-2023  sjg make: ApplyModifier_Remember always use SCOPE_GLOBAL

Conditionals evaluate vars with SCOPE_CMDLINE, if :_
is used within a conditional expression and is thus
set in SCOPE_CMDLINE, it breaks any use of :_ in SCOPE_GLOBAL.

The simplest solution is for :_ to always use SCOPE_GLOBAL

Reviewed by: rillig
 1.6  14-Mar-2021  rillig make: do not expand the variable name in the ':_' modifier

This edge case had been so obscure that even discovering this takes
quite some time and requires reading the source code of make.

The manual page doesn't document whether the variable name is expanded
or not, it doesn't even give an example. When this obscure modifier was
initially added in var.c 1.210 from 2017-01-30, Var_Set always expanded
the variable name once, and there was no way around it. Therefore this
expansion has probably been unintentional.
 1.5  14-Mar-2021  rillig tests/make: demonstrate unintended edge case for the ':_' modifier
 1.4  14-Mar-2021  rillig tests/make: convert test for ':_' modifier to parse time
 1.3  23-Aug-2020  rillig make(1): move tests for the :tu and :_ modifiers into separate files
 1.2  16-Aug-2020  rillig make(1): describe the purpose of each newly added unit test dummy
 1.1  16-Aug-2020  rillig make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.

RSS XML Feed