@@ -78,78 +78,18 @@ $(sort $(shell find $(2) -name "$(1)" -type f | $(SED_EXTENDED) "s:($(2)/?(.*)):
78
78
endef
79
79
80
80
# ---------------------------------------------------------------
81
-
82
- # These are the valid values of TARGET_BUILD_VARIANT. Also, if anything else is passed
83
- # as the variant in the PRODUCT-$TARGET_BUILD_PRODUCT-$TARGET_BUILD_VARIANT form,
84
- # it will be treated as a goal, and the eng variant will be used.
85
- INTERNAL_VALID_VARIANTS := user userdebug eng
86
-
87
- # ---------------------------------------------------------------
88
- # Provide "PRODUCT-<prodname>-<goal>" targets, which lets you build
89
- # a particular configuration without needing to set up the environment.
90
- #
81
+ # Check for obsolete PRODUCT- and APP- goals
91
82
ifeq ($(CALLED_FROM_SETUP ) ,true)
92
83
product_goals := $(strip $(filter PRODUCT-% ,$(MAKECMDGOALS ) ) )
93
84
ifdef product_goals
94
- # Scrape the product and build names out of the goal,
95
- # which should be of the form PRODUCT-<productname>-<buildname>.
96
- #
97
- ifneq ($(words $(product_goals)),1)
98
- $(error Only one PRODUCT-* goal may be specified; saw "$(product_goals)")
99
- endif
100
- goal_name := $(product_goals )
101
- product_goals := $(patsubst PRODUCT-% ,% ,$(product_goals ) )
102
- product_goals := $(subst -, ,$(product_goals ) )
103
- ifneq ($(words $(product_goals)),2)
104
- $(error Bad PRODUCT-* goal "$(goal_name)")
105
- endif
106
-
107
- # The product they want
108
- TARGET_PRODUCT := $(word 1,$(product_goals ) )
109
-
110
- # The variant they want
111
- TARGET_BUILD_VARIANT := $(word 2,$(product_goals ) )
112
-
113
- ifeq ($(TARGET_BUILD_VARIANT),tests)
114
- $(error "tests" has been deprecated as a build variant. Use it as a build goal instead.)
115
- endif
116
-
117
- # The build server wants to do make PRODUCT-dream-sdk
118
- # which really means TARGET_PRODUCT=dream make sdk.
119
- ifneq ($(filter-out $(INTERNAL_VALID_VARIANTS),$(TARGET_BUILD_VARIANT)),)
120
- override MAKECMDGOALS := $(MAKECMDGOALS ) $(TARGET_BUILD_VARIANT )
121
- TARGET_BUILD_VARIANT := userdebug
122
- default_goal_substitution :=
123
- else
124
- default_goal_substitution := droid
125
- endif
126
-
127
- # Replace the PRODUCT-* goal with the build goal that it refers to.
128
- # Note that this will ensure that it appears in the same relative
129
- # position, in case it matters.
130
- override MAKECMDGOALS := $(patsubst $(goal_name ) ,$(default_goal_substitution ) ,$(MAKECMDGOALS ) )
85
+ $(error The PRODUCT-* goal is no longer supported. Use `TARGET_PRODUCT=<product> m droid` instead)
131
86
endif
132
- endif # CALLED_FROM_SETUP
133
- # else: Use the value set in the environment or buildspec.mk.
134
-
135
- # ---------------------------------------------------------------
136
- # Provide "APP-<appname>" targets, which lets you build
137
- # an unbundled app.
138
- #
139
- ifeq ($(CALLED_FROM_SETUP ) ,true)
140
87
unbundled_goals := $(strip $(filter APP-% ,$(MAKECMDGOALS ) ) )
141
88
ifdef unbundled_goals
142
89
$(error The APP-* goal is no longer supported. Use `TARGET_BUILD_APPS="<app>" m droid` instead)
143
90
endif # unbundled_goals
144
91
endif
145
92
146
- # Now that we've parsed APP-* and PRODUCT-*, mark these as readonly
147
- TARGET_BUILD_APPS ?=
148
- .KATI_READONLY := \
149
- TARGET_PRODUCT \
150
- TARGET_BUILD_VARIANT \
151
- TARGET_BUILD_APPS
152
-
153
93
# Default to building dalvikvm on hosts that support it...
154
94
ifeq ($(HOST_OS ) ,linux)
155
95
# ... or if the if the option is already set
0 commit comments