aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--Makefile.ckati5
-rw-r--r--Makefile.kati25
-rw-r--r--README.md39
-rwxr-xr-xclang-format-check4
-rw-r--r--go.mod5
-rw-r--r--go.sum2
-rw-r--r--golang/cmd/kati/main.go (renamed from cmd/kati/main.go)2
-rw-r--r--golang/kati/ast.go (renamed from ast.go)0
-rw-r--r--golang/kati/bootstrap.go (renamed from bootstrap.go)0
-rw-r--r--golang/kati/buf.go (renamed from buf.go)0
-rw-r--r--golang/kati/buf_test.go (renamed from buf_test.go)0
-rw-r--r--golang/kati/dep.go (renamed from dep.go)0
-rw-r--r--golang/kati/depgraph.go (renamed from depgraph.go)0
-rw-r--r--golang/kati/doc.go (renamed from doc.go)0
-rw-r--r--golang/kati/eval.go (renamed from eval.go)0
-rw-r--r--golang/kati/evalcmd.go (renamed from evalcmd.go)0
-rw-r--r--golang/kati/exec.go (renamed from exec.go)0
-rw-r--r--golang/kati/expr.go (renamed from expr.go)0
-rw-r--r--golang/kati/expr_test.go (renamed from expr_test.go)0
-rw-r--r--golang/kati/fileutil.go (renamed from fileutil.go)0
-rw-r--r--golang/kati/flags.go (renamed from flags.go)0
-rw-r--r--golang/kati/func.go (renamed from func.go)0
-rw-r--r--golang/kati/func_test.go (renamed from func_test.go)0
-rw-r--r--golang/kati/log.go (renamed from log.go)0
-rw-r--r--golang/kati/ninja.go (renamed from ninja.go)0
-rw-r--r--golang/kati/ninja_test.go (renamed from ninja_test.go)0
-rw-r--r--golang/kati/parser.go (renamed from parser.go)0
-rw-r--r--golang/kati/pathutil.go (renamed from pathutil.go)0
-rw-r--r--golang/kati/pathutil_test.go (renamed from pathutil_test.go)0
-rw-r--r--golang/kati/query.go (renamed from query.go)0
-rw-r--r--golang/kati/rule_parser.go (renamed from rule_parser.go)0
-rw-r--r--golang/kati/rule_parser_test.go (renamed from rule_parser_test.go)0
-rw-r--r--golang/kati/serialize.go (renamed from serialize.go)0
-rw-r--r--golang/kati/shellutil.go (renamed from shellutil.go)0
-rw-r--r--golang/kati/shellutil_test.go (renamed from shellutil_test.go)0
-rw-r--r--golang/kati/stats.go (renamed from stats.go)0
-rw-r--r--golang/kati/strutil.go (renamed from strutil.go)0
-rw-r--r--golang/kati/strutil_test.go (renamed from strutil_test.go)0
-rw-r--r--golang/kati/symtab.go (renamed from symtab.go)0
-rw-r--r--golang/kati/var.go (renamed from var.go)0
-rw-r--r--golang/kati/version.go (renamed from version.go)0
-rw-r--r--golang/kati/worker.go (renamed from worker.go)0
-rwxr-xr-xm2n120
-rwxr-xr-xmake-c.sh21
-rw-r--r--make-c/main.go58
-rwxr-xr-xpack.sh29
-rw-r--r--src/Android.bp (renamed from Android.bp)0
-rw-r--r--src/affinity.cc (renamed from affinity.cc)0
-rw-r--r--src/affinity.h (renamed from affinity.h)0
-rw-r--r--src/command.cc (renamed from command.cc)0
-rw-r--r--src/command.h (renamed from command.h)0
-rw-r--r--src/dep.cc (renamed from dep.cc)0
-rw-r--r--src/dep.h (renamed from dep.h)0
-rw-r--r--src/eval.cc (renamed from eval.cc)0
-rw-r--r--src/eval.h (renamed from eval.h)0
-rw-r--r--src/exec.cc (renamed from exec.cc)0
-rw-r--r--src/exec.h (renamed from exec.h)0
-rw-r--r--src/expr.cc (renamed from expr.cc)0
-rw-r--r--src/expr.h (renamed from expr.h)0
-rw-r--r--src/file.cc (renamed from file.cc)0
-rw-r--r--src/file.h (renamed from file.h)0
-rw-r--r--src/file_cache.cc (renamed from file_cache.cc)0
-rw-r--r--src/file_cache.h (renamed from file_cache.h)0
-rw-r--r--src/fileutil.cc (renamed from fileutil.cc)0
-rw-r--r--src/fileutil.h (renamed from fileutil.h)0
-rw-r--r--src/fileutil_bench.cc (renamed from fileutil_bench.cc)0
-rw-r--r--src/find.cc (renamed from find.cc)0
-rw-r--r--src/find.h (renamed from find.h)0
-rw-r--r--src/find_test.cc (renamed from find_test.cc)0
-rw-r--r--src/flags.cc (renamed from flags.cc)0
-rw-r--r--src/flags.h (renamed from flags.h)0
-rw-r--r--src/func.cc (renamed from func.cc)0
-rw-r--r--src/func.h (renamed from func.h)0
-rw-r--r--src/io.cc (renamed from io.cc)0
-rw-r--r--src/io.h (renamed from io.h)0
-rw-r--r--src/loc.h (renamed from loc.h)0
-rw-r--r--src/log.cc (renamed from log.cc)0
-rw-r--r--src/log.h (renamed from log.h)0
-rw-r--r--src/main.cc (renamed from main.cc)0
-rw-r--r--src/ninja.cc (renamed from ninja.cc)0
-rw-r--r--src/ninja.h (renamed from ninja.h)0
-rw-r--r--src/ninja_test.cc (renamed from ninja_test.cc)0
-rw-r--r--src/parser.cc (renamed from parser.cc)0
-rw-r--r--src/parser.h (renamed from parser.h)0
-rw-r--r--src/regen.cc (renamed from regen.cc)0
-rw-r--r--src/regen.h (renamed from regen.h)0
-rw-r--r--src/regen_dump.cc (renamed from regen_dump.cc)0
-rw-r--r--src/rule.cc (renamed from rule.cc)0
-rw-r--r--src/rule.h (renamed from rule.h)0
-rw-r--r--src/stats.cc (renamed from stats.cc)0
-rw-r--r--src/stats.h (renamed from stats.h)0
-rw-r--r--src/stmt.cc (renamed from stmt.cc)0
-rw-r--r--src/stmt.h (renamed from stmt.h)0
-rw-r--r--src/string_piece.cc (renamed from string_piece.cc)0
-rw-r--r--src/string_piece.h (renamed from string_piece.h)0
-rw-r--r--src/string_piece_test.cc (renamed from string_piece_test.cc)0
-rw-r--r--src/stringprintf.cc (renamed from stringprintf.cc)0
-rw-r--r--src/stringprintf.h (renamed from stringprintf.h)0
-rw-r--r--src/strutil.cc (renamed from strutil.cc)0
-rw-r--r--src/strutil.h (renamed from strutil.h)0
-rw-r--r--src/strutil_bench.cc (renamed from strutil_bench.cc)0
-rw-r--r--src/strutil_test.cc (renamed from strutil_test.cc)0
-rw-r--r--src/symtab.cc (renamed from symtab.cc)0
-rw-r--r--src/symtab.h (renamed from symtab.h)0
-rw-r--r--src/testutil.h (renamed from testutil.h)0
-rw-r--r--src/thread_pool.cc (renamed from thread_pool.cc)0
-rw-r--r--src/thread_pool.h (renamed from thread_pool.h)0
-rw-r--r--src/timeutil.cc (renamed from timeutil.cc)0
-rw-r--r--src/timeutil.h (renamed from timeutil.h)0
-rw-r--r--src/var.cc (renamed from var.cc)0
-rw-r--r--src/var.h (renamed from var.h)0
-rw-r--r--src/version.h (renamed from version.h)0
-rw-r--r--src/version_unknown.cc (renamed from version_unknown.cc)0
114 files changed, 19 insertions, 294 deletions
diff --git a/.gitignore b/.gitignore
index 19d2723..ea52501 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
kati
-!cmd/kati/
+!golang/cmd/kati/
ckati
para
*.o
@@ -16,5 +16,4 @@ ninja_test
string_piece_test
strutil_bench
strutil_test
-go_src_stamp
version.cc
diff --git a/Makefile.ckati b/Makefile.ckati
index 6337590..b0a20b2 100644
--- a/Makefile.ckati
+++ b/Makefile.ckati
@@ -13,12 +13,12 @@
# limitations under the License.
# Find source file location from path to this Makefile
-KATI_SRC_PATH := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
+KATI_SRC_PATH := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))/src
# Set defaults if they weren't set by the including Makefile
KATI_CXX ?= $(CXX)
KATI_LD ?= $(CXX)
-KATI_INTERMEDIATES_PATH ?= .
+KATI_INTERMEDIATES_PATH ?= out
KATI_BIN_PATH ?= .
KATI_CXX_SRCS := \
@@ -127,6 +127,7 @@ ckati_clean:
rm -rf $(KATI_INTERMEDIATES_PATH)/*.d
rm -rf $(KATI_INTERMEDIATES_PATH)/version.cc
rm -rf $(KATI_CXX_TEST_EXES)
+ rm -rf $(KATI_BIN_PATH)/ckati
rm -rf out
.PHONY: ckati_clean
diff --git a/Makefile.kati b/Makefile.kati
index df91cbb..f4f5f4c 100644
--- a/Makefile.kati
+++ b/Makefile.kati
@@ -12,30 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-GO_SRCS:=$(wildcard *.go)
+GO_SRCS:=$(wildcard golang/kati/*.go golang/cmd/*/*.go)
-ifeq (${GOPATH},)
-KATI_GOPATH:=$$(pwd)/out
-else
-KATI_GOPATH:=$$(pwd)/out:$${GOPATH}
-endif
-
-kati: go_src_stamp
- -rm -f out/bin/kati
- GOPATH=${KATI_GOPATH} go install -ldflags "-X github.com/google/kati.gitVersion=$(shell git rev-parse HEAD)" github.com/google/kati/cmd/kati
- cp out/bin/kati $@
-
-go_src_stamp: $(GO_SRCS) $(wildcard cmd/*/*.go)
- -rm -rf out/src out/pkg
- mkdir -p out/src/github.com/google/kati
- cp -a $(GO_SRCS) cmd out/src/github.com/google/kati
- GOPATH=${KATI_GOPATH} go get github.com/google/kati/cmd/kati
- touch $@
+kati: $(GO_SRCS)
+ go build -o $@ -ldflags "-X github.com/google/kati.gitVersion=$(shell git rev-parse HEAD)" github.com/google/kati/golang/cmd/kati
go_test: $(GO_SRCS)
- GOPATH=${KATI_GOPATH} go test *.go
+ go test ./golang/kati
go_clean:
- rm -rf out kati go_src_stamp
+ rm -rf kati
.PHONY: go_clean go_test
diff --git a/README.md b/README.md
index ee8b51f..2766c30 100644
--- a/README.md
+++ b/README.md
@@ -16,42 +16,3 @@ For Android-N+, ckati and ninja is used automatically. There is a prebuilt
checked in under prebuilts/build-tools that is used.
All Android's build commands (m, mmm, mmma, etc.) should just work.
-
-How to use for Android (deprecated -- only for Android M or earlier)
-----------------------
-
-Set up kati:
-
- % cd ~/src
- % git clone https://github.com/google/kati
- % cd kati
- % make
-
-Build Android:
-
- % cd <android-directory>
- % source build/envsetup.sh
- % lunch <your-choice>
- % ~/src/kati/m2n --kati_stats
- % ./ninja.sh
-
-You need ninja in your $PATH.
-
-More usage examples (deprecated way)
--------------------
-
-### "make clean"
-
- % ./ninja.sh -t clean
-
-Note ./ninja.sh passes all parameters to ninja.
-
-### Build a specific target
-
-For example, the following is equivalent to "make cts":
-
- % ./ninja.sh cts
-
-Or, if you know the path you want, you can do:
-
- % ./ninja.sh out/host/linux-x86/bin/adb
diff --git a/clang-format-check b/clang-format-check
index c0a01f2..acbf3ce 100755
--- a/clang-format-check
+++ b/clang-format-check
@@ -4,11 +4,11 @@ if [ -z "$CLANG_FORMAT" ]; then
CLANG_FORMAT="clang-format"
fi
-for f in $(ls *.cc *.h); do
+for f in $(ls src/*.cc src/*.h); do
if ! diff -U 1 <($CLANG_FORMAT $f) $f; then
echo
echo "!!!!!!"
- echo "!! Failed clang-format check, please run 'clang-format -i *.cc *.h'" 1>&2
+ echo "!! Failed clang-format check, please run 'clang-format -i src/*.cc src/*.h'" 1>&2
echo "!!!!!!"
exit 1
fi
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..67c9b11
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,5 @@
+module github.com/google/kati
+
+go 1.14
+
+require github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..e323037
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,2 @@
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
diff --git a/cmd/kati/main.go b/golang/cmd/kati/main.go
index 67c3a97..e27c6c0 100644
--- a/cmd/kati/main.go
+++ b/golang/cmd/kati/main.go
@@ -27,7 +27,7 @@ import (
"time"
"github.com/golang/glog"
- "github.com/google/kati"
+ "github.com/google/kati/golang/kati"
)
const shellDateTimeformat = time.RFC3339
diff --git a/ast.go b/golang/kati/ast.go
index 2b43176..2b43176 100644
--- a/ast.go
+++ b/golang/kati/ast.go
diff --git a/bootstrap.go b/golang/kati/bootstrap.go
index 9ef396a..9ef396a 100644
--- a/bootstrap.go
+++ b/golang/kati/bootstrap.go
diff --git a/buf.go b/golang/kati/buf.go
index 737e7c9..737e7c9 100644
--- a/buf.go
+++ b/golang/kati/buf.go
diff --git a/buf_test.go b/golang/kati/buf_test.go
index 8ee14a0..8ee14a0 100644
--- a/buf_test.go
+++ b/golang/kati/buf_test.go
diff --git a/dep.go b/golang/kati/dep.go
index 2c9870d..2c9870d 100644
--- a/dep.go
+++ b/golang/kati/dep.go
diff --git a/depgraph.go b/golang/kati/depgraph.go
index 5b32287..5b32287 100644
--- a/depgraph.go
+++ b/golang/kati/depgraph.go
diff --git a/doc.go b/golang/kati/doc.go
index 488675e..488675e 100644
--- a/doc.go
+++ b/golang/kati/doc.go
diff --git a/eval.go b/golang/kati/eval.go
index 30308c3..30308c3 100644
--- a/eval.go
+++ b/golang/kati/eval.go
diff --git a/evalcmd.go b/golang/kati/evalcmd.go
index 37f94b8..37f94b8 100644
--- a/evalcmd.go
+++ b/golang/kati/evalcmd.go
diff --git a/exec.go b/golang/kati/exec.go
index fbcf41e..fbcf41e 100644
--- a/exec.go
+++ b/golang/kati/exec.go
diff --git a/expr.go b/golang/kati/expr.go
index 79978b6..79978b6 100644
--- a/expr.go
+++ b/golang/kati/expr.go
diff --git a/expr_test.go b/golang/kati/expr_test.go
index ad51a89..ad51a89 100644
--- a/expr_test.go
+++ b/golang/kati/expr_test.go
diff --git a/fileutil.go b/golang/kati/fileutil.go
index feef812..feef812 100644
--- a/fileutil.go
+++ b/golang/kati/fileutil.go
diff --git a/flags.go b/golang/kati/flags.go
index f2353a2..f2353a2 100644
--- a/flags.go
+++ b/golang/kati/flags.go
diff --git a/func.go b/golang/kati/func.go
index bdc560d..bdc560d 100644
--- a/func.go
+++ b/golang/kati/func.go
diff --git a/func_test.go b/golang/kati/func_test.go
index b56291e..b56291e 100644
--- a/func_test.go
+++ b/golang/kati/func_test.go
diff --git a/log.go b/golang/kati/log.go
index 4b3098f..4b3098f 100644
--- a/log.go
+++ b/golang/kati/log.go
diff --git a/ninja.go b/golang/kati/ninja.go
index f90ff24..f90ff24 100644
--- a/ninja.go
+++ b/golang/kati/ninja.go
diff --git a/ninja_test.go b/golang/kati/ninja_test.go
index 48a52f6..48a52f6 100644
--- a/ninja_test.go
+++ b/golang/kati/ninja_test.go
diff --git a/parser.go b/golang/kati/parser.go
index aef20e2..aef20e2 100644
--- a/parser.go
+++ b/golang/kati/parser.go
diff --git a/pathutil.go b/golang/kati/pathutil.go
index ad11c22..ad11c22 100644
--- a/pathutil.go
+++ b/golang/kati/pathutil.go
diff --git a/pathutil_test.go b/golang/kati/pathutil_test.go
index 33b7e32..33b7e32 100644
--- a/pathutil_test.go
+++ b/golang/kati/pathutil_test.go
diff --git a/query.go b/golang/kati/query.go
index 5da1f61..5da1f61 100644
--- a/query.go
+++ b/golang/kati/query.go
diff --git a/rule_parser.go b/golang/kati/rule_parser.go
index 1bea505..1bea505 100644
--- a/rule_parser.go
+++ b/golang/kati/rule_parser.go
diff --git a/rule_parser_test.go b/golang/kati/rule_parser_test.go
index be12041..be12041 100644
--- a/rule_parser_test.go
+++ b/golang/kati/rule_parser_test.go
diff --git a/serialize.go b/golang/kati/serialize.go
index 3ccb469..3ccb469 100644
--- a/serialize.go
+++ b/golang/kati/serialize.go
diff --git a/shellutil.go b/golang/kati/shellutil.go
index b7a16ac..b7a16ac 100644
--- a/shellutil.go
+++ b/golang/kati/shellutil.go
diff --git a/shellutil_test.go b/golang/kati/shellutil_test.go
index 39c2c64..39c2c64 100644
--- a/shellutil_test.go
+++ b/golang/kati/shellutil_test.go
diff --git a/stats.go b/golang/kati/stats.go
index a8ea461..a8ea461 100644
--- a/stats.go
+++ b/golang/kati/stats.go
diff --git a/strutil.go b/golang/kati/strutil.go
index 39d282b..39d282b 100644
--- a/strutil.go
+++ b/golang/kati/strutil.go
diff --git a/strutil_test.go b/golang/kati/strutil_test.go
index 56bfe87..56bfe87 100644
--- a/strutil_test.go
+++ b/golang/kati/strutil_test.go
diff --git a/symtab.go b/golang/kati/symtab.go
index f8fc1f8..f8fc1f8 100644
--- a/symtab.go
+++ b/golang/kati/symtab.go
diff --git a/var.go b/golang/kati/var.go
index 5e7e996..5e7e996 100644
--- a/var.go
+++ b/golang/kati/var.go
diff --git a/version.go b/golang/kati/version.go
index 4ec6e6a..4ec6e6a 100644
--- a/version.go
+++ b/golang/kati/version.go
diff --git a/worker.go b/golang/kati/worker.go
index a339d23..a339d23 100644
--- a/worker.go
+++ b/golang/kati/worker.go
diff --git a/m2n b/m2n
deleted file mode 100755
index 3fd6661..0000000
--- a/m2n
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2015 Google Inc. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# A wrapper for kati which generates build.ninja mainly for Android.
-#
-
-set -e
-
-kati_dir=$(cd $(dirname $0) && pwd)
-extra_flags=
-goma_flag=
-goma_dir=${GOMA_DIR:-$HOME/goma}
-
-while [ x"$1" != x"" ]; do
- case "$1" in
- --help)
- cat - <<EOF
-Usage:
- m2n # for default full-build
- m2n --goma # use goma. \$HOME/goma must exist, or set \$GOMA_DIR
- m2n --go # use go version. Slower but maybe more portable.
- m2n cts # for target 'cts'
-EOF
- exit 1
- ;;
-
- --go)
- kati=${kati_dir}/kati
- shift
- ${kati} --m2n "$@"
- echo
- echo ninja.sh and build.ninja were generated, please run ./ninja.sh
- exit
- ;;
-
- --goma)
- if [ ! -e $goma_dir/goma_ctl.py ]; then
- echo "To use Goma you must set GOMA_DIR, or install goma in $HOME/goma"
- exit 1
- fi
- $goma_dir/goma_ctl.py ensure_start
- goma_flag=--goma_dir=$goma_dir
- shift
- ;;
-
- --mmm)
- echo 'Note: --mmm may not work'
- shift;
- mmm="$1"
- shift
- ;;
-
- -*)
- extra_flags+=" $1"
- shift
- ;;
-
- *)
- targets="${targets} $1"
- shift
- ;;
- esac
-done
-
-if [ x"${goma_flag}" != x ]; then
- for k in CC_WRAPPER CXX_WRAPPER JAVAC_WRAPPER; do
- val=$(eval echo \$$k)
- if [ x"${val}" != x ]; then
- echo "Note: \$$k=${val} may confuse m2n --goma, unsetting"
- unset $k
- fi
- done
-fi
-
-kati=${kati_dir}/ckati
-
-ninja_suffix=
-ninja_suffix_flag=
-
-if [ x"${mmm}" != x"" ]; then
- mk="${mmm}/Android.mk"
- if [ ! -f ${mk} ]; then
- echo "${mk} does not exist"
- exit 1
- fi
-
- export ONE_SHOT_MAKEFILE=${mk}
- echo ONE_SHOT_MAKEFILE=${ONE_SHOT_MAKEFILE}
-
- ninja_suffix+=-mmm-${mmm}
-fi
-
-if [ x"${targets}" != x"" ]; then
- ninja_suffix+=-$(echo ${targets} | sed 's/ /-/')
-elif [ x"${mmm}" != x"" ]; then
- targets=all_modules
-fi
-
-if [ x"${ninja_suffix}" != x"" ]; then
- ninja_suffix=$(echo ${ninja_suffix} | sed 'y/\//_/')
- ninja_suffix_flag=--ninja_suffix=${ninja_suffix}
-fi
-
-${kati} --ninja ${ninja_suffix_flag} --ignore_optional_include=out/%.P --ignore_dirty=out/% --use_find_emulator --detect_android_echo --detect_depfiles --gen_all_targets ${goma_flag} ${extra_flags} ${targets}
-
-echo
-echo ninja${ninja_suffix}.sh and build${ninja_suffix}.ninja were generated, please run ./ninja${ninja_suffix}.sh
diff --git a/make-c.sh b/make-c.sh
deleted file mode 100755
index d17b9a8..0000000
--- a/make-c.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-# Copyright 2015 Google Inc. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# simple tool to measure time to parse Makefiles in android.
-#
-# usage:
-# $ ./repo/android.sh make-c.sh
-dir=$(cd $(dirname $0); pwd)
-go run ${dir}/make-c/main.go
diff --git a/make-c/main.go b/make-c/main.go
deleted file mode 100644
index 9c18c1d..0000000
--- a/make-c/main.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2015 Google Inc. All rights reserved
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// make-c is simple program to measure time to parse Makefiles in android.
-package main
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "os/exec"
- "time"
-)
-
-func main() {
- parseDone := make(chan bool)
- cmd := exec.Command("make", "-n")
- r, err := cmd.StdoutPipe()
- if err != nil {
- panic(err)
- }
- t := time.Now()
- go func() {
- s := bufio.NewScanner(r)
- for s.Scan() {
- if bytes.HasPrefix(s.Bytes(), []byte("echo ")) {
- parseDone <- true
- return
- }
- fmt.Println(s.Text())
- }
- if err := s.Err(); err != nil {
- panic(err)
- }
- panic("unexpected end of make?")
- }()
- err = cmd.Start()
- if err != nil {
- panic(err)
- }
- select {
- case <-parseDone:
- fmt.Printf("make -c: %v\n", time.Since(t))
- }
- cmd.Process.Kill()
- cmd.Wait()
-}
diff --git a/pack.sh b/pack.sh
deleted file mode 100755
index 1e73d6a..0000000
--- a/pack.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-#
-# Copyright 2015 Google Inc. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set -e
-
-make kati ckati
-
-rm -fr out/kati
-mkdir out/kati
-git archive --prefix src/ master | tar -C out/kati -xvf -
-
-cd out/kati
-rm src/repo/android.tgz
-cp ../../m2n ../../kati ../../ckati .
-cd ..
-tar -cvzf ../kati.tgz kati
diff --git a/Android.bp b/src/Android.bp
index ebbef98..ebbef98 100644
--- a/Android.bp
+++ b/src/Android.bp
diff --git a/affinity.cc b/src/affinity.cc
index 9e855f3..9e855f3 100644
--- a/affinity.cc
+++ b/src/affinity.cc
diff --git a/affinity.h b/src/affinity.h
index e6f6adc..e6f6adc 100644
--- a/affinity.h
+++ b/src/affinity.h
diff --git a/command.cc b/src/command.cc
index 04bb168..04bb168 100644
--- a/command.cc
+++ b/src/command.cc
diff --git a/command.h b/src/command.h
index 5e86333..5e86333 100644
--- a/command.h
+++ b/src/command.h
diff --git a/dep.cc b/src/dep.cc
index 3289d7a..3289d7a 100644
--- a/dep.cc
+++ b/src/dep.cc
diff --git a/dep.h b/src/dep.h
index 3ab52ac..3ab52ac 100644
--- a/dep.h
+++ b/src/dep.h
diff --git a/eval.cc b/src/eval.cc
index 3772763..3772763 100644
--- a/eval.cc
+++ b/src/eval.cc
diff --git a/eval.h b/src/eval.h
index e8a95ed..e8a95ed 100644
--- a/eval.h
+++ b/src/eval.h
diff --git a/exec.cc b/src/exec.cc
index 75f5358..75f5358 100644
--- a/exec.cc
+++ b/src/exec.cc
diff --git a/exec.h b/src/exec.h
index 34fda96..34fda96 100644
--- a/exec.h
+++ b/src/exec.h
diff --git a/expr.cc b/src/expr.cc
index e0f5be1..e0f5be1 100644
--- a/expr.cc
+++ b/src/expr.cc
diff --git a/expr.h b/src/expr.h
index 2fe9527..2fe9527 100644
--- a/expr.h
+++ b/src/expr.h
diff --git a/file.cc b/src/file.cc
index 9ef6708..9ef6708 100644
--- a/file.cc
+++ b/src/file.cc
diff --git a/file.h b/src/file.h
index 6af6696..6af6696 100644
--- a/file.h
+++ b/src/file.h
diff --git a/file_cache.cc b/src/file_cache.cc
index fe16c3b..fe16c3b 100644
--- a/file_cache.cc
+++ b/src/file_cache.cc
diff --git a/file_cache.h b/src/file_cache.h
index fac2077..fac2077 100644
--- a/file_cache.h
+++ b/src/file_cache.h
diff --git a/fileutil.cc b/src/fileutil.cc
index 7ebb8ec..7ebb8ec 100644
--- a/fileutil.cc
+++ b/src/fileutil.cc
diff --git a/fileutil.h b/src/fileutil.h
index ba5b9b6..ba5b9b6 100644
--- a/fileutil.h
+++ b/src/fileutil.h
diff --git a/fileutil_bench.cc b/src/fileutil_bench.cc
index 429d004..429d004 100644
--- a/fileutil_bench.cc
+++ b/src/fileutil_bench.cc
diff --git a/find.cc b/src/find.cc
index b693449..b693449 100644
--- a/find.cc
+++ b/src/find.cc
diff --git a/find.h b/src/find.h
index 2a1abe4..2a1abe4 100644
--- a/find.h
+++ b/src/find.h
diff --git a/find_test.cc b/src/find_test.cc
index e8d521c..e8d521c 100644
--- a/find_test.cc
+++ b/src/find_test.cc
diff --git a/flags.cc b/src/flags.cc
index 329e0fd..329e0fd 100644
--- a/flags.cc
+++ b/src/flags.cc
diff --git a/flags.h b/src/flags.h
index 066fb38..066fb38 100644
--- a/flags.h
+++ b/src/flags.h
diff --git a/func.cc b/src/func.cc
index b0837da..b0837da 100644
--- a/func.cc
+++ b/src/func.cc
diff --git a/func.h b/src/func.h
index 72f90fd..72f90fd 100644
--- a/func.h
+++ b/src/func.h
diff --git a/io.cc b/src/io.cc
index 9ae1c5e..9ae1c5e 100644
--- a/io.cc
+++ b/src/io.cc
diff --git a/io.h b/src/io.h
index 28316f4..28316f4 100644
--- a/io.h
+++ b/src/io.h
diff --git a/loc.h b/src/loc.h
index 8c9ed9f..8c9ed9f 100644
--- a/loc.h
+++ b/src/loc.h
diff --git a/log.cc b/src/log.cc
index 62f2422..62f2422 100644
--- a/log.cc
+++ b/src/log.cc
diff --git a/log.h b/src/log.h
index ba0bd8b..ba0bd8b 100644
--- a/log.h
+++ b/src/log.h
diff --git a/main.cc b/src/main.cc
index f2360cf..f2360cf 100644
--- a/main.cc
+++ b/src/main.cc
diff --git a/ninja.cc b/src/ninja.cc
index 9b6989b..9b6989b 100644
--- a/ninja.cc
+++ b/src/ninja.cc
diff --git a/ninja.h b/src/ninja.h
index 35053c0..35053c0 100644
--- a/ninja.h
+++ b/src/ninja.h
diff --git a/ninja_test.cc b/src/ninja_test.cc
index 15b0693..15b0693 100644
--- a/ninja_test.cc
+++ b/src/ninja_test.cc
diff --git a/parser.cc b/src/parser.cc
index 4980f77..4980f77 100644
--- a/parser.cc
+++ b/src/parser.cc
diff --git a/parser.h b/src/parser.h
index e4cf7c2..e4cf7c2 100644
--- a/parser.h
+++ b/src/parser.h
diff --git a/regen.cc b/src/regen.cc
index 1cb94e0..1cb94e0 100644
--- a/regen.cc
+++ b/src/regen.cc
diff --git a/regen.h b/src/regen.h
index 3d43d70..3d43d70 100644
--- a/regen.h
+++ b/src/regen.h
diff --git a/regen_dump.cc b/src/regen_dump.cc
index 9916a3f..9916a3f 100644
--- a/regen_dump.cc
+++ b/src/regen_dump.cc
diff --git a/rule.cc b/src/rule.cc
index 867a7e3..867a7e3 100644
--- a/rule.cc
+++ b/src/rule.cc
diff --git a/rule.h b/src/rule.h
index 237eb02..237eb02 100644
--- a/rule.h
+++ b/src/rule.h
diff --git a/stats.cc b/src/stats.cc
index be03774..be03774 100644
--- a/stats.cc
+++ b/src/stats.cc
diff --git a/stats.h b/src/stats.h
index 4501353..4501353 100644
--- a/stats.h
+++ b/src/stats.h
diff --git a/stmt.cc b/src/stmt.cc
index 8ec04c8..8ec04c8 100644
--- a/stmt.cc
+++ b/src/stmt.cc
diff --git a/stmt.h b/src/stmt.h
index d7fd067..d7fd067 100644
--- a/stmt.h
+++ b/src/stmt.h
diff --git a/string_piece.cc b/src/string_piece.cc
index 32a7be0..32a7be0 100644
--- a/string_piece.cc
+++ b/src/string_piece.cc
diff --git a/string_piece.h b/src/string_piece.h
index df3562f..df3562f 100644
--- a/string_piece.h
+++ b/src/string_piece.h
diff --git a/string_piece_test.cc b/src/string_piece_test.cc
index 0434cbe..0434cbe 100644
--- a/string_piece_test.cc
+++ b/src/string_piece_test.cc
diff --git a/stringprintf.cc b/src/stringprintf.cc
index b0d4b4a..b0d4b4a 100644
--- a/stringprintf.cc
+++ b/src/stringprintf.cc
diff --git a/stringprintf.h b/src/stringprintf.h
index 8b67e6c..8b67e6c 100644
--- a/stringprintf.h
+++ b/src/stringprintf.h
diff --git a/strutil.cc b/src/strutil.cc
index 797775f..797775f 100644
--- a/strutil.cc
+++ b/src/strutil.cc
diff --git a/strutil.h b/src/strutil.h
index cc4d519..cc4d519 100644
--- a/strutil.h
+++ b/src/strutil.h
diff --git a/strutil_bench.cc b/src/strutil_bench.cc
index d3b2e6c..d3b2e6c 100644
--- a/strutil_bench.cc
+++ b/src/strutil_bench.cc
diff --git a/strutil_test.cc b/src/strutil_test.cc
index d0db1f3..d0db1f3 100644
--- a/strutil_test.cc
+++ b/src/strutil_test.cc
diff --git a/symtab.cc b/src/symtab.cc
index 3d49f2e..3d49f2e 100644
--- a/symtab.cc
+++ b/src/symtab.cc
diff --git a/symtab.h b/src/symtab.h
index 455d967..455d967 100644
--- a/symtab.h
+++ b/src/symtab.h
diff --git a/testutil.h b/src/testutil.h
index be6125c..be6125c 100644
--- a/testutil.h
+++ b/src/testutil.h
diff --git a/thread_pool.cc b/src/thread_pool.cc
index 4acf7b9..4acf7b9 100644
--- a/thread_pool.cc
+++ b/src/thread_pool.cc
diff --git a/thread_pool.h b/src/thread_pool.h
index 0384ce8..0384ce8 100644
--- a/thread_pool.h
+++ b/src/thread_pool.h
diff --git a/timeutil.cc b/src/timeutil.cc
index 0b43bf4..0b43bf4 100644
--- a/timeutil.cc
+++ b/src/timeutil.cc
diff --git a/timeutil.h b/src/timeutil.h
index bff78b9..bff78b9 100644
--- a/timeutil.h
+++ b/src/timeutil.h
diff --git a/var.cc b/src/var.cc
index 10b903b..10b903b 100644
--- a/var.cc
+++ b/src/var.cc
diff --git a/var.h b/src/var.h
index cf6dd2d..cf6dd2d 100644
--- a/var.h
+++ b/src/var.h
diff --git a/version.h b/src/version.h
index 4235985..4235985 100644
--- a/version.h
+++ b/src/version.h
diff --git a/version_unknown.cc b/src/version_unknown.cc
index 4ce90f5..4ce90f5 100644
--- a/version_unknown.cc
+++ b/src/version_unknown.cc