Merge "Sanity check the tree before building."
am: cba8587bd7
Change-Id: Ifea5e6a26dbe5d3451a5281dd229ab6296659357
This commit is contained in:
commit
67f5fb73f8
|
@ -71,6 +71,17 @@ const (
|
|||
BuildAll = BuildProductConfig | BuildSoong | BuildKati | BuildNinja
|
||||
)
|
||||
|
||||
func checkProblematicFiles(ctx Context) {
|
||||
files := []string{"Android.mk", "CleanSpec.mk"}
|
||||
for _, file := range files {
|
||||
if _, err := os.Stat(file); !os.IsNotExist(err) {
|
||||
absolute := absPath(ctx, file)
|
||||
ctx.Printf("Found %s in tree root. This file needs to be removed to build.\n", file)
|
||||
ctx.Fatalf(" rm %s\n", absolute)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func checkCaseSensitivity(ctx Context, config Config) {
|
||||
outDir := config.OutDir()
|
||||
lowerCase := filepath.Join(outDir, "casecheck.txt")
|
||||
|
@ -131,6 +142,8 @@ func Build(ctx Context, config Config, what int) {
|
|||
buildLock := BecomeSingletonOrFail(ctx, config)
|
||||
defer buildLock.Unlock()
|
||||
|
||||
checkProblematicFiles(ctx)
|
||||
|
||||
SetupOutDir(ctx, config)
|
||||
|
||||
checkCaseSensitivity(ctx, config)
|
||||
|
|
Loading…
Reference in New Issue