All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [pull request v2] Pull request for branch yem-instrument-build
@ 2013-01-20 16:03 Yann E. MORIN
  2013-01-20 16:03 ` [Buildroot] [PATCH 1/7] toolchain/external: sprinkle with some calls to MESSAGE Yann E. MORIN
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Yann E. MORIN @ 2013-01-20 16:03 UTC (permalink / raw)
  To: buildroot

Hello All!

This series adds some intrumentation to the pkg-infra so that it is easier
for the autobuilders to extract meaningfull information about the reason
of failures.

It does so by:
  - logging all messages displayed with calls to MESSAGE to a time-stamped
    log file
  - log the last such mesage to a file
  - add calls to MESSAGE in the non-package steps of the external toolchain
    backend
  - add calls to MESSAGE in the non-package steps of the crosstool-NG
    toolchain backend
  - add calls to MESSAGE in the non-package steps of the internal toolchain
    backend (gcc, kernel headers, and uClibc)

Although I've tested it with external and internal toolchain backends (not
crosstool-NG for now), and although it does work, I expect some polishing
to be required. 

So, take this series as a kind of RFC, rather than a final series.


Changes v1 -> v2:
  - invert the patches ordering for easier upstreaming (Thomas)
  - include Arnout's fixes against the filesystem infra (Arnout)
    (with a few fixes for "no newline at end of file" by me)
  - eye-candy fixes in displayed messages (Arnout)


The following changes since commit ad0279f0ee51e97bf7dbb70fdd6f14f789f344a8:

  gettext: fix static build failure (2013-01-20 09:54:25 +0100)

are available in the git repository at:
  git://gitorious.org/buildroot/buildroot.git yem-instrument-build

Yann E. MORIN (7):
      toolchain/external: sprinkle with some calls to MESSAGE
      toolchain/crosstool-ng: sprinkle with some calls to MESSAGE
      toolchain/gcc: sprinkle with some calls to MESSAGE
      toolchain/kernel-headers: sprinkle with some calls to MESSAGE
      toolchain/uClibc: sprinkle with some calls to MESSAGE
      fs/common.mk: delay evaluation of variables.
      pkg-infra: log current message

 fs/cloop/cloop.mk                                |    4 +-
 fs/common.mk                                     |   44 +++++++++++-----------
 fs/cpio/cpio.mk                                  |    2 +-
 fs/cramfs/cramfs.mk                              |    2 +-
 fs/ext2/ext2.mk                                  |    2 +-
 fs/jffs2/jffs2.mk                                |    8 ++--
 fs/romfs/romfs.mk                                |    4 +-
 fs/squashfs/squashfs.mk                          |    4 +-
 fs/tar/tar.mk                                    |    2 +-
 fs/ubifs/ubi.mk                                  |    4 +-
 fs/ubifs/ubifs.mk                                |    4 +-
 package/pkg-utils.mk                             |    9 ++++-
 toolchain/gcc/gcc-uclibc-4.x.mk                  |   16 ++++++++
 toolchain/kernel-headers/kernel-headers.mk       |    4 ++
 toolchain/toolchain-crosstool-ng/crosstool-ng.mk |    5 +-
 toolchain/toolchain-external/ext-tool.mk         |    8 ++-
 toolchain/uClibc/uclibc.mk                       |   13 ++++++
 17 files changed, 88 insertions(+), 47 deletions(-)

Regards,
Yann E. MORIN

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 1/7] toolchain/external: sprinkle with some calls to MESSAGE
  2013-01-20 16:03 [Buildroot] [pull request v2] Pull request for branch yem-instrument-build Yann E. MORIN
@ 2013-01-20 16:03 ` Yann E. MORIN
  2013-01-20 16:03 ` [Buildroot] [PATCH 2/7] toolchain/crosstool-ng: " Yann E. MORIN
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2013-01-20 16:03 UTC (permalink / raw)
  To: buildroot

Thus, the failing step can be easily extracted by autobuilders,
to ease with post-mortem analysis.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 toolchain/toolchain-external/ext-tool.mk |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 649e3a3..b0ca3cd 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -325,7 +325,7 @@ endif
 # matches the configuration provided in Buildroot: ABI, C++ support,
 # type of C library and all C library features.
 $(STAMP_DIR)/ext-toolchain-checked: $(TOOLCHAIN_EXTERNAL_DEPENDENCIES)
-	@echo "Checking external toolchain settings"
+	@$(call MESSAGE,"Checking external toolchain settings")
 	$(Q)$(call check_cross_compiler_exists,$(TOOLCHAIN_EXTERNAL_CC))
 	$(Q)LIBC_A_LOCATION=`readlink -f $$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) -print-file-name=libc.a)` ; \
 	SYSROOT_DIR=`echo $${LIBC_A_LOCATION} | sed -r -e 's:usr/lib(64)?/(.*/)?libc\.a::'` ; \
@@ -414,7 +414,7 @@ $(STAMP_DIR)/ext-toolchain-installed: $(STAMP_DIR)/ext-toolchain-checked
 	ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \
 	mkdir -p $(TARGET_DIR)/lib ; \
 	if test -z "$(BR2_PREFER_STATIC_LIB)" ; then \
-		echo "Copy external toolchain libraries to target..." ; \
+		$(call MESSAGE,"Copying external toolchain libraries to target...") ; \
 		for libs in $(LIB_EXTERNAL_LIBS); do \
 			$(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$${SUPPORT_LIB_DIR},$${ARCH_LIB_DIR},$$libs,/lib); \
 		done ; \
@@ -422,12 +422,13 @@ $(STAMP_DIR)/ext-toolchain-installed: $(STAMP_DIR)/ext-toolchain-checked
 			$(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$${SUPPORT_LIB_DIR},$${ARCH_LIB_DIR},$$libs,/usr/lib); \
 		done ; \
 	fi ; \
-	echo "Copy external toolchain sysroot to staging..." ; \
+	$(call MESSAGE,"Copying external toolchain sysroot to staging...") ; \
 	$(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR},$${ARCH_LIB_DIR},$${SUPPORT_LIB_DIR}) ; \
 	if [ -L $${ARCH_SYSROOT_DIR}/lib64 ] ; then \
 		$(call create_lib64_symlinks) ; \
 	fi ; \
 	if test x"$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY)" == x"y"; then \
+		$(call MESSAGE,"Copying gdbserver") ; \
 		gdbserver_found=0 ; \
 		for d in $${ARCH_SYSROOT_DIR} $${ARCH_SYSROOT_DIR}/../debug-root/ ; do \
 			if test -f $${d}/usr/bin/gdbserver ; then \
@@ -446,6 +447,7 @@ $(STAMP_DIR)/ext-toolchain-installed: $(STAMP_DIR)/ext-toolchain-checked
 # Build toolchain wrapper for preprocessor, C and C++ compiler, and setup
 # symlinks for everything else
 $(HOST_DIR)/usr/bin/ext-toolchain-wrapper: $(STAMP_DIR)/ext-toolchain-installed
+	$(Q)$(call MESSAGE,"Building ext-toolchain wrapper")
 	mkdir -p $(HOST_DIR)/usr/bin; cd $(HOST_DIR)/usr/bin; \
 	for i in $(TOOLCHAIN_EXTERNAL_CROSS)*; do \
 		base=$${i##*/}; \
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 2/7] toolchain/crosstool-ng: sprinkle with some calls to MESSAGE
  2013-01-20 16:03 [Buildroot] [pull request v2] Pull request for branch yem-instrument-build Yann E. MORIN
  2013-01-20 16:03 ` [Buildroot] [PATCH 1/7] toolchain/external: sprinkle with some calls to MESSAGE Yann E. MORIN
