diff options
author | Alexey Neyman <stilor@att.net> | 2017-04-23 01:41:50 (GMT) |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2017-04-23 01:41:50 (GMT) |
commit | 105e4b59b7989e9898795273e4064791fdfa056c (patch) | |
tree | 49624ed07ced50f36c20ac97d4390f23715d83da /config/config.mk | |
parent | 2c0fb226419507583a736818346a7d6f07eba983 (diff) |
Get rid of config.gen
Instead, prepare the files as a part of bootstrap and install them.
This avoids rebuilding these files in each working directory; they
don't change anyway as they are generated from the same installed
source.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'config/config.mk')
-rw-r--r-- | config/config.mk | 89 |
1 files changed, 1 insertions, 88 deletions
diff --git a/config/config.mk b/config/config.mk index 670ecba..e0ca3d2 100644 --- a/config/config.mk +++ b/config/config.mk @@ -1,9 +1,5 @@ -# =========================================================================== -# crosstool-NG genererated config files -# These targets are used from top-level makefile - #----------------------------------------------------------- -# List all config files, wether sourced or generated +# List all config files # The top-level config file to be used be configurators # We need it to savedefconfig in scripts/saveSample.sh @@ -14,38 +10,6 @@ STATIC_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(shell find $(CT_LIB_DIR)/co # ... and how to access them: $(STATIC_CONFIG_FILES): config -# Build a list of per-component-type source config files -ARCH_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(sort $(wildcard $(CT_LIB_DIR)/config/arch/*.in))) -ARCH_CONFIG_FILES_2 = $(patsubst $(CT_LIB_DIR)/%,%,$(sort $(wildcard $(CT_LIB_DIR)/config/arch/*.in.2))) -KERNEL_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(sort $(wildcard $(CT_LIB_DIR)/config/kernel/*.in))) -KERNEL_CONFIG_FILES_2 = $(patsubst $(CT_LIB_DIR)/%,%,$(sort $(wildcard $(CT_LIB_DIR)/config/kernel/*.in.2))) -CC_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(sort $(wildcard $(CT_LIB_DIR)/config/cc/*.in))) -CC_CONFIG_FILES_2 = $(patsubst $(CT_LIB_DIR)/%,%,$(sort $(wildcard $(CT_LIB_DIR)/config/cc/*.in.2))) -BINUTILS_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(sort $(wildcard $(CT_LIB_DIR)/config/binutils/*.in))) -BINUTILS_CONFIG_FILES_2 = $(patsubst $(CT_LIB_DIR)/%,%,$(sort $(wildcard $(CT_LIB_DIR)/config/binutils/*.in.2))) -LIBC_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(sort $(wildcard $(CT_LIB_DIR)/config/libc/*.in))) -LIBC_CONFIG_FILES_2 = $(patsubst $(CT_LIB_DIR)/%,%,$(sort $(wildcard $(CT_LIB_DIR)/config/libc/*.in.2))) -DEBUG_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(sort $(wildcard $(CT_LIB_DIR)/config/debug/*.in))) -COMP_TOOLS_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(sort $(wildcard $(CT_LIB_DIR)/config/companion_tools/*.in))) - -# Build the list of generated config files -GEN_CONFIG_FILES = config.gen/arch.in \ - config.gen/kernel.in \ - config.gen/cc.in \ - config.gen/binutils.in \ - config.gen/libc.in \ - config.gen/debug.in \ - config.gen/companion_tools.in -# ... and how to access them: -# Generated files depends on the gen_in_frags script because it has the -# functions needed to build the genrated files, and thus they might need -# re-generation if it changes. -# They also depends on config.mk (this file) because it has the dependency -# rules, and thus they might need re-generation if the deps change. -$(GEN_CONFIG_FILES): config.gen \ - $(CT_LIB_DIR)/scripts/gen_in_frags.sh \ - $(CT_LIB_DIR)/config/config.mk - # Helper entry for the configurators PHONY += config_files config_files: $(STATIC_CONFIG_FILES) $(GEN_CONFIG_FILES) @@ -55,60 +19,9 @@ config: @$(CT_ECHO) " LN config" $(SILENT)ln -s $(CT_LIB_DIR)/config config -# Where to store the generated config files into -config.gen: - @$(CT_ECHO) " MKDIR config.gen" - $(SILENT)mkdir -p config.gen - -#----------------------------------------------------------- -# Build list of per-component-type items to easily build generated files - -ARCHS = $(patsubst config/arch/%.in,%,$(ARCH_CONFIG_FILES)) -KERNELS = $(patsubst config/kernel/%.in,%,$(KERNEL_CONFIG_FILES)) -CCS = $(patsubst config/cc/%.in,%,$(CC_CONFIG_FILES)) -BINUTILSS = $(patsubst config/binutils/%.in,%,$(BINUTILS_CONFIG_FILES)) -LIBCS = $(patsubst config/libc/%.in,%,$(LIBC_CONFIG_FILES)) -DEBUGS = $(patsubst config/debug/%.in,%,$(DEBUG_CONFIG_FILES)) -COMP_TOOLS= $(patsubst config/companion_tools/%.in,%,$(COMP_TOOLS_CONFIG_FILES)) - -#----------------------------------------------------------- -# The rules for the generated config files - -# WARNING! If a .in file disapears between two runs, that will NOT be detected! - -config.gen/arch.in: $(ARCH_CONFIG_FILES) $(ARCH_CONFIG_FILES_2) - @$(CT_ECHO) ' IN $(@)' - $(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "Target Architecture" "ARCH" "config/arch" "Y" $(ARCHS) - -config.gen/kernel.in: $(KERNEL_CONFIG_FILES) $(KERNEL_CONFIG_FILES_2) - @$(CT_ECHO) ' IN $(@)' - $(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "Target OS" "KERNEL" "config/kernel" "Y" $(KERNELS) - -config.gen/cc.in: $(CC_CONFIG_FILES) $(CC_CONFIG_FILES_2) - @$(CT_ECHO) ' IN $(@)' - $(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "C compiler" "CC" "config/cc" "N" $(CCS) - -config.gen/binutils.in: $(CC_BINUTILS_FILES) $(CC_BINUTILS_FILES_2) - @$(CT_ECHO) ' IN $(@)' - $(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "Binutils" "BINUTILS" "config/binutils" "N" $(BINUTILSS) - -config.gen/libc.in: $(LIBC_CONFIG_FILES) $(LIBC_CONFIG_FILES_2) - @$(CT_ECHO) ' IN $(@)' - $(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "C library" "LIBC" "config/libc" "Y" $(LIBCS) - -config.gen/debug.in: $(DEBUG_CONFIG_FILES) - @$(CT_ECHO) ' IN $(@)' - $(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh menu "$@" "Debug facilities" "DEBUG" "config/debug" $(DEBUGS) - -config.gen/companion_tools.in: $(COMP_TOOLS_CONFIG_FILES) - @$(CT_ECHO) ' IN $(@)' - $(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh menu "$@" "Companion tools" "COMP_TOOLS" "config/companion_tools" $(COMP_TOOLS) - #----------------------------------------------------------- # Cleaning up the mess... clean:: @$(CT_ECHO) " CLEAN config" $(SILENT)rm -f config 2>/dev/null || true - @$(CT_ECHO) " CLEAN config.gen" - $(SILENT)rm -rf config.gen |