68 # The '\#' <=> '\ 'dance is needed to keep values with space in them connected. |
68 # The '\#' <=> '\ 'dance is needed to keep values with space in them connected. |
69 USER_MAKE_VARS := $(subst \#,\ , $(filter-out $(addsuffix =%, $(INIT_CONTROL_VARIABLES)), \ |
69 USER_MAKE_VARS := $(subst \#,\ , $(filter-out $(addsuffix =%, $(INIT_CONTROL_VARIABLES)), \ |
70 $(subst \ ,\#,$(MAKEOVERRIDES)))) |
70 $(subst \ ,\#,$(MAKEOVERRIDES)))) |
71 |
71 |
72 # Setup information about available configurations, if any. |
72 # Setup information about available configurations, if any. |
73 ifeq ($(CUSTOM_BUILD_DIR), ) |
73 ifneq ($(CUSTOM_ROOT), ) |
|
74 build_dir=$(CUSTOM_ROOT)/build |
|
75 else |
74 build_dir=$(topdir)/build |
76 build_dir=$(topdir)/build |
75 else |
|
76 build_dir=$(CUSTOM_BUILD_DIR) |
|
77 endif |
77 endif |
78 all_spec_files=$(wildcard $(build_dir)/*/spec.gmk) |
78 all_spec_files=$(wildcard $(build_dir)/*/spec.gmk) |
79 # Extract the configuration names from the path |
79 # Extract the configuration names from the path |
80 all_confs=$(patsubst %/spec.gmk, %, $(patsubst $(build_dir)/%, %, $(all_spec_files))) |
80 all_confs=$(patsubst %/spec.gmk, %, $(patsubst $(build_dir)/%, %, $(all_spec_files))) |
81 |
81 |
225 # For now, unset this SPEC variable. |
225 # For now, unset this SPEC variable. |
226 override SPEC := |
226 override SPEC := |
227 else |
227 else |
228 # Use spec.gmk files in the build output directory |
228 # Use spec.gmk files in the build output directory |
229 ifeq ($$(all_spec_files),) |
229 ifeq ($$(all_spec_files),) |
230 $$(info Error: No configurations found for $$(topdir).) |
230 ifneq ($(CUSTOM_ROOT), ) |
|
231 $$(info Error: No configurations found for $$(CUSTOM_ROOT).) |
|
232 else |
|
233 $$(info Error: No configurations found for $$(topdir).) |
|
234 endif |
231 $$(info Please run 'bash configure' to create a configuration.) |
235 $$(info Please run 'bash configure' to create a configuration.) |
232 $$(info ) |
236 $$(info ) |
233 $$(error Cannot continue) |
237 $$(error Cannot continue) |
234 endif |
238 endif |
235 |
239 |