@ 2013-01-20 16:03 ` Yann E. MORIN
  2013-01-20 16:03 ` [Buildroot] [PATCH 3/7] toolchain/gcc: " Yann E. MORIN
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2013-01-20 16:03 UTC (permalink / raw)
  To: buildroot

Thus, the failing step can be easily extracted by autobuilders,
to ease with post-mortem analysis.

At the same time, remove two debug echoes (Arnout).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 toolchain/toolchain-crosstool-ng/crosstool-ng.mk |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
index c09f732..6554982 100644
--- a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
+++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
@@ -68,9 +68,7 @@ $(STAMP_DIR)/ct-ng-toolchain-installed: $(STAMP_DIR)/ct-ng-toolchain-built
 	$(Q)mkdir -p $(TARGET_DIR)/lib
 	$(Q)CTNG_TUPLE="$$( $(call ctng,show-tuple 2>&1) )";                \
 	    CTNG_SYSROOT="$(HOST_DIR)/usr/$${CTNG_TUPLE}/sysroot";          \
-	    echo "CTNG_TUPLE='$${CTNG_TUPLE}'";                             \
-	    echo "CTNG_SYSROOT='$${CTNG_SYSROOT}'";                         \
-	    echo "Copy external toolchain libraries to target...";          \
+	    $(call MESSAGE,"Copying toolchain libraries to target...");     \
 	    for libs in $(CTNG_LIBS_LIB); do                                \
 	        $(call copy_toolchain_lib_root,$${CTNG_SYSROOT},,lib,$$libs,/lib); \
 	    done;                                                           \
@@ -85,6 +83,7 @@ $(STAMP_DIR)/ct-ng-toolchain-installed: $(STAMP_DIR)/ct-ng-toolchain-built
 #       depending on the selected C library. Those deps are added later
 
 $(STAMP_DIR)/ct-ng-toolchain-built: $(CTNG_DIR)/.config
+	$(Q)$(call MESSAGE,"Building the crosstool-NG toolchain")
 	$(Q)$(call ctng,build.$(PARALLEL_JOBS))
 	$(Q)printf "\n"
 	$(Q)touch $@
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 3/7] toolchain/gcc: sprinkle with some calls to MESSAGE
  2013-01-20 16:03 [Buildroot] [pull request v2] Pull request for branch yem-instrument-build Yann E. MORIN
  2013-01-20 16:03 ` [Buildroot] [PATCH 1/7] toolchain/external: sprinkle with some calls to MESSAGE Yann E. MORIN
  2013-01-20 16:03 ` [Buildroot] [PATCH 2/7] toolchain/crosstool-ng: " Yann E. MORIN
@ 2013-01-20 16:03 ` Yann E. MORIN
  2013-01-20 16:03 ` [Buildroot] [PATCH 4/7] toolchain/kernel-headers: " Yann E. MORIN
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2013-01-20 16:03 UTC (permalink / raw)
  To: buildroot

Thus, the failing step can be easily extracted by autobuilders,
to ease with post-mortem analysis.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 toolchain/gcc/gcc-uclibc-4.x.mk |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index b0d741b..bdc38cd 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -243,10 +243,12 @@ endif
 
 $(DL_DIR)/$(GCC_SOURCE):
 	mkdir -p $(DL_DIR)
+	$(call MESSAGE,"Downloading gcc")
 	$(call DOWNLOAD,$(GCC_SITE)/$(GCC_SOURCE))
 
 gcc-unpacked: $(GCC_DIR)/.patched
 $(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE)
+	$(Q)$(call MESSAGE,"Extracting gcc")
 	mkdir -p $(TOOLCHAIN_DIR)
 	rm -rf $(GCC_DIR)
 	$(GCC_CAT) $(DL_DIR)/$(GCC_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) -
@@ -259,6 +261,7 @@ endif
 
 gcc-patched: $(GCC_DIR)/.patched
 $(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked
+	$(Q)$(call MESSAGE,"Patching gcc")
 	# Apply any files named gcc-*.patch from the source directory to gcc
 ifneq ($(wildcard $(GCC_PATCH_DIR)),)
 	support/scripts/apply-patches.sh $(GCC_DIR) $(GCC_PATCH_DIR) \*.patch
@@ -279,6 +282,7 @@ endif
 GCC_BUILD_DIR1:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION)-initial
 
 $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched
+	$(Q)$(call MESSAGE,"Configuring gcc pass-1")
 	mkdir -p $(GCC_BUILD_DIR1)
 	(cd $(GCC_BUILD_DIR1); rm -rf config.cache; \
 		$(HOST_CONFIGURE_OPTS) \
@@ -314,6 +318,7 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched
 	touch $@
 
 $(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured
+	$(Q)$(call MESSAGE,"Building gcc pass-1")
 ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y)
 	$(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR1) all-gcc
 else
@@ -323,6 +328,7 @@ endif
 
 gcc_initial=$(GCC_BUILD_DIR1)/.installed
 $(gcc_initial) $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc: $(GCC_BUILD_DIR1)/.compiled
+	$(Q)$(call MESSAGE,"Installing gcc pass-1")
 	PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR1) install-gcc
 	touch $(gcc_initial)
 
