From 80cbfb9da7bfc02fdd5c6256e3f51182eb811e17 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 28 Oct 2015 14:08:31 -0700 Subject: Make show-config consistent with sample name. 'ct-ng show-config' will prepend host for canadian builds; otherwise, the name is different from the name used to configure the build (and indistinguishable from a simple cross). Signed-off-by: Alexey Neyman diff --git a/scripts/showSamples.sh b/scripts/showSamples.sh index 684e118..76609f2 100755 --- a/scripts/showSamples.sh +++ b/scripts/showSamples.sh @@ -23,10 +23,16 @@ dump_single_sample() { [ "$1" = "-v" ] && verbose=1 && shift [ "$1" = "-w" ] && wiki=1 && shift local sample="$1" + . $(pwd)/.config.sample case "${sample}" in current) sample_type="l" sample="$( ${CT_NG} show-tuple )" + case "${CT_TOOLCHAIN_TYPE}" in + canadian) + sample="${CT_HOST},$sample" + ;; + esac ;; *) if [ -f "${CT_TOP_DIR}/samples/${sample}/crosstool.config" ]; then sample_top="${CT_TOP_DIR}" @@ -37,7 +43,6 @@ dump_single_sample() { fi ;; esac - . $(pwd)/.config.sample if [ ${wiki} -eq 0 ]; then width=14 printf "[%s" "${sample_type}" -- cgit v0.10.2-6-g49f6 From e71f0db6e340192b149a74a4a99058091e8455fa Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 28 Oct 2015 14:13:30 -0700 Subject: Rename nios2 sample to match the naming convention. With current name, 'make saveconfig' is broken for this sample. Also, it is confusing to have a sample named 'nios2-elf-mingw32' while show-tuple refers to it as 'nios2-spico-elf' and saveconfig attempts to save it into 'i686-w64-mingw32,nios2-spico-elf'. Signed-off-by: Alexey Neyman diff --git a/samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config b/samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config new file mode 100644 index 0000000..167df55 --- /dev/null +++ b/samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config @@ -0,0 +1,18 @@ +CT_EXPERIMENTAL=y +CT_LOCAL_TARBALLS_DIR="${HOME}/src" +CT_SAVE_TARBALLS=y +# CT_REMOVE_DOCS is not set +CT_LOG_EXTRA=y +CT_ARCH_nios2=y +CT_STATIC_TOOLCHAIN=y +CT_TOOLCHAIN_BUGURL="https://bitbucket.org/netzimme/eax-gcc/issues?status=new&status=open" +CT_TARGET_VENDOR="spico" +CT_CANADIAN=y +CT_HOST="i686-w64-mingw32" +CT_BINUTILS_V_2_25=y +CT_CC_LANG_CXX=y +CT_DEBUG_gdb=y +# CT_GDB_CROSS is not set +CT_MPFR_V_3_1_2=y +CT_ISL_V_0_12_2=y +CT_MPC_V_1_0_2=y diff --git a/samples/i686-w64-mingw32,nios2-spico-elf/reported.by b/samples/i686-w64-mingw32,nios2-spico-elf/reported.by new file mode 100644 index 0000000..c2bc32b --- /dev/null +++ b/samples/i686-w64-mingw32,nios2-spico-elf/reported.by @@ -0,0 +1,3 @@ +reporter_name="Daniel Zimmermann " +reporter_url="http://www.zimme.de" +reporter_comment="cross compiler toolchain for the NIOS2 architecture. NIOS2 is a soft microprocessor from Altera" diff --git a/samples/nios2-elf-mingw32/crosstool.config b/samples/nios2-elf-mingw32/crosstool.config deleted file mode 100644 index 167df55..0000000 --- a/samples/nios2-elf-mingw32/crosstool.config +++ /dev/null @@ -1,18 +0,0 @@ -CT_EXPERIMENTAL=y -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -# CT_REMOVE_DOCS is not set -CT_LOG_EXTRA=y -CT_ARCH_nios2=y -CT_STATIC_TOOLCHAIN=y -CT_TOOLCHAIN_BUGURL="https://bitbucket.org/netzimme/eax-gcc/issues?status=new&status=open" -CT_TARGET_VENDOR="spico" -CT_CANADIAN=y -CT_HOST="i686-w64-mingw32" -CT_BINUTILS_V_2_25=y -CT_CC_LANG_CXX=y -CT_DEBUG_gdb=y -# CT_GDB_CROSS is not set -CT_MPFR_V_3_1_2=y -CT_ISL_V_0_12_2=y -CT_MPC_V_1_0_2=y diff --git a/samples/nios2-elf-mingw32/reported.by b/samples/nios2-elf-mingw32/reported.by deleted file mode 100644 index c2bc32b..0000000 --- a/samples/nios2-elf-mingw32/reported.by +++ /dev/null @@ -1,3 +0,0 @@ -reporter_name="Daniel Zimmermann " -reporter_url="http://www.zimme.de" -reporter_comment="cross compiler toolchain for the NIOS2 architecture. NIOS2 is a soft microprocessor from Altera" -- cgit v0.10.2-6-g49f6 From a9e6606e5351f69355edb72dc2b1ac84fd58e514 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 28 Oct 2015 17:35:23 -0700 Subject: Make build-all non-interactive. 'make oldconfig' results in asking the user about options not explicitly set in the defconfig. Instead of copying, run 'conf --defconfig', as in the normal sample's build sequence. Also, invoke 'conf --oldconfig' directly, with a -s option, to avoid spamming with useless "configuration written to .config" messages. Signed-off-by: Alexey Neyman diff --git a/samples/samples.mk b/samples/samples.mk index e154e5c..35f3435 100644 --- a/samples/samples.mk +++ b/samples/samples.mk @@ -169,16 +169,17 @@ $(CT_SAMPLES): config_files # $2: prefix define build_sample @$(ECHO) ' CONF $(1)' - $(SILENT)cp $(call sample_dir,$(1))/crosstool.config .config + $(SILENT)$(CONF) -s --defconfig=$(call sample_dir,$(1))/crosstool.config $(KCONFIG_TOP) $(SILENT)$(sed) -i -r -e 's:^(CT_PREFIX_DIR=).*$$:\1"$(2)":;' .config $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_(WARN|INFO|EXTRA|DEBUG|ALL)).*$$:# \1 is not set:;' .config $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_ERROR).*$$:\1=y:;' .config $(SILENT)$(sed) -i -r -e 's:^(CT_LOG_LEVEL_MAX)=.*$$:\1="ERROR":;' .config $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_TO_FILE).*$$:\1=y:;' .config $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_PROGRESS_BAR).*$$:\1=y:;' .config - $(SILENT)$(MAKE) -rf $(CT_NG) V=0 oldconfig + $(SILENT)$(CONF) -s --oldconfig $(KCONFIG_TOP) @$(ECHO) ' BUILD $(1)' $(SILENT)$(MAKE) -rf $(CT_NG) V=0 build + @printf '\r' endef # ---------------------------------------------------------- @@ -196,7 +197,7 @@ endif # MAKECMDGOALS contains a build sample rule endif # MAKECMDGOALS != "" # Build a single sample -$(patsubst %,build-%,$(CT_SAMPLES)): +$(patsubst %,build-%,$(CT_SAMPLES)): config_files $(call build_sample,$(patsubst build-%,%,$@),$(CT_PREFIX)/$(patsubst build-%,%,$@)) # Build al samples -- cgit v0.10.2-6-g49f6 From 1d6bed6254ac819ef7b6deb653053024311ec5be Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 28 Oct 2015 18:09:47 -0700 Subject: Only create backtrace stamp if dir exists. If the build is aborted before the working directory is created, there's also an induced error message about inability to create a 'backtrace' file. But in that case, there is no subshells executing yet. Signed-off-by: Alexey Neyman diff --git a/scripts/functions b/scripts/functions index 8665346..91ec217 100644 --- a/scripts/functions +++ b/scripts/functions @@ -14,7 +14,7 @@ CT_OnError() { # To avoid printing the backtace for each sub-shell # up to the top-level, just remember we've dumped it if [ ! -f "${CT_WORK_DIR}/backtrace" ]; then - touch "${CT_WORK_DIR}/backtrace" + [ -d "${CT_WORK_DIR}" ] && touch "${CT_WORK_DIR}/backtrace" # Print steps backtrace step_depth=${CT_STEP_COUNT} -- cgit v0.10.2-6-g49f6 From b36e00212458309335f939cda6ba92de94068dec Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 28 Oct 2015 18:12:03 -0700 Subject: Avoid commas in autogenerated CT_PREFIX_DIR. Signed-off-by: Alexey Neyman diff --git a/samples/samples.mk b/samples/samples.mk index 35f3435..b3542f6 100644 --- a/samples/samples.mk +++ b/samples/samples.mk @@ -164,13 +164,20 @@ $(CT_SAMPLES): config_files # ---------------------------------------------------------- # Some helper functions +# Construct a CT_PREFIX_DIR path from the sample name. Sample names use +# comma as a separator between host and target triplets in canadian cross +# configurations, but ct-ng does not allow commas in the path. Substitute +# with = (equal sign). +# $1: sample +__comma = , +prefix_dir = $(CT_PREFIX)/$(subst $(__comma),=,$(1)) + # Create the rule to build a sample -# $1: sample tuple -# $2: prefix +# $1: sample name (target tuple, or host/target tuples separated by a comma) define build_sample @$(ECHO) ' CONF $(1)' $(SILENT)$(CONF) -s --defconfig=$(call sample_dir,$(1))/crosstool.config $(KCONFIG_TOP) - $(SILENT)$(sed) -i -r -e 's:^(CT_PREFIX_DIR=).*$$:\1"$(2)":;' .config + $(SILENT)$(sed) -i -r -e 's:^(CT_PREFIX_DIR=).*$$:\1"$(call prefix_dir,$(1))":;' .config $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_(WARN|INFO|EXTRA|DEBUG|ALL)).*$$:# \1 is not set:;' .config $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_ERROR).*$$:\1=y:;' .config $(SILENT)$(sed) -i -r -e 's:^(CT_LOG_LEVEL_MAX)=.*$$:\1="ERROR":;' .config @@ -197,8 +204,8 @@ endif # MAKECMDGOALS contains a build sample rule endif # MAKECMDGOALS != "" # Build a single sample -$(patsubst %,build-%,$(CT_SAMPLES)): config_files - $(call build_sample,$(patsubst build-%,%,$@),$(CT_PREFIX)/$(patsubst build-%,%,$@)) +$(patsubst %,build-%,$(CT_SAMPLES)): build-%: config_files + $(call build_sample,$*) # Build al samples build-all: $(patsubst %,build-%,$(CT_SAMPLES)) -- cgit v0.10.2-6-g49f6 From aba43b63d31f94ec9598a3e0e5008f25a82b64fd Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 29 Oct 2015 00:21:43 -0700 Subject: Order the samples in build-all. First, build cross samples (indicated by lack of comma in their names); then, build canadian cross samples (and, when they are supported, cross-native). While building canadian cross, set up the path to the build-to-host cross if it was built previously. Signed-off-by: Alexey Neyman diff --git a/samples/samples.mk b/samples/samples.mk index b3542f6..48f4a74 100644 --- a/samples/samples.mk +++ b/samples/samples.mk @@ -171,6 +171,7 @@ $(CT_SAMPLES): config_files # $1: sample __comma = , prefix_dir = $(CT_PREFIX)/$(subst $(__comma),=,$(1)) +host_triplet = $(if $(findstring $(__comma),$(1)),$(firstword $(subst $(__comma), ,$(1)))) # Create the rule to build a sample # $1: sample name (target tuple, or host/target tuples separated by a comma) @@ -185,7 +186,10 @@ define build_sample $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_PROGRESS_BAR).*$$:\1=y:;' .config $(SILENT)$(CONF) -s --oldconfig $(KCONFIG_TOP) @$(ECHO) ' BUILD $(1)' - $(SILENT)$(MAKE) -rf $(CT_NG) V=0 build + $(SILENT)if [ ! -z "$(call host_triplet,$(1))" -a -d "$(call prefix_dir,$(call host_triplet,$(1)))" ]; then \ + PATH="$$PATH:$(call prefix_dir,$(call host_triplet,$(1)))/bin"; \ + fi; \ + $(MAKE) -rf $(CT_NG) V=0 build @printf '\r' endef @@ -207,8 +211,14 @@ endif # MAKECMDGOALS != "" $(patsubst %,build-%,$(CT_SAMPLES)): build-%: config_files $(call build_sample,$*) -# Build al samples -build-all: $(patsubst %,build-%,$(CT_SAMPLES)) +# Cross samples (build==host) +CT_SAMPLES_CROSS = $(strip $(foreach s,$(CT_SAMPLES),$(if $(findstring $(__comma),$(s)),, $(s)))) +# Canadian cross (build!=host) +CT_SAMPLES_CANADIAN = $(strip $(foreach s,$(CT_SAMPLES),$(if $(findstring $(__comma),$(s)), $(s),))) + +# Build all samples; first, build simple cross as canadian configurations may depend on +# build-to-host cross being pre-built. +build-all: $(patsubst %,build-%,$(CT_SAMPLES_CROSS) $(CT_SAMPLES_CANADIAN)) # Build all samples, overiding the number of // jobs per sample build-all.%: -- cgit v0.10.2-6-g49f6 From 41891506f6869526d46e96ff23d3b7b8f7ed96c9 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 29 Oct 2015 01:11:28 -0700 Subject: Do not stop build-all after a failed sample. Instead, continue until the end and provide a summary (PASS/XFAIL/FAIL) at the end. If there are any FAILs, exit with code 1. Signed-off-by: Alexey Neyman diff --git a/samples/samples.mk b/samples/samples.mk index 48f4a74..7f5a36c 100644 --- a/samples/samples.mk +++ b/samples/samples.mk @@ -189,8 +189,16 @@ define build_sample $(SILENT)if [ ! -z "$(call host_triplet,$(1))" -a -d "$(call prefix_dir,$(call host_triplet,$(1)))" ]; then \ PATH="$$PATH:$(call prefix_dir,$(call host_triplet,$(1)))/bin"; \ fi; \ - $(MAKE) -rf $(CT_NG) V=0 build - @printf '\r' + if $(MAKE) -rf $(CT_NG) V=0 build; then \ + status=PASS; \ + elif [ -e $(call sample_dir,$(1))/broken ]; then \ + status=XFAIL; \ + else \ + status=FAIL; \ + fi; \ + printf '\r %-5s %s\n' $$status '$(1)'; \ + mkdir -p .build-all/$$status/$(1); \ + bzip2 < build.log > .build-all/$$status/$(1)/build.log.bz2 endef # ---------------------------------------------------------- @@ -218,7 +226,27 @@ CT_SAMPLES_CANADIAN = $(strip $(foreach s,$(CT_SAMPLES),$(if $(findstring $(__co # Build all samples; first, build simple cross as canadian configurations may depend on # build-to-host cross being pre-built. -build-all: $(patsubst %,build-%,$(CT_SAMPLES_CROSS) $(CT_SAMPLES_CANADIAN)) +build-all: build-all-pre $(patsubst %,build-%,$(CT_SAMPLES_CROSS) $(CT_SAMPLES_CANADIAN)) + @echo + @if [ -d .build-all/PASS ]; then \ + echo 'Success:'; \ + (cd .build-all/PASS && ls | sed 's/^/ - /'); \ + echo; \ + fi + @if [ -d .build-all/XFAIL ]; then \ + echo 'Expected failure:'; \ + (cd .build-all/XFAIL && ls | sed 's/^/ - /'); \ + echo; \ + fi + @if [ -d .build-all/FAIL ]; then \ + echo 'Failure:'; \ + (cd .build-all/FAIL && ls | sed 's/^/ - /'); \ + echo; \ + fi + @[ ! -d .build-all/FAIL ] + +build-all-pre: + @rm -rf .build-all # Build all samples, overiding the number of // jobs per sample build-all.%: -- cgit v0.10.2-6-g49f6 From ce588c01d854ec5f3a8c2d180edc40b592ac2a2d Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 29 Oct 2015 16:20:47 -0700 Subject: Add new temp directory to .gitignore. Signed-off-by: Alexey Neyman diff --git a/.gitignore b/.gitignore index 7854d8b..1a510d7 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ build.log .build/ # .. and the legacy location targets/ +# .. and log for 'build-all' +.build-all -- cgit v0.10.2-6-g49f6 From 1ad356c1789523ea7124108db8fd4b834e50558d Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 29 Oct 2015 16:57:07 -0700 Subject: Clean up new .build-all directory. Signed-off-by: Alexey Neyman diff --git a/ct-ng.in b/ct-ng.in index 8a407ba..a056894 100644 --- a/ct-ng.in +++ b/ct-ng.in @@ -166,7 +166,7 @@ clean:: @$(ECHO) " CLEAN build dir" $(SILENT)[ ! -d targets ] || chmod -R u+w targets $(SILENT)[ ! -d .build ] || chmod -R u+w .build - $(SILENT)rm -rf targets .build + $(SILENT)rm -rf targets .build .build-all PHONY += distclean distclean:: clean -- cgit v0.10.2-6-g49f6 From 5844514e74eac69b71c1e1661676dd88e4450610 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 29 Oct 2015 19:34:24 -0700 Subject: Fix samples using GMP 4.3.2. Some older versions of configure (including the one in GMP 4.3.2) interpret the $ECHO environment variable as the `echo' utility to use. CT-NG sets the variable to `:' and exports it if V=0 or V=1 is supplied, breaking the samples using such configure. This currently includes bfin-unknown-linux-uclibc and powerpc-unknown-linux-uclibc. Also, correct the description of the V= variable - V=0 is *not* the default; in fact, default does not correspond to any of the V=[012] values. Signed-off-by: Alexey Neyman diff --git a/config/config.mk b/config/config.mk index 8cc2b15..669e157 100644 --- a/config/config.mk +++ b/config/config.mk @@ -50,12 +50,12 @@ config_files: $(STATIC_CONFIG_FILES) $(GEN_CONFIG_FILES) # Where to access to the source config files from config: - @$(ECHO) " LN config" + @$(CT_ECHO) " LN config" $(SILENT)ln -s $(CT_LIB_DIR)/config config # Where to store the generated config files into config.gen: - @$(ECHO) " MKDIR config.gen" + @$(CT_ECHO) " MKDIR config.gen" $(SILENT)mkdir -p config.gen #----------------------------------------------------------- @@ -74,34 +74,34 @@ DEBUGS = $(patsubst config/debug/%.in,%,$(DEBUG_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) - @$(ECHO) ' IN $(@)' + @$(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) - @$(ECHO) ' IN $(@)' + @$(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) - @$(ECHO) ' IN $(@)' + @$(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) - @$(ECHO) ' IN $(@)' + @$(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) - @$(ECHO) ' IN $(@)' + @$(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) - @$(ECHO) ' IN $(@)' + @$(CT_ECHO) ' IN $(@)' $(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh menu "$@" "Debug facilities" "DEBUG" "config/debug" $(DEBUGS) #----------------------------------------------------------- # Cleaning up the mess... clean:: - @$(ECHO) " CLEAN config" + @$(CT_ECHO) " CLEAN config" $(SILENT)rm -f config 2>/dev/null || true - @$(ECHO) " CLEAN config.gen" + @$(CT_ECHO) " CLEAN config.gen" $(SILENT)rm -rf config.gen diff --git a/ct-ng.in b/ct-ng.in index a056894..fee97c8 100644 --- a/ct-ng.in +++ b/ct-ng.in @@ -41,24 +41,24 @@ export CT_STOP:=$(STOP) export CT_RESTART:=$(RESTART) SILENT=@ -ECHO=echo +CT_ECHO=echo ifeq ($(strip $(origin V)),command line) ifeq ($(strip $(V)),0) SILENT=@ - ECHO=: + CT_ECHO=: else ifeq ($(strip $(V)),1) SILENT= - ECHO=: + CT_ECHO=: else ifeq ($(strip $(V)),2) SILENT= - ECHO=echo + CT_ECHO=echo endif # V == 2 endif # V== 1 endif # V == 0 endif # origin V -export V SILENT ECHO +export V SILENT CT_ECHO all: help @@ -122,7 +122,8 @@ help-config:: help-distrib:: help-env:: - @echo ' V=0|1|2 - 0 => show only human-readable messages (default)' + @echo ' V=0|1|2| - show only human-readable messages (default)' + @echo ' 0 => do not show commands or human-readable message' @echo ' 1 => show only the commands being executed' @echo ' 2 => show both' @@ -161,14 +162,14 @@ version: PHONY += clean clean:: - @$(ECHO) " CLEAN log" + @$(CT_ECHO) " CLEAN log" $(SILENT)rm -f build.log - @$(ECHO) " CLEAN build dir" + @$(CT_ECHO) " CLEAN build dir" $(SILENT)[ ! -d targets ] || chmod -R u+w targets $(SILENT)[ ! -d .build ] || chmod -R u+w .build $(SILENT)rm -rf targets .build .build-all PHONY += distclean distclean:: clean - @$(ECHO) " CLEAN .config" + @$(CT_ECHO) " CLEAN .config" $(SILENT)rm -f .config .config.* ..config* diff --git a/kconfig/kconfig.mk b/kconfig/kconfig.mk index f59de5a..3d330b4 100644 --- a/kconfig/kconfig.mk +++ b/kconfig/kconfig.mk @@ -21,23 +21,23 @@ MCONF := $(CT_LIB_DIR)/kconfig/mconf NCONF := $(CT_LIB_DIR)/kconfig/nconf menuconfig: - @$(ECHO) " CONF $(KCONFIG_TOP)" + @$(CT_ECHO) " CONF $(KCONFIG_TOP)" $(SILENT)$(MCONF) $(KCONFIG_TOP) nconfig: - @$(ECHO) " CONF $(KCONFIG_TOP)" + @$(CT_ECHO) " CONF $(KCONFIG_TOP)" $(SILENT)$(NCONF) $(KCONFIG_TOP) oldconfig: .config - @$(ECHO) " CONF $(KCONFIG_TOP)" + @$(CT_ECHO) " CONF $(KCONFIG_TOP)" $(SILENT)$(CONF) --silent$@ $(KCONFIG_TOP) savedefconfig: .config - @$(ECHO) ' GEN $@' + @$(CT_ECHO) ' GEN $@' $(SILENT)$(CONF) --savedefconfig=$${DEFCONFIG-defconfig} $(KCONFIG_TOP) defconfig: - @$(ECHO) ' CONF $@' + @$(CT_ECHO) ' CONF $@' $(SILENT)$(CONF) --defconfig=$${DEFCONFIG-defconfig} $(KCONFIG_TOP) # Always be silent, the stdout an be >.config diff --git a/samples/samples.mk b/samples/samples.mk index 7f5a36c..e9730de 100644 --- a/samples/samples.mk +++ b/samples/samples.mk @@ -117,7 +117,7 @@ $(patsubst %,wiki-%,$(CT_SAMPLES)): config_files PHONY += samples samples: - @$(ECHO) ' MKDIR $@' + @$(CT_ECHO) ' MKDIR $@' $(SILENT)mkdir -p $@ # Save a sample @@ -133,7 +133,7 @@ endef # How we do recall one sample PHONY += $(CT_SAMPLES) $(CT_SAMPLES): config_files - @$(ECHO) " CONF $(KCONFIG_TOP)" + @$(CT_ECHO) " CONF $(KCONFIG_TOP)" $(SILENT)$(CONF) --defconfig=$(call sample_dir,$@)/crosstool.config $(KCONFIG_TOP) @echo @echo '***********************************************************' @@ -176,7 +176,7 @@ host_triplet = $(if $(findstring $(__comma),$(1)),$(firstword $(subst $(__comma) # Create the rule to build a sample # $1: sample name (target tuple, or host/target tuples separated by a comma) define build_sample - @$(ECHO) ' CONF $(1)' + @$(CT_ECHO) ' CONF $(1)' $(SILENT)$(CONF) -s --defconfig=$(call sample_dir,$(1))/crosstool.config $(KCONFIG_TOP) $(SILENT)$(sed) -i -r -e 's:^(CT_PREFIX_DIR=).*$$:\1"$(call prefix_dir,$(1))":;' .config $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_(WARN|INFO|EXTRA|DEBUG|ALL)).*$$:# \1 is not set:;' .config @@ -185,7 +185,7 @@ define build_sample $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_TO_FILE).*$$:\1=y:;' .config $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_PROGRESS_BAR).*$$:\1=y:;' .config $(SILENT)$(CONF) -s --oldconfig $(KCONFIG_TOP) - @$(ECHO) ' BUILD $(1)' + @$(CT_ECHO) ' BUILD $(1)' $(SILENT)if [ ! -z "$(call host_triplet,$(1))" -a -d "$(call prefix_dir,$(call host_triplet,$(1)))" ]; then \ PATH="$$PATH:$(call prefix_dir,$(call host_triplet,$(1)))/bin"; \ fi; \ diff --git a/scripts/scripts.mk b/scripts/scripts.mk index 8373f9b..77368a7 100644 --- a/scripts/scripts.mk +++ b/scripts/scripts.mk @@ -33,16 +33,16 @@ endif PHONY += scripts scripts: - @$(ECHO) ' MKDIR $@' + @$(CT_ECHO) ' MKDIR $@' $(SILENT)mkdir -p $@ $(CONFIG_SUB_DEST): scripts FORCE - @$(ECHO) ' WGET $@' + @$(CT_ECHO) ' WGET $@' $(SILENT)wget $(wget_opt) -O $@ $(CONFIG_SUB_SRC) $(SILENT)chmod u+rwx,go+rx-w $@ $(CONFIG_GUESS_DEST): scripts FORCE - @$(ECHO) ' WGET $@' + @$(CT_ECHO) ' WGET $@' $(SILENT)wget $(wget_opt) -O $@ $(CONFIG_GUESS_SRC) $(SILENT)chmod u+rwx,go+rx-w $@ @@ -50,5 +50,5 @@ $(CONFIG_GUESS_DEST): scripts FORCE # Clean up the mess distclean:: - @$(ECHO) " CLEAN scripts" + @$(CT_ECHO) " CLEAN scripts" $(SILENT)[ $(CT_TOP_DIR) = $(CT_LIB_DIR) ] || rm -rf $(CT_TOP_DIR)/scripts -- cgit v0.10.2-6-g49f6 From b2f8afef8532247c60764fffc938898903c06a4c Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 29 Oct 2015 20:58:52 -0700 Subject: Interpret escape sequences in CT_DoLog. Otherwise, CT_Abort messages with \n are not displayed properly. Signed-off-by: Alexey Neyman diff --git a/scripts/functions b/scripts/functions index 91ec217..2261b8d 100644 --- a/scripts/functions +++ b/scripts/functions @@ -178,7 +178,7 @@ CT_DoLog() { if [ $# -eq 0 ]; then cat - else - printf "%s\n" "${*}" + echo -e "${*}" fi |( IFS="${CR}" # We want the full lines, even leading spaces _prog_bar_cpt=0 _prog_bar[0]='/' -- cgit v0.10.2-6-g49f6