Age | Commit message (Collapse) | Author |
|
Allow makefiles to mark the `export` and `unexport` keywords as
deprecated or obsolete. In large builds like Android, we've got our own
ways to set global environment variables, it's very unlikely that
individual makefiles need to set an environment variable for every
single rule.
We expect to eventually add environment variables to the list of inputs
that ninja checks to see if a command needs to run again (currently it
just checks the timestamps and commandline). Reducing the ability for
makefiles to export global variables per-configuration means that we're
more likely to share compile steps between configurations.
Change-Id: I8df0630ef264e39fd077b08dcac57e571ebe214f
|
|
So that marking a variable as deprecated or obsolete does not cause the
variable to be inserted into the used environment table.
|
|
With the introduction of deprecated / obsolete variable support, we
started calling LookupVarInLocalScope on the variable we were setting
with = or :=. This was fine, except it also marked those variables as
used environment variables (whether they were set in the environment or
not). So changing one of these environment variables would cause kati to
regenerate the ninja file even though nothing would change.
To fix this, add new Peek* functions that don't record the variables as
used, but can still be used to check to see if the variable has been
deprecated or is obsolete.
|
|
This won't keep track of everything, but was useful in tracking down
some recursive variables in the android build that shouldn't have been
recursive (they were using 1MB+ of stack).
Change-Id: I5e6b70480cffbebb09dfd72276017559480da948
|
|
Change-Id: I62a87c5d8309b21265e904c0aeb9b3e094c9024a
|
|
When the magic variable .KATI_READONLY is set to a variable name, any
further attempts to modify the named variable will result in an error.
FOO := bar
.KATI_READONLY := FOO
FOO := baz # Error!
This is useful to make some global configuration readonly so that
another makefile cannot change it. In Android, we emulated this by
backing up some global configuration before including the Android.mk
files, then comparing the current values to the backed up values after
they've been included. But this means we don't know the location that
modified the variable, just that something did. And it's not perfect,
since the backup can also be changed.
Something similar to this could be implemented with `override`, but then
setting the variable silently fails, and it still could be overriden
with another override.
|
|
This fixes #51. TODO: add tests for command line variables
|
|
.POSIX pseudo target should change the behavior of $(shell).
This also implements .POSIX for ckati's non-ninja mode.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 tests out of 169 are passing.
|