@@ -346,6 +352,7 @@ GCC_BUILD_DIR2:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION)-intermediate
 # the step or libgcc will not build...
 
 $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched
+	$(Q)$(call MESSAGE,"Configuring gcc pass-2")
 	mkdir -p $(GCC_BUILD_DIR2)
 	(cd $(GCC_BUILD_DIR2); rm -rf config.cache; \
 		$(HOST_CONFIGURE_OPTS) \
@@ -380,6 +387,7 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched
 	touch $@
 
 $(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured
+	$(Q)$(call MESSAGE,"Building gcc pass-2")
 	# gcc >= 4.3.0 have to also build all-target-libgcc
 ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y)
 	$(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR2) all-gcc all-target-libgcc
@@ -390,6 +398,7 @@ endif
 
 gcc_intermediate=$(GCC_BUILD_DIR2)/.installed
 $(gcc_intermediate): $(GCC_BUILD_DIR2)/.compiled
+	$(Q)$(call MESSAGE,"Installing gcc pass-2")
 	# gcc >= 4.3.0 have to also install install-target-libgcc
 ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y)
 	PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) install-gcc install-target-libgcc
@@ -421,6 +430,7 @@ gcc_intermediate-dirclean:
 
 GCC_BUILD_DIR3:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION)-final
 $(GCC_BUILD_DIR3)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ)
+	$(Q)$(call MESSAGE,"Configuring gcc final")
 	mkdir -p $(GCC_BUILD_DIR3)
 	# Important! Required for limits.h to be fixed.
 	ln -snf ../include/ $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/sys-include
@@ -457,10 +467,12 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ)
 	touch $@
 
 $(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
+	$(Q)$(call MESSAGE,"Building gcc final")
 	$(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR3) all
 	touch $@
 
 $(GCC_BUILD_DIR3)/.installed: $(GCC_BUILD_DIR3)/.compiled
+	$(Q)$(call MESSAGE,"Installing gcc final")
 	PATH=$(TARGET_PATH) $(MAKE) \
 		-C $(GCC_BUILD_DIR3) install
 	if [ -d "$(STAGING_DIR)/lib64" ]; then \
@@ -492,6 +504,7 @@ endif
 	touch $@
 
 $(STAMP_DIR)/gcc_libs_target_installed: $(GCC_BUILD_DIR3)/.installed
+	$(Q)$(call MESSAGE,"Installing gcc final libraries to staging and target")
 ifeq ($(BR2_GCC_SHARED_LIBGCC),y)
 	# These go in /lib, so...
 	rm -rf $(TARGET_DIR)/usr/lib/libgcc_s*.so*
@@ -548,6 +561,7 @@ $(GCC_BUILD_DIR4)/.prepared: $(STAMP_DIR)/gcc_libs_target_installed
 	touch $@
 
 $(GCC_BUILD_DIR4)/.configured: $(GCC_BUILD_DIR4)/.prepared
+	$(Q)$(call MESSAGE,"Configuring gcc on target")
 	(cd $(GCC_BUILD_DIR4); rm -rf config.cache; \
 		$(TARGET_CONFIGURE_OPTS) \
 		$(TARGET_CONFIGURE_ARGS) \
@@ -586,6 +600,7 @@ $(GCC_BUILD_DIR4)/.configured: $(GCC_BUILD_DIR4)/.prepared
 	touch $@
 
 $(GCC_BUILD_DIR4)/.compiled: $(GCC_BUILD_DIR4)/.configured
+	$(Q)$(call MESSAGE,"Building gcc on target")
 	PATH=$(TARGET_PATH) \
 	$(MAKE) -C $(GCC_BUILD_DIR4) all
 	touch $@
@@ -598,6 +613,7 @@ GCC_INCLUDE_DIR:=include-fixed
 endif
 
 $(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR4)/.compiled
+	$(Q)$(call MESSAGE,"Installing gcc on target")
 	PATH=$(TARGET_PATH) DESTDIR=$(TARGET_DIR) \
 		$(MAKE1) -C $(GCC_BUILD_DIR4) install
 	# Remove broken specs file (cross compile flag is set).
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 4/7] toolchain/kernel-headers: sprinkle with some calls to MESSAGE
  2013-01-20 16:03 [Buildroot] [pull request v2] Pull request for branch yem-instrument-build Yann E. MORIN
                   ` (2 preceding siblings ...)
  2013-01-20 16:03 ` [Buildroot] [PATCH 3/7] toolchain/gcc: " Yann E. MORIN
@ 2013-01-20 16:03 ` Yann E. MORIN
  2013-01-20 16:03 ` [Buildroot] [PATCH 5/7] toolchain/uClibc: " Yann E. MORIN
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2013-01-20 16:03 UTC (permalink / raw)
  To: buildroot

Thus, the failing step can be easily extracted by autobuilders,
to ease with post-mortem analysis.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 toolchain/kernel-headers/kernel-headers.mk |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/toolchain/kernel-headers/kernel-headers.mk b/toolchain/kernel-headers/kernel-headers.mk
index 568c192..76602d8 100644
--- a/toolchain/kernel-headers/kernel-headers.mk
+++ b/toolchain/kernel-headers/kernel-headers.mk
@@ -48,6 +48,7 @@ endif
 LINUX_HEADERS_DEPENDS:=
 
 $(LINUX_HEADERS_UNPACK_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE)
+	$(Q)$(call MESSAGE,"Extracting kernel headers")
 	rm -rf $(LINUX_HEADERS_DIR)
 	$(INSTALL) -d $(@D)
 	$(LINUX_HEADERS_CAT) $(DL_DIR)/$(LINUX_HEADERS_SOURCE) | \
@@ -55,6 +56,7 @@ $(LINUX_HEADERS_UNPACK_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE)
 	touch $@
 
 $(LINUX_HEADERS_UNPACK_DIR)/.patched: $(LINUX_HEADERS_UNPACK_DIR)/.unpacked $(LINUX_HEADERS_DEPENDS)
+	$(Q)$(call MESSAGE,"Patching kernel headers")
 	support/scripts/apply-patches.sh $(LINUX_HEADERS_UNPACK_DIR) toolchain/kernel-headers \
 		linux-$(LINUX_HEADERS_VERSION)-\*.patch{,.gz,.bz2}
 ifneq ($(KERNEL_HEADERS_PATCH_DIR),)
@@ -64,6 +66,7 @@ endif
 	touch $@
 
 $(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_UNPACK_DIR)/.patched
+	$(Q)$(call MESSAGE,"Installing kernel headers")
 	(cd $(LINUX_HEADERS_UNPACK_DIR); \
 	 $(MAKE) ARCH=$(KERNEL_ARCH) \
 		HOSTCC="$(HOSTCC)" HOSTCFLAGS="$(HOSTCFLAGS)" \
@@ -76,6 +79,7 @@ $(DL_DIR)/$(LINUX_HEADERS_SOURCE):
 ifeq ($(BR2_KERNEL_HEADERS_SNAP),y)
 	$(error No local $@ found, cannot continue. Are you sure you wanted to enable BR2_KERNEL_HEADERS_SNAP?)
 endif
+	$(call MESSAGE,"Downloading kernel headers")
 	$(call DOWNLOAD,$(LINUX_HEADERS_SITE)/$(LINUX_HEADERS_SOURCE))
 
 kernel-headers: $(LINUX_HEADERS_DIR)/.configured
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 5/7] toolchain/uClibc: sprinkle with some calls to MESSAGE
  2013-01-20 16:03 [Buildroot] [pull request v2] Pull request for branch yem-instrument-build Yann E. MORIN
                   ` (3 preceding siblings ...)
  2013-01-20 16:03 ` [Buildroot] [PATCH 4/7] toolchain/kernel-headers: " Yann E. MORIN
@ 2013-01-20 16:03 ` Yann E. MORIN
  2013-01-20 16:03 ` [Buildroot] [PATCH 6/7] fs/common.mk: delay evaluation of variables Yann E. MORIN
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2013-01-20 16:03 UTC (permalink / raw)
  To: buildroot

Thus, the failing step can be easily extracted by autobuilders,
to ease with post-mortem analysis.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 toolchain/uClibc/uclibc.mk |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index 055267c..1b49a8d 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -62,10 +62,12 @@ UCLIBC_LOCALES = $(foreach locale,$(GENERATE_LOCALE),\
 endif
 
 $(DL_DIR)/$(UCLIBC_SOURCE):
+	$(call MESSAGE,"Downloading uClibc")
 	$(call DOWNLOAD,$(UCLIBC_SITE)/$(UCLIBC_SOURCE))
 
 uclibc-unpacked: $(UCLIBC_DIR)/.unpacked
 $(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE)
+	$(Q)$(call MESSAGE,"Extracting uClibc")
 	mkdir -p $(TOOLCHAIN_DIR)
 	rm -rf $(UCLIBC_DIR)
 	$(UCLIBC_CAT) $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) -
@@ -73,6 +75,7 @@ $(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE)
 
 uclibc-patched: $(UCLIBC_DIR)/.patched
 $(UCLIBC_DIR)/.patched: $(UCLIBC_DIR)/.unpacked
+	$(Q)$(call MESSAGE,"Patching uClibc")
 ifneq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y)
 	support/scripts/apply-patches.sh $(UCLIBC_DIR) $(UCLIBC_PATCH_DIR) \
 		uClibc-$(UCLIBC_VERSION)-\*.patch \
