Move Android.bp definitions into subdirs

Test: m blueprint_tools still produces the same tools
Change-Id: Ia1e2e43c62cb6035616bef9fbef56417b46cf3a4
This commit is contained in:
Dan Willemsen 2016-08-15 15:02:23 -07:00
parent 0f4e0d6c5d
commit 377737a01c
7 changed files with 173 additions and 87 deletions

View File

@ -10,32 +10,11 @@
// 2) Build again
//
subdirs = ["third_party/zip"]
bootstrap_go_binary {
name: "soong_build",
deps: [
"blueprint",
"blueprint-bootstrap",
"soong",
"soong-android",
"soong-env",
],
srcs: [
"cmd/soong_build/main.go",
],
primaryBuilder: true,
}
bootstrap_go_binary {
name: "soong_env",
deps: [
"soong-env",
],
srcs: [
"cmd/soong_env/soong_env.go",
],
}
subdirs = [
"androidmk",
"cmd/*",
"third_party/zip",
]
bootstrap_go_package {
name: "soong-env",
@ -46,16 +25,6 @@ bootstrap_go_package {
}
blueprint_go_binary {
name: "soong_glob",
deps: [
"soong-glob",
],
srcs: [
"cmd/soong_glob/soong_glob.go",
],
}
bootstrap_go_package {
name: "soong-glob",
pkgPath: "android/soong/glob",
@ -198,23 +167,6 @@ bootstrap_go_package {
pluginFor: ["soong_build"],
}
blueprint_go_binary {
name: "zip2zip",
deps: ["android-archive-zip"],
srcs: [
"cmd/zip2zip/zip2zip.go",
],
}
blueprint_go_binary {
name: "soong_zip",
deps: ["android-archive-zip"],
srcs: [
"cmd/soong_zip/soong_zip.go",
"cmd/soong_zip/rate_limit.go",
],
}
bootstrap_go_package {
name: "soong-java",
pkgPath: "android/soong/java",
@ -237,40 +189,6 @@ bootstrap_go_package {
pluginFor: ["soong_build"],
}
//
// androidmk Android.mk to Blueprints translator
//
blueprint_go_binary {
name: "androidmk",
srcs: [
"androidmk/cmd/androidmk/android.go",
"androidmk/cmd/androidmk/androidmk.go",
"androidmk/cmd/androidmk/values.go",
],
testSrcs: [
"androidmk/cmd/androidmk/androidmk_test.go",
],
deps: [
"androidmk-parser",
"blueprint-parser",
],
}
bootstrap_go_package {
name: "androidmk-parser",
pkgPath: "android/soong/androidmk/parser",
srcs: [
"androidmk/parser/ast.go",
"androidmk/parser/make_strings.go",
"androidmk/parser/parser.go",
"androidmk/parser/scope.go",
],
testSrcs: [
"androidmk/parser/make_strings_test.go",
],
}
//
// C static libraries extracted from the gcc toolchain
//

48
androidmk/Android.bp Normal file
View File

@ -0,0 +1,48 @@
// 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.
//
// androidmk Android.mk to Blueprints translator
//
blueprint_go_binary {
name: "androidmk",
srcs: [
"cmd/androidmk/android.go",
"cmd/androidmk/androidmk.go",
"cmd/androidmk/values.go",
],
testSrcs: [
"cmd/androidmk/androidmk_test.go",
],
deps: [
"androidmk-parser",
"blueprint-parser",
],
}
bootstrap_go_package {
name: "androidmk-parser",
pkgPath: "android/soong/androidmk/parser",
srcs: [
"parser/ast.go",
"parser/make_strings.go",
"parser/parser.go",
"parser/scope.go",
],
testSrcs: [
"parser/make_strings_test.go",
],
}

View File

@ -0,0 +1,29 @@
// 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.
bootstrap_go_binary {
name: "soong_build",
deps: [
"blueprint",
"blueprint-bootstrap",
"soong",
"soong-android",
"soong-env",
],
srcs: [
"main.go",
],
primaryBuilder: true,
}

24
cmd/soong_env/Android.bp Normal file
View File

@ -0,0 +1,24 @@
// 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.
bootstrap_go_binary {
name: "soong_env",
deps: [
"soong-env",
],
srcs: [
"soong_env.go",
],
}

23
cmd/soong_glob/Android.bp Normal file
View File

@ -0,0 +1,23 @@
// 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.
blueprint_go_binary {
name: "soong_glob",
deps: [
"soong-glob",
],
srcs: [
"soong_glob.go",
],
}

22
cmd/soong_zip/Android.bp Normal file
View File

@ -0,0 +1,22 @@
// Copyright 2016 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.
blueprint_go_binary {
name: "soong_zip",
deps: ["android-archive-zip"],
srcs: [
"soong_zip.go",
"rate_limit.go",
],
}

22
cmd/zip2zip/Android.bp Normal file
View File

@ -0,0 +1,22 @@
// Copyright 2016 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.
blueprint_go_binary {
name: "zip2zip",
deps: ["android-archive-zip"],
srcs: [
"zip2zip.go",
],
}