diff options
| author | Dan Willemsen <dwillemsen@google.com> | 2020-06-26 18:46:21 -0700 |
|---|---|---|
| committer | Dan Willemsen <dwillemsen@google.com> | 2020-06-26 18:52:06 -0700 |
| commit | 979e7ae6e417ae4ee45e835104b66191ae16a14c (patch) | |
| tree | 6b5075e832cbdf2a7996a25a26659363527b6e4c | |
| parent | 003cf51e9b6da48063c90cf4c6710fde103c9c4a (diff) | |
| download | platform_build_kati-979e7ae6e417ae4ee45e835104b66191ae16a14c.tar.gz platform_build_kati-979e7ae6e417ae4ee45e835104b66191ae16a14c.tar.bz2 platform_build_kati-979e7ae6e417ae4ee45e835104b66191ae16a14c.zip | |
Refactor source tree into directories
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.
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | Makefile.ckati | 5 | ||||
| -rw-r--r-- | Makefile.kati | 25 | ||||
| -rw-r--r-- | README.md | 39 | ||||
| -rwxr-xr-x | clang-format-check | 4 | ||||
| -rw-r--r-- | go.mod | 5 | ||||
| -rw-r--r-- | go.sum | 2 | ||||
| -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-x | m2n | 120 | ||||
| -rwxr-xr-x | make-c.sh | 21 | ||||
| -rw-r--r-- | make-c/main.go | 58 | ||||
| -rwxr-xr-x | pack.sh | 29 | ||||
| -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
@@ -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 @@ -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 @@ -0,0 +1,5 @@ +module github.com/google/kati + +go 1.14 + +require github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b @@ -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 @@ -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/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_test.cc b/src/find_test.cc index e8d521c..e8d521c 100644 --- a/find_test.cc +++ b/src/find_test.cc 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/regen_dump.cc b/src/regen_dump.cc index 9916a3f..9916a3f 100644 --- a/regen_dump.cc +++ b/src/regen_dump.cc 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/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/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 |