@@ -86,6 +89,7 @@ endif
 
 # Some targets may wish to provide their own UCLIBC_CONFIG_FILE...
 $(UCLIBC_DIR)/.oldconfig: $(UCLIBC_DIR)/.patched $(UCLIBC_CONFIG_FILE)
+	$(Q)$(call MESSAGE,"Pre-configuring uClibc")
 	cp -f $(UCLIBC_CONFIG_FILE) $(UCLIBC_DIR)/.oldconfig
 	$(SED) 's,^CROSS_COMPILER_PREFIX=.*,CROSS_COMPILER_PREFIX="$(TARGET_CROSS)",g' \
 		-e 's,# TARGET_$(UCLIBC_TARGET_ARCH) is not set,TARGET_$(UCLIBC_TARGET_ARCH)=y,g' \
@@ -370,6 +374,7 @@ endif
 endif
 
 $(UCLIBC_DIR)/.config: $(UCLIBC_DIR)/.oldconfig
+	$(Q)$(call MESSAGE,"Configuring uClibc")
 	cp -f $(UCLIBC_DIR)/.oldconfig $(UCLIBC_DIR)/.config
 	mkdir -p $(TOOLCHAIN_DIR)/uClibc_dev/usr/include
 	mkdir -p $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib
@@ -393,6 +398,7 @@ $(UCLIBC_DIR)/.config: | host-ccache
 endif
 
 $(UCLIBC_DIR)/.configured: $(LINUX_HEADERS_DIR)/.configured $(UCLIBC_DIR)/.config
+	$(Q)$(call MESSAGE,"Installing uClibc headers")
 	$(MAKE1) -C $(UCLIBC_DIR) \
 		ARCH="$(UCLIBC_TARGET_ARCH)" \
 		PREFIX=$(TOOLCHAIN_DIR)/uClibc_dev/ \
