2 # Copyright (C) 2007 The Android Open Source Project
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
23 $(info ==== $(1) ====)\
24 $(foreach v,$(_device_var_list),\
25 $(info DEVICES.$(1).$(v) := $(DEVICES.$(1).$(v))))\
30 $(foreach p,$(DEVICES),$(call dump-device,$(p)))
34 # $(1): device to inherit
37 $(foreach v,$(_device_var_list), \
38 $(eval $(v) := $($(v)) $(INHERIT_TAG)$(strip $(1))))
42 # $(1): device makefile list
44 #TODO: check to make sure that devices have all the necessary vars defined
46 $(call import-nodes,DEVICES,$(1),$(_device_var_list))
51 # $(1): short device name like "sooner"
53 define _resolve-short-device-name
54 $(eval dn := $(strip $(1)))
56 $(foreach d,$(DEVICES), \
57 $(if $(filter $(dn),$(DEVICES.$(d).DEVICE_NAME)), \
61 $(eval d := $(sort $(d)))
62 $(if $(filter 1,$(words $(d))), \
64 $(if $(filter 0,$(words $(d))), \
65 $(error No matches for device "$(dn)"), \
66 $(error Device "$(dn)" ambiguous: matches $(d)) \
72 # $(1): short device name like "sooner"
74 define resolve-short-device-name
75 $(strip $(call _resolve-short-device-name,$(1)))