summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-04-23 06:33:36 (GMT)
committerAlexey Neyman <stilor@att.net>2017-04-23 06:33:36 (GMT)
commitc9dad337289153ee70d4ed264cf628f22f6ec2bb (patch)
tree4aed6b45c9b955047f16cc754a8588af840aca11
parent105e4b59b7989e9898795273e4064791fdfa056c (diff)
Use config from the install location
... no need to create a local symlink. Signed-off-by: Alexey Neyman <stilor@att.net>
-rw-r--r--config/config.mk27
-rw-r--r--ct-ng.in1
-rw-r--r--kconfig/kconfig.mk15
-rw-r--r--samples/samples.mk14
-rw-r--r--scripts/saveSample.sh.in2
5 files changed, 16 insertions, 43 deletions
diff --git a/config/config.mk b/config/config.mk
deleted file mode 100644
index e0ca3d2..0000000
--- a/config/config.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-#-----------------------------------------------------------
-# List all config files
-
-# The top-level config file to be used be configurators
-# We need it to savedefconfig in scripts/saveSample.sh
-export KCONFIG_TOP = config/config.in
-
-# Build the list of all source config files
-STATIC_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(shell find $(CT_LIB_DIR)/config -type f \( -name '*.in' -o -name '*.in.2' \) 2>/dev/null))
-# ... and how to access them:
-$(STATIC_CONFIG_FILES): config
-
-# Helper entry for the configurators
-PHONY += config_files
-config_files: $(STATIC_CONFIG_FILES) $(GEN_CONFIG_FILES)
-
-# Where to access to the source config files from
-config:
- @$(CT_ECHO) " LN config"
- $(SILENT)ln -s $(CT_LIB_DIR)/config config
-
-#-----------------------------------------------------------
-# Cleaning up the mess...
-
-clean::
- @$(CT_ECHO) " CLEAN config"
- $(SILENT)rm -f config 2>/dev/null || true
diff --git a/ct-ng.in b/ct-ng.in
index 1204908..09ba89c 100644
--- a/ct-ng.in
+++ b/ct-ng.in
@@ -111,7 +111,6 @@ help-clean::
@echo ' clean - Remove generated files'
@echo ' distclean - Remove generated files, configuration and build directories'
-include $(CT_LIB_DIR)/config/config.mk
include $(CT_LIB_DIR)/kconfig/kconfig.mk
include $(CT_LIB_DIR)/steps.mk
include $(CT_LIB_DIR)/samples/samples.mk
diff --git a/kconfig/kconfig.mk b/kconfig/kconfig.mk
index 3d330b4..955ae0b 100644
--- a/kconfig/kconfig.mk
+++ b/kconfig/kconfig.mk
@@ -5,10 +5,8 @@
#-----------------------------------------------------------
# The configurators rules
-configurators = menuconfig nconfig oldconfig savedefconfig defconfig
-PHONY += $(configurators)
-
-$(configurators): config_files
+# Top file of crosstool-NG configuration
+export KCONFIG_TOP = $(CT_LIB_DIR)/config/config.in
export CT_IS_A_BACKEND:=$(CT_IS_A_BACKEND)
export CT_BACKEND_ARCH:=$(CT_BACKEND_ARCH)
@@ -20,16 +18,19 @@ export CONF := $(CT_LIB_DIR)/kconfig/conf
MCONF := $(CT_LIB_DIR)/kconfig/mconf
NCONF := $(CT_LIB_DIR)/kconfig/nconf
+# Used by conf/mconf/nconf to find the .in files
+export srctree=$(CT_LIB_DIR)
+
menuconfig:
- @$(CT_ECHO) " CONF $(KCONFIG_TOP)"
+ @$(CT_ECHO) " CONF $@"
$(SILENT)$(MCONF) $(KCONFIG_TOP)
nconfig:
- @$(CT_ECHO) " CONF $(KCONFIG_TOP)"
+ @$(CT_ECHO) " CONF $@"
$(SILENT)$(NCONF) $(KCONFIG_TOP)
oldconfig: .config
- @$(CT_ECHO) " CONF $(KCONFIG_TOP)"
+ @$(CT_ECHO) " CONF $@"
$(SILENT)$(CONF) --silent$@ $(KCONFIG_TOP)
savedefconfig: .config
diff --git a/samples/samples.mk b/samples/samples.mk
index 5c8f130..ce7e7c9 100644
--- a/samples/samples.mk
+++ b/samples/samples.mk
@@ -48,7 +48,7 @@ show-config: .config
# Prints the details of a sample
PHONY += $(patsubst %,show-%,$(CT_SAMPLES))
-$(patsubst %,show-%,$(CT_SAMPLES)): show-%: config_files
+$(patsubst %,show-%,$(CT_SAMPLES)): show-%:
@KCONFIG_CONFIG=$$(pwd)/.config.sample \
$(CONF) --defconfig=$(call sample_dir,$*)/crosstool.config \
$(KCONFIG_TOP) >/dev/null
@@ -72,7 +72,7 @@ list-samples-pre: FORCE
@echo 'Status Sample name'
PHONY += $(patsubst %,list-%,$(CT_SAMPLES))
-$(patsubst %,list-%,$(CT_SAMPLES)): list-%: config_files
+$(patsubst %,list-%,$(CT_SAMPLES)): list-%:
@KCONFIG_CONFIG=$$(pwd)/.config.sample \
$(CONF) --defconfig=$(call sample_dir,$*)/crosstool.config \
$(KCONFIG_TOP) >/dev/null
@@ -87,7 +87,7 @@ list-samples-short: FORCE
# Check one sample
PHONY += $(patsubst %,check-%,$(CT_SAMPLES))
-$(patsubst %,check-%,$(CT_SAMPLES)): check-%: config_files
+$(patsubst %,check-%,$(CT_SAMPLES)): check-%:
@export KCONFIG_CONFIG=$$(pwd)/.config.sample; \
CT_NG_SAMPLE=$(call sample_dir,$*)/crosstool.config; \
$(CONF) -s --defconfig=$${CT_NG_SAMPLE} $(KCONFIG_TOP) &>/dev/null; \
@@ -119,7 +119,7 @@ wiki-samples-pre: FORCE
wiki-samples-post: FORCE
$(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -W $(CT_SAMPLES)
-$(patsubst %,wiki-%,$(CT_SAMPLES)): wiki-%: config_files
+$(patsubst %,wiki-%,$(CT_SAMPLES)): wiki-%:
$(SILENT)KCONFIG_CONFIG=$$(pwd)/.config.sample \
$(CONF) --defconfig=$(call sample_dir,$*)/crosstool.config \
$(KCONFIG_TOP) >/dev/null
@@ -146,8 +146,8 @@ endef
# How we do recall one sample
PHONY += $(CT_SAMPLES)
-$(CT_SAMPLES): config_files
- @$(CT_ECHO) " CONF $(KCONFIG_TOP)"
+$(CT_SAMPLES):
+ @$(CT_ECHO) " CONF $@"
$(SILENT)$(CONF) --defconfig=$(call sample_dir,$@)/crosstool.config $(KCONFIG_TOP)
@echo
@echo '***********************************************************'
@@ -225,7 +225,7 @@ endif # MAKECMDGOALS contains a build sample rule
endif # MAKECMDGOALS != ""
# Build a single sample
-$(patsubst %,build-%,$(CT_SAMPLES)): build-%: config_files
+$(patsubst %,build-%,$(CT_SAMPLES)): build-%:
$(call build_sample,$*)
# Cross samples (build==host)
diff --git a/scripts/saveSample.sh.in b/scripts/saveSample.sh.in
index 2e413bd..2eb1f40 100644
--- a/scripts/saveSample.sh.in
+++ b/scripts/saveSample.sh.in
@@ -86,7 +86,7 @@ fi
# Now, actually save the defconfig
export KCONFIG_CONFIG="$(pwd)/.defconfig"
-${CONF} --savedefconfig="${samp_dir}/crosstool.config" "${KCONFIG_TOP}"
+srctree="${CT_LIB_DIR}" ${CONF} --savedefconfig="${samp_dir}/crosstool.config" "${KCONFIG_TOP}"
rm -f .defconfig
# Fill-in the reported-by info