@@ -415,6 +421,7 @@ $(UCLIBC_DIR)/.configured: $(LINUX_HEADERS_DIR)/.configured $(UCLIBC_DIR)/.confi
 	touch $@
 
 $(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured $(gcc_intermediate) $(LIBFLOAT_TARGET)
+	$(Q)$(call MESSAGE,"Building uClibc")
 	$(MAKE1) -C $(UCLIBC_DIR) \
 		ARCH="$(UCLIBC_TARGET_ARCH)" \
 		PREFIX= \
@@ -440,6 +447,7 @@ uclibc-menuconfig: dirs $(UCLIBC_DIR)/.config
 
 
 $(STAGING_DIR)/usr/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a
+	$(Q)$(call MESSAGE,"Installing uClibc to staging dir")
 	$(MAKE1) -C $(UCLIBC_DIR) \
 		ARCH="$(UCLIBC_TARGET_ARCH)" \
 		PREFIX=$(STAGING_DIR) \
@@ -470,6 +478,7 @@ $(STAGING_DIR)/usr/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a
 
 ifneq ($(TARGET_DIR),)
 $(TARGET_DIR)/lib/libc.so.0: $(STAGING_DIR)/usr/lib/libc.a
+	$(Q)$(call MESSAGE,"Installing uClibc runtime to target dir")
 	$(MAKE1) -C $(UCLIBC_DIR) \
 		ARCH="$(UCLIBC_TARGET_ARCH)" \
 		PREFIX=$(TARGET_DIR) \
@@ -481,6 +490,7 @@ $(TARGET_DIR)/lib/libc.so.0: $(STAGING_DIR)/usr/lib/libc.a
 	touch -c $@
 
 $(TARGET_DIR)/usr/bin/ldd: $(cross_compiler)
+	$(Q)$(call MESSAGE,"Installing uClibc utils to target dir")
 	$(MAKE1) -C $(UCLIBC_DIR) CC=$(TARGET_CROSS)gcc \
 		CPP=$(TARGET_CROSS)cpp LD=$(TARGET_CROSS)ld \
 		ARCH="$(UCLIBC_TARGET_ARCH)" \
@@ -525,11 +535,13 @@ uclibc-target-utils: $(TARGET_DIR)/usr/bin/ldd
 uclibc-target-utils-source: $(DL_DIR)/$(UCLIBC_SOURCE)
 
 $(UCLIBC_DIR)/test/unistd/errno:
+	$(Q)$(call MESSAGE,"Building uClibc test suite")
 	$(MAKE) -C $(UCLIBC_DIR)/test \
 	ARCH_CFLAGS=-I$(STAGING_DIR)/usr/include \
 	UCLIBC_ONLY=1 TEST_INSTALLED_UCLIBC=1 compile
 
 $(TARGET_DIR)/root/uClibc/test/unistd/errno: $(UCLIBC_DIR)/test/unistd/errno
+	$(Q)$(call MESSAGE,"Installing uClibc test suite to target dir")
 	mkdir -p $(TARGET_DIR)/root/uClibc
 	cp -rdpf $(UCLIBC_DIR)/test $(TARGET_DIR)/root/uClibc
 	$(INSTALL) $(UCLIBC_DIR)/Rules.mak $(TARGET_DIR)/root/uClibc
@@ -554,6 +566,7 @@ uclibc-test-dirclean:
 #############################################################
 
 $(TARGET_DIR)/usr/lib/libc.a: $(STAGING_DIR)/usr/lib/libc.a
+	$(Q)$(call MESSAGE,"Installing uClibc development files to target dir")
 	$(MAKE1) -C $(UCLIBC_DIR) \
 		ARCH="$(UCLIBC_TARGET_ARCH)" \
 		PREFIX=$(TARGET_DIR) \
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 6/7] fs/common.mk: delay evaluation of variables.
  2013-01-20 16:03 [Buildroot] [pull request v2] Pull request for branch yem-instrument-build Yann E. MORIN
                   ` (4 preceding siblings ...)
  2013-01-20 16:03 ` [Buildroot] [PATCH 5/7] toolchain/uClibc: " Yann E. MORIN
@ 2013-01-20 16:03 ` Yann E. MORIN
  2013-01-20 16:03 ` [Buildroot] [PATCH 7/7] pkg-infra: log current message Yann E. MORIN
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2013-01-20 16:03 UTC (permalink / raw)
  To: buildroot

This makes things easier to understand and more consistent with the pkg-infra.
For example, it removes the need for '$$@' in the CMD variables of fs/*/*.mk.

It also makes it possible to update the variables later, e.g. in the package
override file.

It also makes sure that the date will be recorded correctly in Yann E. Morin's
patch that logs the MESSAGE macros to a file.

The fs/*/*.mk must be updated as well because the '$@' shouldn't be quoted
anymore in the CMD variables or the hooks.

The $(eval ...) for the dependencies is redundant, because the $(ROOTFS_TARGET)
variable is already eval'd. Note that it is only redundant if the evaluation of
the uses of the variable is also delayed.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[yann.morin.1998 at free.fr: fix some "no newline at end of file"]
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 fs/cloop/cloop.mk       |    4 ++--
 fs/common.mk            |   44 ++++++++++++++++++++++----------------------
 fs/cpio/cpio.mk         |    2 +-
 fs/cramfs/cramfs.mk     |    2 +-
 fs/ext2/ext2.mk         |    2 +-
 fs/jffs2/jffs2.mk       |    8 ++++----
 fs/romfs/romfs.mk       |    4 ++--
 fs/squashfs/squashfs.mk |    4 ++--
 fs/tar/tar.mk           |    2 +-
 fs/ubifs/ubi.mk         |    4 ++--
 fs/ubifs/ubifs.mk       |    4 ++--
 11 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/fs/cloop/cloop.mk b/fs/cloop/cloop.mk
index c1d6abb..7c22bcf 100644
--- a/fs/cloop/cloop.mk
+++ b/fs/cloop/cloop.mk
@@ -7,7 +7,7 @@
 ROOTFS_CLOOP_DEPENDENCIES = host-cloop host-cdrkit
 
 define ROOTFS_CLOOP_CMD
-	$(HOST_DIR)/usr/bin/genisoimage -r $(TARGET_DIR) | $(HOST_DIR)/usr/bin/create_compressed_fs - 65536 > $$@
+	$(HOST_DIR)/usr/bin/genisoimage -r $(TARGET_DIR) | $(HOST_DIR)/usr/bin/create_compressed_fs - 65536 > $@
 endef
 
-$(eval $(call ROOTFS_TARGET,cloop))
\ No newline at end of file
+$(eval $(call ROOTFS_TARGET,cloop))
diff --git a/fs/common.mk b/fs/common.mk
index b1512dd..8b5b2f2 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -39,28 +39,28 @@ ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE)) \
 define ROOTFS_TARGET_INTERNAL
 
 # extra deps
-$(eval ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs $(if $(BR2_TARGET_ROOTFS_$(2)_LZMA),host-lzma))
+ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs $$(if $$(BR2_TARGET_ROOTFS_$(2)_LZMA),host-lzma)
 
