Skip to content

Commit

Permalink
Use config from the install location
Browse files Browse the repository at this point in the history
... no need to create a local symlink.

Signed-off-by: Alexey Neyman <stilor@att.net>
  • Loading branch information
stilor committed Apr 23, 2017
1 parent 105e4b5 commit c9dad33
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 43 deletions.
27 changes: 0 additions & 27 deletions config/config.mk

This file was deleted.

1 change: 0 additions & 1 deletion ct-ng.in
Expand Up @@ -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
Expand Down
15 changes: 8 additions & 7 deletions kconfig/kconfig.mk
Expand Up @@ -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)
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions samples/samples.mk
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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; \
Expand Down Expand Up @@ -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
Expand All @@ -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 '***********************************************************'
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion scripts/saveSample.sh.in
Expand Up @@ -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
Expand Down

0 comments on commit c9dad33

Please sign in to comment.