Lines Matching refs:the
3 # Tests for variables specified on the command line.
5 # Variables that are specified on the command line override those from the
8 # For performance reasons, the actual implementation is more complex than the
10 # which before var.c 1.586 from 2020-10-25 calculated the hash value of the
11 # variable name once for each lookup. Instead, when looking up the value of
12 # a variable, the search often starts in the global scope since that is where
13 # most of the variables are stored. This conflicts with the statement that
14 # variables from the cmdline scope override global variables, since after the
15 # common case of finding a variable in the global scope, another lookup would
16 # be needed in the cmdline scope to ensure that there is no overriding
23 # there is a cmdline variable of the same name.
25 # Whenever a cmdline variable is created, any global variable of the
32 # These 4 rules provide the guarantee that whenever a global variable exists,
33 # there cannot be a cmdline variable of the same name. Therefore, after
34 # finding a variable in the global scope, no additional lookup is needed in
35 # the cmdline scope.
37 # The above ruleset provides the same guarantees as the simple rule "cmdline
38 # overrides global". Due to an implementation mistake, the actual behavior
39 # was not entirely equivalent to the simple rule though. The mistake was
41 # variable was deleted, but not with the exact same name as the cmdline
42 # variable. Instead, the name of the global variable was expanded one more
43 # time than the name of the cmdline variable. For variable names that didn't
44 # have a '$$' in their name, it was implemented correctly all the time.
46 # The bug was added in var.c 1.183 on 2013-07-16, when Var_Set called
47 # Var_Delete to delete the global variable. Just two months earlier, in var.c
48 # 1.174 from 2013-05-18, Var_Delete had started to expand the variable name.
49 # Together, these two changes made the variable name be expanded twice in a
52 # Another bug was the wrong assumption that "deleting a cmdline variable is
54 # from 2016-02-19, when the variable modifier ':@' started to delete the
55 # temporary loop variable after finishing the loop. It was probably not
61 # Most cmdline variables are set at the very beginning, when parsing the
62 # command line arguments. Using the special target '.MAKEFLAGS', it is
74 # The global variable is "overridden" by simply deleting it and then
75 # installing the cmdline variable instead. Since there is no obvious way to
76 # undefine a cmdline variable, there is no need to remember the old value
77 # of the global variable could become visible again.
84 # If Var_SetWithFlags should ever forget to delete the global variable,
85 # the below line would print "global" instead of the current "makeflags".