-$(BINARIES_DIR)/rootfs.$(1): $(ROOTFS_$(2)_DEPENDENCIES)
-	@$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
-	$(foreach hook,$(ROOTFS_$(2)_PRE_GEN_HOOKS),$(call $(hook))$(sep))
-	rm -f $(FAKEROOT_SCRIPT)
-	rm -f $(TARGET_DIR_WARNING_FILE)
-	echo "chown -R 0:0 $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
-ifneq ($(ROOTFS_DEVICE_TABLES),)
-	cat $(ROOTFS_DEVICE_TABLES) > $(FULL_DEVICE_TABLE)
-ifeq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
-	printf '$(subst $(sep),\n,$(PACKAGES_DEVICES_TABLE))' >> $(FULL_DEVICE_TABLE)
+$$(BINARIES_DIR)/rootfs.$(1): $$(ROOTFS_$(2)_DEPENDENCIES)
+	@$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
+	$$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),$$(call $$(hook))$$(sep))
+	rm -f $$(FAKEROOT_SCRIPT)
+	rm -f $$(TARGET_DIR_WARNING_FILE)
+	echo "chown -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
+ifneq ($$(ROOTFS_DEVICE_TABLES),)
+	cat $$(ROOTFS_DEVICE_TABLES) > $$(FULL_DEVICE_TABLE)
+ifeq ($$(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
+	printf '$$(subst $$(sep),\n,$$(PACKAGES_DEVICES_TABLE))' >> $$(FULL_DEVICE_TABLE)
 endif
-	printf '$(subst $(sep),\n,$(PACKAGES_PERMISSIONS_TABLE))' >> $(FULL_DEVICE_TABLE)
-	echo "$(HOST_DIR)/usr/bin/makedevs -d $(FULL_DEVICE_TABLE) $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
+	printf '$$(subst $$(sep),\n,$$(PACKAGES_PERMISSIONS_TABLE))' >> $$(FULL_DEVICE_TABLE)
+	echo "$$(HOST_DIR)/usr/bin/makedevs -d $$(FULL_DEVICE_TABLE) $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
 endif
-	echo "$(ROOTFS_$(2)_CMD)" >> $(FAKEROOT_SCRIPT)
-	chmod a+x $(FAKEROOT_SCRIPT)
-	$(HOST_DIR)/usr/bin/fakeroot -- $(FAKEROOT_SCRIPT)
-	cp support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE)
-	- at rm -f $(FAKEROOT_SCRIPT) $(FULL_DEVICE_TABLE)
-	$(foreach hook,$(ROOTFS_$(2)_POST_GEN_HOOKS),$(call $(hook))$(sep))
+	echo "$$(ROOTFS_$(2)_CMD)" >> $$(FAKEROOT_SCRIPT)
+	chmod a+x $$(FAKEROOT_SCRIPT)
+	$$(HOST_DIR)/usr/bin/fakeroot -- $$(FAKEROOT_SCRIPT)
+	cp support/misc/target-dir-warning.txt $$(TARGET_DIR_WARNING_FILE)
+	- at rm -f $$(FAKEROOT_SCRIPT) $$(FULL_DEVICE_TABLE)
+	$$(foreach hook,$$(ROOTFS_$(2)_POST_GEN_HOOKS),$$(call $$(hook))$$(sep))
 ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y)
 	gzip -9 -c $$@ > $$@.gz
 endif
@@ -68,13 +68,13 @@ ifeq ($$(BR2_TARGET_ROOTFS_$(2)_BZIP2),y)
 	bzip2 -9 -c $$@ > $$@.bz2
 endif
 ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZMA),y)
-	$(LZMA) -9 -c $$@ > $$@.lzma
+	$$(LZMA) -9 -c $$@ > $$@.lzma
 endif
 
 rootfs-$(1)-show-depends:
-	@echo $(ROOTFS_$(2)_DEPENDENCIES)
+	@echo $$(ROOTFS_$(2)_DEPENDENCIES)
 
-rootfs-$(1): $(BINARIES_DIR)/rootfs.$(1) $(ROOTFS_$(2)_POST_TARGETS)
+rootfs-$(1): $$(BINARIES_DIR)/rootfs.$(1) $$(ROOTFS_$(2)_POST_TARGETS)
 
 ifeq ($$(BR2_TARGET_ROOTFS_$(2)),y)
 TARGETS += rootfs-$(1)
diff --git a/fs/cpio/cpio.mk b/fs/cpio/cpio.mk
index 5533322..5bcec13 100644
--- a/fs/cpio/cpio.mk
+++ b/fs/cpio/cpio.mk
@@ -28,7 +28,7 @@ endif # BR2_ROOTFS_DEVICE_CREATION_STATIC
 ROOTFS_CPIO_PRE_GEN_HOOKS += ROOTFS_CPIO_ADD_INIT
 
 define ROOTFS_CPIO_CMD
-	cd $(TARGET_DIR) && find . | cpio --quiet -o -H newc > $$@
+	cd $(TARGET_DIR) && find . | cpio --quiet -o -H newc > $@
 endef
 
 $(eval $(call ROOTFS_TARGET,cpio))
diff --git a/fs/cramfs/cramfs.mk b/fs/cramfs/cramfs.mk
index 55f6bdb..6549f39 100644
--- a/fs/cramfs/cramfs.mk
+++ b/fs/cramfs/cramfs.mk
@@ -10,7 +10,7 @@ CRAMFS_OPTS=-l
 endif
 
 define ROOTFS_CRAMFS_CMD
- $(HOST_DIR)/usr/bin/mkcramfs $(CRAMFS_OPTS) $(TARGET_DIR) $$@
+ $(HOST_DIR)/usr/bin/mkcramfs $(CRAMFS_OPTS) $(TARGET_DIR) $@
 endef
 
 ROOTFS_CRAMFS_DEPENDENCIES = host-cramfs
diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk
index cc8da0e..7b71592 100644
--- a/fs/ext2/ext2.mk
+++ b/fs/ext2/ext2.mk
@@ -21,7 +21,7 @@ endif
 ROOTFS_EXT2_DEPENDENCIES = host-genext2fs
 
 define ROOTFS_EXT2_CMD
-	PATH=$(TARGET_PATH) fs/ext2/genext2fs.sh -d $(TARGET_DIR) $(EXT2_OPTS) $$@
+	PATH=$(TARGET_PATH) fs/ext2/genext2fs.sh -d $(TARGET_DIR) $(EXT2_OPTS) $@
 endef
 
 $(eval $(call ROOTFS_TARGET,ext2))
diff --git a/fs/jffs2/jffs2.mk b/fs/jffs2/jffs2.mk
index 2a69849..b5423a8 100644
--- a/fs/jffs2/jffs2.mk
+++ b/fs/jffs2/jffs2.mk
@@ -36,13 +36,13 @@ ROOTFS_JFFS2_DEPENDENCIES = host-mtd
 
 ifneq ($(BR2_TARGET_ROOTFS_JFFS2_SUMMARY),)
 define ROOTFS_JFFS2_CMD
