2008-10-18 18:37:28 +00:00
|
|
|
# ===========================================================================
|
|
|
|
# crosstool-NG genererated config files
|
|
|
|
# These targets are used from top-level makefile
|
|
|
|
|
|
|
|
#-----------------------------------------------------------
|
2008-10-27 18:42:26 +00:00
|
|
|
# List all config files, wether sourced or generated
|
2008-10-18 18:37:28 +00:00
|
|
|
|
|
|
|
# The top-level config file to be used be configurators
|
2012-05-06 22:27:05 +00:00
|
|
|
# We need it to savedefconfig in scripts/saveSample.sh
|
|
|
|
export KCONFIG_TOP = config/config.in
|
2008-10-18 18:37:28 +00:00
|
|
|
|
|
|
|
# Build the list of all source config files
|
2010-06-08 21:26:54 +00:00
|
|
|
STATIC_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(shell find $(CT_LIB_DIR)/config -type f \( -name '*.in' -o -name '*.in.2' \) 2>/dev/null))
|
2008-10-18 18:37:28 +00:00
|
|
|
# ... and how to access them:
|
|
|
|
$(STATIC_CONFIG_FILES): config
|
|
|
|
|
|
|
|
# Build a list of per-component-type source config files
|
2014-06-25 21:33:01 +00:00
|
|
|
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)))
|
Give companion tools some love.
Allow selection of make/m4/... version. Support imports of new versions
via addToolVersion.sh. Import newest versions of the companion tools.
One non-trivial change is the handling of make versions. Existing code
was not handling make companion tool as described (see the previous
commit). However, since most modern systems have make 4.x, that previous
commit made crosstool-ng always build make as a companion tool.
This traces back to the commit dd15c93 from 2014. That commit's log message
says that actually it was 3.81 which broke the build for certain component
(it was originally breaking eglibc, but I noticed it was breaking current
glibc on powerpc64), and introduced an option to force using 3.81 by
"components that really need it". It looks like in 2.5 years we haven't
seen any such components that really need make 3.81, and (given that make
has already had a few releases since 3.81) we're unlikely to see them
in the future.
Hence, the configure check is changed from "exactly 3.81" to "3.81 or newer".
In its current form, configure will accept make 3.80+, and will not require
make as a companion tool for 3.81+. We might want to bump the latter check
to even newer version given the claim from dd15c93. Killed
COMP_TOOLS_make_3_81_NEEDED.
Anyway, I retained 3.81 just in case; ditto for m4 1.14.3, autoconf 2.65
and automake 1.11.1.
Signed-off-by: Alexey Neyman <stilor@att.net>
2016-11-21 20:09:54 +00:00
|
|
|
COMP_TOOLS_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(sort $(wildcard $(CT_LIB_DIR)/config/companion_tools/*.in)))
|
2008-10-18 18:37:28 +00:00
|
|
|
|
|
|
|
# Build the list of generated config files
|
Give companion tools some love.
Allow selection of make/m4/... version. Support imports of new versions
via addToolVersion.sh. Import newest versions of the companion tools.
One non-trivial change is the handling of make versions. Existing code
was not handling make companion tool as described (see the previous
commit). However, since most modern systems have make 4.x, that previous
commit made crosstool-ng always build make as a companion tool.
This traces back to the commit dd15c93 from 2014. That commit's log message
says that actually it was 3.81 which broke the build for certain component
(it was originally breaking eglibc, but I noticed it was breaking current
glibc on powerpc64), and introduced an option to force using 3.81 by
"components that really need it". It looks like in 2.5 years we haven't
seen any such components that really need make 3.81, and (given that make
has already had a few releases since 3.81) we're unlikely to see them
in the future.
Hence, the configure check is changed from "exactly 3.81" to "3.81 or newer".
In its current form, configure will accept make 3.80+, and will not require
make as a companion tool for 3.81+. We might want to bump the latter check
to even newer version given the claim from dd15c93. Killed
COMP_TOOLS_make_3_81_NEEDED.
Anyway, I retained 3.81 just in case; ditto for m4 1.14.3, autoconf 2.65
and automake 1.11.1.
Signed-off-by: Alexey Neyman <stilor@att.net>
2016-11-21 20:09:54 +00:00
|
|
|
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
|
2008-10-18 18:37:28 +00:00
|
|
|
# ... and how to access them:
|
2011-07-03 21:02:16 +00:00
|
|
|
# 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 \
|
2008-10-18 18:37:28 +00:00
|
|
|
$(CT_LIB_DIR)/config/config.mk
|
|
|
|
|
|
|
|
# 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:
|
2015-10-30 02:34:24 +00:00
|
|
|
@$(CT_ECHO) " LN config"
|
2008-10-18 18:37:28 +00:00
|
|
|
$(SILENT)ln -s $(CT_LIB_DIR)/config config
|
|
|
|
|
|
|
|
# Where to store the generated config files into
|
|
|
|
config.gen:
|
2015-10-30 02:34:24 +00:00
|
|
|
@$(CT_ECHO) " MKDIR config.gen"
|
2008-10-18 18:37:28 +00:00
|
|
|
$(SILENT)mkdir -p config.gen
|
|
|
|
|
|
|
|
#-----------------------------------------------------------
|
|
|
|
# Build list of per-component-type items to easily build generated files
|
|
|
|
|
2012-11-19 21:13:11 +00:00
|
|
|
ARCHS = $(patsubst config/arch/%.in,%,$(ARCH_CONFIG_FILES))
|
|
|
|
KERNELS = $(patsubst config/kernel/%.in,%,$(KERNEL_CONFIG_FILES))
|
|
|
|
CCS = $(patsubst config/cc/%.in,%,$(CC_CONFIG_FILES))
|
2012-11-19 10:21:31 +00:00
|
|
|
BINUTILSS = $(patsubst config/binutils/%.in,%,$(BINUTILS_CONFIG_FILES))
|
2012-11-19 21:13:11 +00:00
|
|
|
LIBCS = $(patsubst config/libc/%.in,%,$(LIBC_CONFIG_FILES))
|
|
|
|
DEBUGS = $(patsubst config/debug/%.in,%,$(DEBUG_CONFIG_FILES))
|
Give companion tools some love.
Allow selection of make/m4/... version. Support imports of new versions
via addToolVersion.sh. Import newest versions of the companion tools.
One non-trivial change is the handling of make versions. Existing code
was not handling make companion tool as described (see the previous
commit). However, since most modern systems have make 4.x, that previous
commit made crosstool-ng always build make as a companion tool.
This traces back to the commit dd15c93 from 2014. That commit's log message
says that actually it was 3.81 which broke the build for certain component
(it was originally breaking eglibc, but I noticed it was breaking current
glibc on powerpc64), and introduced an option to force using 3.81 by
"components that really need it". It looks like in 2.5 years we haven't
seen any such components that really need make 3.81, and (given that make
has already had a few releases since 3.81) we're unlikely to see them
in the future.
Hence, the configure check is changed from "exactly 3.81" to "3.81 or newer".
In its current form, configure will accept make 3.80+, and will not require
make as a companion tool for 3.81+. We might want to bump the latter check
to even newer version given the claim from dd15c93. Killed
COMP_TOOLS_make_3_81_NEEDED.
Anyway, I retained 3.81 just in case; ditto for m4 1.14.3, autoconf 2.65
and automake 1.11.1.
Signed-off-by: Alexey Neyman <stilor@att.net>
2016-11-21 20:09:54 +00:00
|
|
|
COMP_TOOLS= $(patsubst config/companion_tools/%.in,%,$(COMP_TOOLS_CONFIG_FILES))
|
2008-10-18 18:37:28 +00:00
|
|
|
|
|
|
|
#-----------------------------------------------------------
|
|
|
|
# The rules for the generated config files
|
|
|
|
|
2010-06-08 21:26:54 +00:00
|
|
|
# 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)
|
2015-10-30 02:34:24 +00:00
|
|
|
@$(CT_ECHO) ' IN $(@)'
|
2011-07-03 21:02:16 +00:00
|
|
|
$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "Target Architecture" "ARCH" "config/arch" "Y" $(ARCHS)
|
2008-10-18 18:37:28 +00:00
|
|
|
|
2010-06-08 21:26:54 +00:00
|
|
|
config.gen/kernel.in: $(KERNEL_CONFIG_FILES) $(KERNEL_CONFIG_FILES_2)
|
2015-10-30 02:34:24 +00:00
|
|
|
@$(CT_ECHO) ' IN $(@)'
|
2011-07-03 21:02:16 +00:00
|
|
|
$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "Target OS" "KERNEL" "config/kernel" "Y" $(KERNELS)
|
2008-10-18 18:37:28 +00:00
|
|
|
|
2010-06-08 21:26:54 +00:00
|
|
|
config.gen/cc.in: $(CC_CONFIG_FILES) $(CC_CONFIG_FILES_2)
|
2015-10-30 02:34:24 +00:00
|
|
|
@$(CT_ECHO) ' IN $(@)'
|
2011-07-03 21:02:16 +00:00
|
|
|
$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "C compiler" "CC" "config/cc" "N" $(CCS)
|
2008-10-18 18:37:28 +00:00
|
|
|
|
2012-11-19 10:21:31 +00:00
|
|
|
config.gen/binutils.in: $(CC_BINUTILS_FILES) $(CC_BINUTILS_FILES_2)
|
2015-10-30 02:34:24 +00:00
|
|
|
@$(CT_ECHO) ' IN $(@)'
|
2012-11-19 10:21:31 +00:00
|
|
|
$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "Binutils" "BINUTILS" "config/binutils" "N" $(BINUTILSS)
|
|
|
|
|
2010-06-08 21:26:54 +00:00
|
|
|
config.gen/libc.in: $(LIBC_CONFIG_FILES) $(LIBC_CONFIG_FILES_2)
|
2015-10-30 02:34:24 +00:00
|
|
|
@$(CT_ECHO) ' IN $(@)'
|
2011-07-03 21:02:16 +00:00
|
|
|
$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "C library" "LIBC" "config/libc" "Y" $(LIBCS)
|
2008-10-18 18:37:28 +00:00
|
|
|
|
|
|
|
config.gen/debug.in: $(DEBUG_CONFIG_FILES)
|
2015-10-30 02:34:24 +00:00
|
|
|
@$(CT_ECHO) ' IN $(@)'
|
2011-07-03 21:02:16 +00:00
|
|
|
$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh menu "$@" "Debug facilities" "DEBUG" "config/debug" $(DEBUGS)
|
2008-10-18 18:37:28 +00:00
|
|
|
|
Give companion tools some love.
Allow selection of make/m4/... version. Support imports of new versions
via addToolVersion.sh. Import newest versions of the companion tools.
One non-trivial change is the handling of make versions. Existing code
was not handling make companion tool as described (see the previous
commit). However, since most modern systems have make 4.x, that previous
commit made crosstool-ng always build make as a companion tool.
This traces back to the commit dd15c93 from 2014. That commit's log message
says that actually it was 3.81 which broke the build for certain component
(it was originally breaking eglibc, but I noticed it was breaking current
glibc on powerpc64), and introduced an option to force using 3.81 by
"components that really need it". It looks like in 2.5 years we haven't
seen any such components that really need make 3.81, and (given that make
has already had a few releases since 3.81) we're unlikely to see them
in the future.
Hence, the configure check is changed from "exactly 3.81" to "3.81 or newer".
In its current form, configure will accept make 3.80+, and will not require
make as a companion tool for 3.81+. We might want to bump the latter check
to even newer version given the claim from dd15c93. Killed
COMP_TOOLS_make_3_81_NEEDED.
Anyway, I retained 3.81 just in case; ditto for m4 1.14.3, autoconf 2.65
and automake 1.11.1.
Signed-off-by: Alexey Neyman <stilor@att.net>
2016-11-21 20:09:54 +00:00
|
|
|
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)
|
|
|
|
|
2008-10-18 18:37:28 +00:00
|
|
|
#-----------------------------------------------------------
|
|
|
|
# Cleaning up the mess...
|
|
|
|
|
|
|
|
clean::
|
2015-10-30 02:34:24 +00:00
|
|
|
@$(CT_ECHO) " CLEAN config"
|
2008-10-18 18:37:28 +00:00
|
|
|
$(SILENT)rm -f config 2>/dev/null || true
|
2015-10-30 02:34:24 +00:00
|
|
|
@$(CT_ECHO) " CLEAN config.gen"
|
2008-10-18 18:37:28 +00:00
|
|
|
$(SILENT)rm -rf config.gen
|