aboutsummaryrefslogtreecommitdiffstats
path: root/func.h
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-10-03 00:16:07 -0700
committerDan Willemsen <dwillemsen@google.com>2016-10-03 21:57:39 -0700
commitf06d8019e99ae6aee1d2881f30315aee7b544cfb (patch)
tree220de431495546566c2d01b931173c0d15af3d16 /func.h
parent5e45e973c38c92c42cc86aa5dafeca13e6823b5f (diff)
downloadandroid_build_kati-f06d8019e99ae6aee1d2881f30315aee7b544cfb.tar.gz
android_build_kati-f06d8019e99ae6aee1d2881f30315aee7b544cfb.tar.bz2
android_build_kati-f06d8019e99ae6aee1d2881f30315aee7b544cfb.zip
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.
Diffstat (limited to 'func.h')
-rw-r--r--func.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/func.h b/func.h
index e78deb7..ab6affb 100644
--- a/func.h
+++ b/func.h
@@ -41,7 +41,17 @@ FuncInfo* GetFuncInfo(StringPiece name);
struct FindCommand;
+enum struct CommandOp {
+ SHELL,
+ FIND,
+ READ,
+ READ_MISSING,
+ WRITE,
+ APPEND,
+};
+
struct CommandResult {
+ CommandOp op;
string shell;
string cmd;
unique_ptr<FindCommand> find;