-	$(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $$@.nosummary && \
-	$(SUMTOOL) $(SUMTOOL_OPTS) -i $$@.nosummary -o $$@ && \
-	rm $$@.nosummary
+	$(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $@.nosummary && \
+	$(SUMTOOL) $(SUMTOOL_OPTS) -i $@.nosummary -o $@ && \
+	rm $@.nosummary
 endef
 else
 define ROOTFS_JFFS2_CMD
-	$(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $$@
+	$(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $@
 endef
 endif
 
diff --git a/fs/romfs/romfs.mk b/fs/romfs/romfs.mk
index 9719478..1a11fbe 100644
--- a/fs/romfs/romfs.mk
+++ b/fs/romfs/romfs.mk
@@ -9,7 +9,7 @@ ROMFS_TARGET=$(IMAGE).romfs
 ROOTFS_ROMFS_DEPENDENCIES = host-genromfs
 
 define ROOTFS_ROMFS_CMD
-	$(HOST_DIR)/usr/bin/genromfs -d $(TARGET_DIR) -f $$@
+	$(HOST_DIR)/usr/bin/genromfs -d $(TARGET_DIR) -f $@
 endef
 
-$(eval $(call ROOTFS_TARGET,romfs))
\ No newline at end of file
+$(eval $(call ROOTFS_TARGET,romfs))
diff --git a/fs/squashfs/squashfs.mk b/fs/squashfs/squashfs.mk
index a680dae..d4b56f4 100644
--- a/fs/squashfs/squashfs.mk
+++ b/fs/squashfs/squashfs.mk
@@ -33,9 +33,9 @@ endif
 endif
 
 define ROOTFS_SQUASHFS_CMD
-	$(HOST_DIR)/usr/bin/mksquashfs $(TARGET_DIR) $$@ -noappend \
+	$(HOST_DIR)/usr/bin/mksquashfs $(TARGET_DIR) $@ -noappend \
 		$(ROOTFS_SQUASHFS_ARGS) && \
-	chmod 0644 $$@
+	chmod 0644 $@
 endef
 
 $(eval $(call ROOTFS_TARGET,squashfs))
diff --git a/fs/tar/tar.mk b/fs/tar/tar.mk
index 4d435cb..1d327fa 100644
--- a/fs/tar/tar.mk
+++ b/fs/tar/tar.mk
@@ -7,7 +7,7 @@
 TAR_OPTS:=$(BR2_TARGET_ROOTFS_TAR_OPTIONS)
 
 define ROOTFS_TAR_CMD
- tar -c$(TAR_OPTS)f $$@ -C $(TARGET_DIR) .
+ tar -c$(TAR_OPTS)f $@ -C $(TARGET_DIR) .
 endef
 
 $(eval $(call ROOTFS_TARGET,tar))
diff --git a/fs/ubifs/ubi.mk b/fs/ubifs/ubi.mk
index c88e336..51ab42d 100644
--- a/fs/ubifs/ubi.mk
+++ b/fs/ubifs/ubi.mk
@@ -14,9 +14,9 @@ ROOTFS_UBI_DEPENDENCIES = rootfs-ubifs
 
 define ROOTFS_UBI_CMD
 	cp fs/ubifs/ubinize.cfg . ;\
-	echo "image=$$@fs" \
+	echo "image=$@fs" \
 		>> ./ubinize.cfg ;\
-	$(HOST_DIR)/usr/sbin/ubinize -o $$@ $(UBI_UBINIZE_OPTS) ubinize.cfg ;\
+	$(HOST_DIR)/usr/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) ubinize.cfg ;\
 	rm ubinize.cfg
 endef
 
diff --git a/fs/ubifs/ubifs.mk b/fs/ubifs/ubifs.mk
index 337180e..cbb6026 100644
--- a/fs/ubifs/ubifs.mk
+++ b/fs/ubifs/ubifs.mk
@@ -19,7 +19,7 @@ endif
 ROOTFS_UBIFS_DEPENDENCIES = host-mtd
 
 define ROOTFS_UBIFS_CMD
-	$(HOST_DIR)/usr/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $$@
+	$(HOST_DIR)/usr/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $@
 endef
 
-$(eval $(call ROOTFS_TARGET,ubifs))
\ No newline at end of file
+$(eval $(call ROOTFS_TARGET,ubifs))
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 7/7] pkg-infra: log current message
  2013-01-20 16:03 [Buildroot] [pull request v2] Pull request for branch yem-instrument-build Yann E. MORIN
                   ` (5 preceding siblings ...)
  2013-01-20 16:03 ` [Buildroot] [PATCH 6/7] fs/common.mk: delay evaluation of variables Yann E. MORIN
@ 2013-01-20 16:03 ` Yann E. MORIN
  2013-01-20 16:38 ` [Buildroot] [pull request v2] Pull request for branch yem-instrument-build Yann E. MORIN
  2013-01-20 21:14 ` Peter Korsgaard
  8 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2013-01-20 16:03 UTC (permalink / raw)
  To: buildroot

In order to help the auto-builders (our own, or in-house ones),
just log the current message in a file that contains:
    Package: $($(PKG)_NAME)
    Version: $($(PKG)_VERSION)
    Action : Last '>>>' message displayed

For example:
    Package: host-fakeroot
    Version: 1.18.2
    Action : Configuring

If there is no package, then the package name and version are
empty, eg.:
    Package:
    Version:
    Action : Generating root filesystem image rootfs.tar

Also, all messages are logged to a file, one per line, with the
date each message was generated at, as the number of seconds
elapsed since Epoch.

This will hopefully help autobuilders extract the real reason for
a failure, and take appropriate action (eg. bug-mail the last
git-author of a package...)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/pkg-utils.mk |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index 835c588..477be57 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -64,7 +64,14 @@ INFLATE.xz   = $(XZCAT)
 INFLATE.tar  = cat
 
 # MESSAGE Macro -- display a message in bold type
-MESSAGE     = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
+define MESSAGE
+	echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)";   \
+	echo "$$(date '+%s'): $($(PKG)_NAME) $($(PKG)_VERSION) $(1)"                 \
+	     >>$(BUILD_DIR)/actions.log;                                             \
+	printf "Package: %s\nVersion: %s\nAction : %s\n"                             \
+	       "$($(PKG)_NAME)" "$($(PKG)_VERSION)" $(1)                             \
+	       >$(BUILD_DIR)/last-action
+endef
 TERM_BOLD  := $(shell tput smso)
 TERM_RESET := $(shell tput rmso)
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [pull request v2] Pull request for branch yem-instrument-build
  2013-01-20 16:03 [Buildroot] [pull request v2] Pull request for branch yem-instrument-build Yann E. MORIN
                   ` (6 preceding siblings ...)
  2013-01-20 16:03 ` [Buildroot] [PATCH 7/7] pkg-infra: log current message Yann E. MORIN
@ 2013-01-20 16:38 ` Yann E. MORIN
  2013-01-20 16:44   ` Yann E. MORIN
  2013-01-20 17:38   ` Arnout Vandecappelle
  2013-01-20 21:14 ` Peter Korsgaard
  8 siblings, 2 replies; 12+ messages in thread
From: Yann E. MORIN @ 2013-01-20 16:38 UTC (permalink / raw)
  To: buildroot

All,

On Sunday 20 January 2013 Yann E. MORIN wrote:
> This series adds some intrumentation to the pkg-infra so that it is easier
> for the autobuilders to extract meaningfull information about the reason
> of failures.
[--SNIP--]
> Yann E. MORIN (7):
>       toolchain/external: sprinkle with some calls to MESSAGE
>       toolchain/crosstool-ng: sprinkle with some calls to MESSAGE
>       toolchain/gcc: sprinkle with some calls to MESSAGE
>       toolchain/kernel-headers: sprinkle with some calls to MESSAGE
>       toolchain/uClibc: sprinkle with some calls to MESSAGE
>       fs/common.mk: delay evaluation of variables.
>       pkg-infra: log current message

Arg! Arnout's authorship was lost when I added his patch to my tree... :-(
Let me fix that...

[git-am choked on the patch because of some missing "newline at end
of file", hence I applied it manually, and forgot to change authorship]

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [pull request v2] Pull request for branch yem-instrument-build
  2013-01-20 16:38 ` [Buildroot] [pull request v2] Pull request for branch yem-instrument-build Yann E. MORIN
@ 2013-01-20 16:44   ` Yann E. MORIN
  2013-01-20 17:38   ` Arnout Vandecappelle
  1 sibling, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2013-01-20 16:44 UTC (permalink / raw)
  To: buildroot

All,

On Sunday 20 January 2013 Yann E. MORIN wrote:
> On Sunday 20 January 2013 Yann E. MORIN wrote:
> > This series adds some intrumentation to the pkg-infra so that it is easier
> > for the autobuilders to extract meaningfull information about the reason
> > of failures.
> [--SNIP--]
> > Yann E. MORIN (7):
> >       toolchain/external: sprinkle with some calls to MESSAGE
> >       toolchain/crosstool-ng: sprinkle with some calls to MESSAGE
> >       toolchain/gcc: sprinkle with some calls to MESSAGE
> >       toolchain/kernel-headers: sprinkle with some calls to MESSAGE
> >       toolchain/uClibc: sprinkle with some calls to MESSAGE
> >       fs/common.mk: delay evaluation of variables.
> >       pkg-infra: log current message
> 
> Arg! Arnout's authorship was lost when I added his patch to my tree... :-(
> Let me fix that...

OK, the branch on gitorious has been fixed, now. Not re-sending the series,
though. Please pull form gitorious to ensure Arnout's authorship is
retained.

My apologies for the hiccup. :-(

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [pull request v2] Pull request for branch yem-instrument-build
  2013-01-20 16:38 ` [Buildroot] [pull request v2] Pull request for branch yem-instrument-build Yann E. MORIN
  2013-01-20 16:44   ` Yann E. MORIN
@ 2013-01-20 17:38   ` Arnout Vandecappelle
  1 sibling, 0 replies; 12+ messages in thread
From: Arnout Vandecappelle @ 2013-01-20 17:38 UTC (permalink / raw)
  To: buildroot

On 01/20/13 17:38, Yann E. MORIN wrote:
> [git-am choked on the patch because of some missing "newline at end
> of file", hence I applied it manually, and forgot to change authorship]

  Funny, must be a bug in git-apply.

  Regards,
  Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [pull request v2] Pull request for branch yem-instrument-build
  2013-01-20 16:03 [Buildroot] [pull request v2] Pull request for branch yem-instrument-build Yann E. MORIN
                   ` (7 preceding siblings ...)
  2013-01-20 16:38 ` [Buildroot] [pull request v2] Pull request for branch yem-instrument-build Yann E. MORIN
@ 2013-01-20 21:14 ` Peter Korsgaard
  8 siblings, 0 replies; 12+ messages in thread
From: Peter Korsgaard @ 2013-01-20 21:14 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 Yann> Hello All!

 Yann> This series adds some intrumentation to the pkg-infra so that it
 Yann> is easier for the autobuilders to extract meaningfull information
 Yann> about the reason of failures.

Committed patch 1-5, thanks!

 Yann> Yann E. MORIN (7):
 Yann>       toolchain/external: sprinkle with some calls to MESSAGE
 Yann>       toolchain/crosstool-ng: sprinkle with some calls to MESSAGE
 Yann>       toolchain/gcc: sprinkle with some calls to MESSAGE
 Yann>       toolchain/kernel-headers: sprinkle with some calls to MESSAGE
 Yann>       toolchain/uClibc: sprinkle with some calls to MESSAGE
 Yann>       fs/common.mk: delay evaluation of variables.
 Yann>       pkg-infra: log current message

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-01-20 21:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-20 16:03 [Buildroot] [pull request v2] Pull request for branch yem-instrument-build Yann E. MORIN
2013-01-20 16:03 ` [Buildroot] [PATCH 1/7] toolchain/external: sprinkle with some calls to MESSAGE Yann E. MORIN
2013-01-20 16:03 ` [Buildroot] [PATCH 2/7] toolchain/crosstool-ng: " Yann E. MORIN
2013-01-20 16:03 ` [Buildroot] [PATCH 3/7] toolchain/gcc: " Yann E. MORIN
2013-01-20 16:03 ` [Buildroot] [PATCH 4/7] toolchain/kernel-headers: " Yann E. MORIN
2013-01-20 16:03 ` [Buildroot] [PATCH 5/7] toolchain/uClibc: " Yann E. MORIN
2013-01-20 16:03 ` [Buildroot] [PATCH 6/7] fs/common.mk: delay evaluation of variables Yann E. MORIN
2013-01-20 16:03 ` [Buildroot] [PATCH 7/7] pkg-infra: log current message Yann E. MORIN
2013-01-20 16:38 ` [Buildroot] [pull request v2] Pull request for branch yem-instrument-build Yann E. MORIN
2013-01-20 16:44   ` Yann E. MORIN
2013-01-20 17:38   ` Arnout Vandecappelle
2013-01-20 21:14 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.