aboutsummaryrefslogtreecommitdiff
path: root/fileutil.h
AgeCommit message (Collapse)Author
2020-06-26Refactor source tree into directoriesDan Willemsen
Now instead of almost every file in the top level, move the old go code into its own directory 'golang', and the C++ code into it's own 'src' Also removes a few obsolete scripts that were used to work on Android before Android fully switched to Kati.
2017-10-11`clang-format -i -style=file *.cc *.h`Dan Willemsen
Change-Id: I62a87c5d8309b21265e904c0aeb9b3e094c9024a
2016-10-01Optimize RunCommand by removing /bin/sh wrapper when possibleDan Willemsen
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
2016-04-11Handle EINTR on readShinichiro Hamaji
It seems read(2) for files may be interrupted on Mac when ckati is running under a debugger.
2015-10-15[C++] Regenerate ninja files when symlink was changedShinichiro Hamaji
2015-08-04[C++] Re-generate ninja file when a file is added/removedShinichiro Hamaji
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).
2015-07-31[C++] Regenerate ninja file when $(wildcard) is changedShinichiro Hamaji
2015-07-30[C++] Re-generate build.ninja when ckati is updatedShinichiro Hamaji
2015-07-05[C++] Fix wildcard_cache.mkShinichiro Hamaji
2015-07-05[C++] Fix shell_var.mkShinichiro Hamaji
2015-07-05[C++] Fix exec.cc, so it checks timestamps properlyShinichiro Hamaji
2015-06-23Add Apache license header to recently added filesShinichiro Hamaji
2015-06-18[C++] The first commit for C++ versionShinichiro Hamaji
16 tests out of 169 are passing.