Remove checkbuild and test from parse time goals
The tests goal is not a parse time goal.
The checkbuild goal is only a parse time goal so that it doesn't result
in a circular dependency between droid and checkbuild when
ANDROID_BUILD_EVERYTHING_BY_DEFAULT is set. Get rid of the circular
dependency by making droid depend on droid_targets, and droid_targets
depend on the targets that are normally built for droid. checkbuild can
then always depend on droid_targets, and droid can condtionally depend
on checkbuild without introducing a circular dependency.
Bug: 24413153
Change-Id: I231d80e05ffe321384a5efbcdf5578f86ad84da0
diff --git a/core/main.mk b/core/main.mk
index f860f54..760a054 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -60,7 +60,10 @@
# This is the default target. It must be the first declared target.
.PHONY: droid
DEFAULT_GOAL := droid
-$(DEFAULT_GOAL):
+$(DEFAULT_GOAL): droid_targets
+
+.PHONY: droid_targets
+droid_targets:
# Used to force goals to build. Only use for conditionally defined goals.
.PHONY: FORCE
@@ -836,12 +839,9 @@
# -------------------------------------------------------------------
.PHONY: checkbuild
-checkbuild: $(modules_to_check)
-ifeq (true,$(ANDROID_BUILD_EVERYTHING_BY_DEFAULT)$(filter $(MAKECMDGOALS),checkbuild))
+checkbuild: $(modules_to_check) droid_targets
+ifeq (true,$(ANDROID_BUILD_EVERYTHING_BY_DEFAULT))
droid: checkbuild
-else
-# ANDROID_BUILD_EVERYTHING_BY_DEFAULT not set, or checkbuild is one of the cmd goals.
-checkbuild: droid
endif
.PHONY: ramdisk
@@ -937,7 +937,7 @@
.PHONY: apps_only
apps_only: $(unbundled_build_modules)
-droid: apps_only
+droid_targets: apps_only
# Combine the NOTICE files for a apps_only build
$(eval $(call combine-notice-files, \
@@ -983,7 +983,7 @@
endif
# Building a full system-- the default is to build droidcore
-droid: droidcore dist_files
+droid_targets: droidcore dist_files
endif # TARGET_BUILD_APPS
diff --git a/core/ninja.mk b/core/ninja.mk
index ee72087..2d0af34 100644
--- a/core/ninja.mk
+++ b/core/ninja.mk
@@ -7,7 +7,6 @@
PARSE_TIME_MAKE_GOALS := \
$(PARSE_TIME_MAKE_GOALS) \
$(dont_bother_goals) \
- tests \
APP-% \
DUMP_% \
ECLIPSE-% \
@@ -16,7 +15,6 @@
btnod \
build-art% \
build_kernel-nodeps \
- checkbuild \
clean-oat% \
continuous_instrumentation_tests \
continuous_native_tests \