Rename common to android
Rename the "common" package to "android", because common is too
generic. Also removes all android.Android naming stutter.
Ran:
gomvpkg -from 'android/soong/common' -to 'android/soong/android'
gorename -from '"android/soong/android".AndroidModuleContext' -to 'ModuleContext'
gorename -from '"android/soong/android".AndroidBaseContext' -to 'BaseContext'
gorename -from '"android/soong/android".AndroidModuleBase' -to 'ModuleBase'
gorename -from '"android/soong/android".AndroidBottomUpMutatorContext' -to 'BottomUpMutatorContext'
gorename -from '"android/soong/android".AndroidTopDownMutatorContext' -to 'TopDownMutatorContext'
gorename -from '"android/soong/android".AndroidModule' -to 'Module'
Change-Id: I3b23590b8ce7c8a1ea1139411d84a53163288da7
diff --git a/cc/gen.go b/cc/gen.go
index 94e2304..efcc478 100644
--- a/cc/gen.go
+++ b/cc/gen.go
@@ -21,7 +21,7 @@
import (
"github.com/google/blueprint"
- "android/soong/common"
+ "android/soong/android"
)
func init() {
@@ -47,12 +47,12 @@
})
)
-func genYacc(ctx common.AndroidModuleContext, yaccFile common.Path, outFile common.ModuleGenPath, yaccFlags string) (headerFile common.ModuleGenPath) {
- headerFile = common.GenPathWithExt(ctx, yaccFile, "h")
+func genYacc(ctx android.ModuleContext, yaccFile android.Path, outFile android.ModuleGenPath, yaccFlags string) (headerFile android.ModuleGenPath) {
+ headerFile = android.GenPathWithExt(ctx, yaccFile, "h")
- ctx.ModuleBuild(pctx, common.ModuleBuildParams{
+ ctx.ModuleBuild(pctx, android.ModuleBuildParams{
Rule: yacc,
- Outputs: common.WritablePaths{outFile, headerFile},
+ Outputs: android.WritablePaths{outFile, headerFile},
Input: yaccFile,
Args: map[string]string{
"yaccFlags": yaccFlags,
@@ -64,35 +64,35 @@
return headerFile
}
-func genLex(ctx common.AndroidModuleContext, lexFile common.Path, outFile common.ModuleGenPath) {
- ctx.ModuleBuild(pctx, common.ModuleBuildParams{
+func genLex(ctx android.ModuleContext, lexFile android.Path, outFile android.ModuleGenPath) {
+ ctx.ModuleBuild(pctx, android.ModuleBuildParams{
Rule: lex,
Output: outFile,
Input: lexFile,
})
}
-func genSources(ctx common.AndroidModuleContext, srcFiles common.Paths,
- buildFlags builderFlags) (common.Paths, common.Paths) {
+func genSources(ctx android.ModuleContext, srcFiles android.Paths,
+ buildFlags builderFlags) (android.Paths, android.Paths) {
- var deps common.Paths
+ var deps android.Paths
for i, srcFile := range srcFiles {
switch srcFile.Ext() {
case ".y":
- cFile := common.GenPathWithExt(ctx, srcFile, "c")
+ cFile := android.GenPathWithExt(ctx, srcFile, "c")
srcFiles[i] = cFile
deps = append(deps, genYacc(ctx, srcFile, cFile, buildFlags.yaccFlags))
case ".yy":
- cppFile := common.GenPathWithExt(ctx, srcFile, "cpp")
+ cppFile := android.GenPathWithExt(ctx, srcFile, "cpp")
srcFiles[i] = cppFile
deps = append(deps, genYacc(ctx, srcFile, cppFile, buildFlags.yaccFlags))
case ".l":
- cFile := common.GenPathWithExt(ctx, srcFile, "c")
+ cFile := android.GenPathWithExt(ctx, srcFile, "c")
srcFiles[i] = cFile
genLex(ctx, srcFile, cFile)
case ".ll":
- cppFile := common.GenPathWithExt(ctx, srcFile, "cpp")
+ cppFile := android.GenPathWithExt(ctx, srcFile, "cpp")
srcFiles[i] = cppFile
genLex(ctx, srcFile, cppFile)
}