Latest linux version for headers isntall.
/trunk/config/kernel/linux_headers_install.in | 6 6 0 0 ++++++
1 file changed, 6 insertions(+)
1 # Makefile to manage samples
3 # Build the list of available samples
4 CT_TOP_SAMPLES := $(patsubst $(CT_TOP_DIR)/samples/%/crosstool.config,%,$(wildcard $(CT_TOP_DIR)/samples/*/crosstool.config))
5 CT_LIB_SAMPLES := $(filter-out $(CT_TOP_SAMPLES),$(patsubst $(CT_LIB_DIR)/samples/%/crosstool.config,%,$(wildcard $(CT_LIB_DIR)/samples/*/crosstool.config)))
7 CT_SAMPLES := $(CT_TOP_SAMPLES) $(CT_LIB_SAMPLES)
10 @echo ' saveconfig - Save current config as a preconfigured target'
13 @echo ' list-samples - prints the list of all samples (for scripting)'
14 @echo ' show-<sample> - show a brief overview of <sample> (list below)'
15 @echo ' <sample> - preconfigure crosstool-NG with <sample> (list below)'
16 @$(CT_LIB_DIR)/scripts/showSamples.sh $(CT_SAMPLES)
19 @echo ' regtest[.#] - Regtest-build all samples'
20 @echo ' regtest-local[.#] - Regtest-build all local samples'
21 @echo ' regtest-global[.#] - Regtest-build all global samples'
23 $(patsubst %,show-%,$(CT_SAMPLES)):
24 @$(CT_LIB_DIR)/scripts/showSamples.sh -v $(patsubst show-%,%,$(@))
28 @echo $(CT_SAMPLES) |sed -r -e 's/ /\n/g;' |sort
30 # How we do build one sample
31 PHONY += $(CT_SAMPLES)
33 @echo 'Configuring for "$@"'
34 @$(CT_NG) $(patsubst %,copy_config_%,$(@)) oldconfig
35 @echo 'Execute "$(CT_NG) build" to build your toolchain'
37 $(patsubst %,copy_config_%,$(CT_SAMPLES)):
38 @if [ -f $(CT_TOP_DIR)/samples/$(patsubst copy_config_%,%,$(@))/crosstool.config ]; then \
39 cp "$(CT_TOP_DIR)/samples/$(patsubst copy_config_%,%,$(@))/crosstool.config" "$(CT_TOP_DIR)/.config"; \
41 cp "$(CT_LIB_DIR)/samples/$(patsubst copy_config_%,%,$(@))/crosstool.config" "$(CT_TOP_DIR)/.config"; \
44 # And now for building all samples one after the other
45 PHONY += regtest regtest_local regtest_global
46 regtest: regtest-local regtest-global
48 regtest-local: $(patsubst %,regtest_%,$(CT_TOP_SAMPLES))
50 regtest-global: $(patsubst %,regtest_%,$(CT_LIB_SAMPLES))
52 regtest.% regtest-local.% regtest-global.%:
53 @$(CT_NG) $(shell echo "$(@)" |sed -r -e 's|^([^.]+)\.([[:digit:]]+)$$|\1 CT_JOBS=\2|;')
55 # One regtest per sample
56 # We could use a simple rule like: 'regtest: $(CT_SAMPLES)', but that doesn't
57 # work because we want to save the samples as well.
58 # Also, we don't want to see anylog at all, save for the elapsed time, and we
59 # want to save the log file in a specific place
60 # Furthermore, force the location where the toolchain will be installed.
61 # Finaly, we can't use 'make sample-name' as we need to provide default values
62 # if the options set has changed, but oldconfig does not like when stdin is
63 # not a terminal (eg. it is a pipe).
64 $(patsubst %,regtest_%,$(CT_SAMPLES)):
65 @samp=$(patsubst regtest_%,%,$@) ; \
66 echo -e "\rBuilding sample \"$${samp}\"" && \
67 $(CT_NG) copy_config_$${samp} && \
68 yes "" |$(CT_NG) defoldconfig >/dev/null 2>&1 && \
69 sed -i -r -e 's:^(CT_PREFIX_DIR=).*$$:\1"$${CT_TOP_DIR}/targets/tst/$${CT_TARGET}":;' .config && \
70 sed -i -r -e 's:^.*(CT_LOG_(WARN|INFO|EXTRA|DEBUG|ALL)).*$$:# \1 is not set:;' .config && \
71 sed -i -r -e 's:^.*(CT_LOG_ERROR).*$$:\1=y:;' .config && \
72 sed -i -r -e 's:^(CT_LOG_LEVEL_MAX)=.*$$:\1="ERROR":;' .config && \
73 sed -i -r -e 's:^.*(CT_LOG_TO_FILE).*$$:\1=y:;' .config && \
74 sed -i -r -e 's:^.*(CT_LOG_PROGRESS_BAR).*$$:\1=y:;' .config && \
75 yes "" |$(CT_NG) defoldconfig >/dev/null 2>&1 && \
77 echo -e "\rSuccessfully built sample \"$${samp}\"" && \
78 echo -e "\rMaking tarball for sample \"$${samp}\"" && \
80 echo -e "\rSuccessfully built tarball for sample \"$${samp}\"" ; \
81 echo -e "\rCleaning sample \"$${samp}\"" ; \
82 $(CT_NG) distclean ; \
86 @$(CT_LIB_DIR)/scripts/saveSample.sh