| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change, we'd only get a warning from FindEmulator, with no
idea which makefile caused it:
FindEmulator: find: `tests': No such file or directory
With this change, we'll get a better idea of which line triggered that
problem:
cts/tests/tests/content/Android.mk:43: FindEmulator: find: `test': No such file or directory
And it will be colorized like any other location-based warning with the
previous patch if --color_warnings is turned on.
|
| |
|
|
|
|
|
|
|
|
| |
This adds new (WARN|KATI_WARN|ERROR)_LOC log macro variants that take a
location as the first argument, and will prefix that location
information to the warning/error lines.
When --color_warnings is enabled, it reformats them to have a standard
warning:/error: infix, and adds colors in order to match the
warnings/errors produced by clang.
|
| |\
| |
| | |
Implement the `file` function to read and write files
|
| | |
| |
| |
| |
| |
| |
| | |
This allows us to do file reading and writing without $(shell). Besides
being simpler, this also allows faster regen times, since we can just
stat the files to be read, or directly write to the files that need to
be written.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For every $(shell echo "test: $PATH") command, when SHELL is /bin/bash,
we essentially run: (each arg wrapped in [])
[/bin/sh] [-c] [/bin/bash -c "echo \"test: \$PATH\""]
This is redundant, since we can just use SHELL, and then we don't need
to do an extra level of shell escaping either. This change makes us run
this instead:
[/bin/bash] [-c] [echo "test: $PATH"]
If SHELL is more complicated than an absolute path to a binary, then
we'll fall back to /bin/sh.
Using the benchmark introduced in the last change, this reduces a
minimal RunCommand execution with a simple SHELL from 3.7ms to 1.3ms.
For a more complex benchmark (though less normalized), for an AOSP
Android build, this change shrinks the average time spent in $(shell)
functions from 4.5ms to 3ms.
Change-Id: I622116e33565e58bb123ee9e9bdd302616a6609c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
echo commands may have side-effects (writing a file), or be testing a
condition and echoing a different value.
date commands may be part of a larger command as well. In any case, if
the command changes, and would cause changes to the ninja file, then we
want to regenerate the ninja file.
Just whitelist `date +%s` for now, since Android uses that as its only
build-time date source, and we don't want to rebuild the ninja file
every time for that. Eventually, it should be removed, but that means
removing all makefile choices on BUILD_NUMBER, since that depends on
BUILD_DATETIME as well. In either case, the real value should never be
inserted into the ninja file.
Change-Id: I3b36c8b46f747c1b22a3faacf1fc34683faa9b70
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Regression when compared to GNU make behaviour.
Test case:
$ cat ../Makefile.comment-in-macro
.PHONY: all
define _rule
# comment
all:
:
endef
$(eval $(_rule))
$ make -f Makefile.comment-in-macro
:
$ ckati --ninja --ninja_dir . --gen_all_targets -f Makefile.comment-in-macro
*** No targets.
Fixes https://github.com/google/kati/issues/74
|
| |
|
|
|
| |
This fixes issue #69. GNU make 3 sorts both for include and
$(wildcard) while GNU make 4 doesn't.
|
| |
|
|
|
| |
.POSIX pseudo target should change the behavior of $(shell).
This also implements .POSIX for ckati's non-ninja mode.
|
| |
|
|
| |
A minor follow-up of 167e1f750dfed276d50ad93ebf0ce0a1f6e6f9ac
|
| |
|
|
|
|
|
|
|
|
|
| |
$(shell ...) command lines are executed using $(SHELL). We need to use
the same shell during regeneration check instead of hard-coding /bin/sh
or otherwise the results might be different when $(SHELL) is redefined
in the makefile.
Fixes https://github.com/google/kati/issues/53
Change-Id: I1f9809106f29f7e806324a82e2323a2f8df64b63
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Regression when compared to GNU make behaviour.
Test case:
$ cat Makefile.call-func-name
func = $(info called with '$(1)')
test = $(call $(1),$(1))
$(call test,func)
$(call test, func)
$(call test,func )
$(call test, func )
$ make -f Makefile.call-func-name
called with 'func'
called with ' func'
called with 'func '
called with ' func '
make: *** No targets. Stop.
$ ckati -c --warn -f Makefile.call-func-name
called with 'func'
Makefile.call-func-name:5: *warning*: undefined user function: func
Makefile.call-func-name:6: *warning*: undefined user function: func
Makefile.call-func-name:5: *warning*: undefined user function: func
*** No targets.
Fixes https://github.com/google/kati/issues/49
Change-Id: I3d982cd8d6d9777034df64540c32846300cb72f2
|
| | |
|
| |
|
|
|
|
| |
It seems this is a fairly good choice even if we compare this
against string-specific algorithms, probably because our
strings are not usually very long.
|
| |
|
|
|
|
|
|
|
|
| |
and use stable_sort on Mac.
On Linux:
LCPMS: 0.627s, sort: 3.37s, stable_sort: 1.79s, qsort: 1.95s
On Mac:
LCPMS: 1.583s, sort: 1.33s, stable_sort: 1.19s, qsort: 1.80s
|
| | |
|
| |
|
|
| |
This reverts commit 42ce87c381f6990db9c7ca525d51ff21c052a98d.
|
| |
|
|
| |
So that the previous change can be merged to AOSP right now.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Android needs to ignore dirty files under out/ when deciding to rebuild,
except for the soong-generated out/Android.mk. Add a --no_ignore_dirty
flag to override the pattern provided in --ignore_dirty.
Change-Id: I8810963f4dff07b51187868c7afedb10c6a4cb2e
|
| |
|
|
|
| |
Stats::Start could be recursively called. Also, measuring
evaluation time of $(wildcard) parameters didn't make sense.
|
| |
|
|
| |
This should fix $(realpath) on Mac.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
So we will be able to use the command line parser for sub-makes.
|
| |
|
|
| |
Change-Id: Ia20a1ef563a6871ed843b9388fe27e87b8bd7020
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Instead, we stop storing results of commands which are
specified by --ignore_dirty
|
| | |
|
| |
|
|
|
|
|
| |
An omitted argument should be blank, even if it's nested inside another
call statement that did have that argument passed.
Android uses missing arguments as defaults in many places.
|
| |\
| |
| | |
[C++] Don't sort find/ls results
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These should only be sorted if explicitly requested, otherwise
make-built binaries may be different from kati-built binaries.
This resolves some binary-diff issues for Android between libc.a built
with make vs kati/ninja. To be the same across multiple
checkouts/machines, we should probably switch android to sorting these
results, but then the kati ninja support will stop working.
|
| |/ |
|
| |
|
|
|
|
|
|
|
| |
With this change, we store the results of file list related
commands in .kati_stamp. If one of them has been changed,
we re-generate ninja file.
Currently, this check is slow. We need to check the timestamp
of directories first like what we are doing for $(wildcard).
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Also add a test case to wildcard_cache.mk
|
| |
|
|
|
|
| |
Functions can take more than 9 arguments. Use StringPrintf to create
the temporary variable names for arguments beyond $9.
|
| |
|
|
| |
./runtest.rb -c -n testcase/shell_arith_in_recipe.mk
|
| | |
|
| | |
|
| | |
|