aboutsummaryrefslogtreecommitdiff
path: root/eval.h
AgeCommit message (Collapse)Author
2018-02-27Add KATI_(deprecate|obsolete)_exportDan Willemsen
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
2017-12-27Expand PeekVar to KATI_(deprecated|obsolete)_varDan Willemsen
So that marking a variable as deprecated or obsolete does not cause the variable to be inserted into the used environment table.
2017-11-21Fix list of used environment variablesDan Willemsen
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.
2017-10-13Keep track of stack usage, report line that used the mostDan Willemsen
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
2017-10-11`clang-format -i -style=file *.cc *.h`Dan Willemsen
Change-Id: I62a87c5d8309b21265e904c0aeb9b3e094c9024a
2016-09-29Support marking variables as readonlyDan Willemsen
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.
2016-05-20Support all kinds of command line variablesShinichiro Hamaji
This fixes #51. TODO: add tests for command line variables
2016-04-27[C++] Handle .POSIX at eval timeShinichiro Hamaji
.POSIX pseudo target should change the behavior of $(shell). This also implements .POSIX for ckati's non-ninja mode.
2016-02-22[C++] Associate global variables with Symbols directlyShinichiro Hamaji
2016-02-08[C++] Stop using shared_ptr in evalShinichiro Hamaji
2016-02-08[C++] Remove EvalResult, which is unusedShinichiro Hamaji
2016-02-05[C++] Remove Evaluator::in_vars_Shinichiro Hamaji
2015-11-30[C++] Explicitly disallow $(shell) in other make constructsShinichiro Hamaji
2015-09-24Rename value.* and ast.* to expr.* and stmt.*, respectivelyShinichiro Hamaji
2015-08-14[C++] Remove all shared_ptr<string>Shinichiro Hamaji
2015-07-31[C++] Regenerate ninja when unset environment variable was setShinichiro Hamaji
2015-07-28[C++] Fix info, warning, and error for ninjaShinichiro Hamaji
2015-07-05[C++] Fix wildcard_cache.mkShinichiro Hamaji
2015-07-05[C++] Fix shell_var.mkShinichiro Hamaji
2015-06-29[C++] Introduce SymbolShinichiro Hamaji
2015-06-29[C++] Implement the first version of NinjaGeneratorShinichiro Hamaji
2015-06-26[C++] Implement export and unexportShinichiro Hamaji
2015-06-26[C++] Parse overrideShinichiro Hamaji
2015-06-23[C++] Let target specific variable have its own scopeShinichiro Hamaji
2015-06-23Add Apache license header to recently added filesShinichiro Hamaji
2015-06-23[C++] Implement target specific variablesShinichiro Hamaji
2015-06-22[C++] Fix builtin_rules.mkShinichiro Hamaji
2015-06-22[C++] Implement suffix ruleShinichiro Hamaji
2015-06-19[C++] Implement foreachShinichiro Hamaji
2015-06-18[C++] Implement include directiveShinichiro Hamaji
2015-06-18[C++] Parse include directivesShinichiro Hamaji
2015-06-18[C++] Implement $(warning) and $(error)Shinichiro Hamaji
2015-06-18[C++] The first commit for C++ versionShinichiro Hamaji
16 tests out of 169 are passing.