From 8d16a1caa1e65871c78ec1cd8ee37ab38cc1bdf4 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Tue, 23 Nov 2010 01:54:51 +0100 Subject: Prevent unnecessary build of u-boot Even when the configuration had not really changed U-boot would be rebuilt due to that the configuration files were updated unnecessarily. This change prevents the configuration file to be updated as long as the config stays the same, and this in turn prevents buildling U-boot. This applies to STE Ux500 board configuration. ST-Ericsson ID: AP280716 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Iacc39eee65d57578b6cbfcfc1dc8217b31a9c76f Signed-off-by: Sebastian Rasmussen Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/9228 Reviewed-by: Robert ROSENGREN Reviewed-by: Michael BRANDT Tested-by: Michael BRANDT --- Makefile | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e336626da..f0f865c11 100644 --- a/Makefile +++ b/Makefile @@ -3157,28 +3157,31 @@ u8500_def_config \ u8500_SRAM_config \ u8500_noconsole_config \ u8500_udc_config \ -u8500_auto_config: unconfig - @mkdir -p $(obj)include - @mkdir -p $(obj)board/st/u8500 - @ > $(obj)include/config.h - @if [ "$(findstring _def, $@)" ] ; then \ - echo "#ifndef CONFIG_SKIP_LOWLEVEL_INIT " >> $(obj)include/config.h ; \ - echo "#define CONFIG_SKIP_LOWLEVEL_INIT 1" >> $(obj)include/config.h ; \ - echo "#endif" >> $(obj)include/config.h ; \ - elif [ "$(findstring _noconsole, $@)" ] ; then \ - echo "Configuring for no console ..." ; \ - echo "#ifndef CONFIG_SKIP_LOWLEVEL_INIT" >> $(obj)include/config.h ; \ - echo "#define CONFIG_SKIP_LOWLEVEL_INIT 1" >> $(obj)include/config.h ; \ - echo "#endif" >> $(obj)include/config.h ; \ - echo "#define CONFIG_SILENT_CONSOLE 1" >> $(obj)include/config.h ; \ - elif [ "$(findstring _udc, $@)" ] ; then \ - echo "#define CONFIG_USB_TTY 1" >> $(obj)include/config.h ; \ - fi; \ - if [ "$(findstring _SRAM, $@)" ] ; then \ - echo "#define CONFIG_BOOT_SRAM" >> $(obj)include/config.h ; \ - echo "TEXT_BASE = 0x40030000" >$(obj)board/st/u8500/config.tmp ; \ - fi; - @$(MKCONFIG) -a u8500 arm arm_cortexa9 u8500 st stw8500 +u8500_auto_config: + @if [ -z "$(shell grep "steconfig:$@" $(obj)include/config.h 2>/dev/null)" ]; then \ + $(MAKE) unconfig ; \ + mkdir -p $(obj)include ; \ + mkdir -p $(obj)board/st/u8500 ; \ + echo "/* steconfig:$@ */" > $(obj)include/config.h ; \ + if [ "$(findstring _def, $@)" ] ; then \ + echo "#ifndef CONFIG_SKIP_LOWLEVEL_INIT " >> $(obj)include/config.h ; \ + echo "#define CONFIG_SKIP_LOWLEVEL_INIT 1" >> $(obj)include/config.h ; \ + echo "#endif" >> $(obj)include/config.h ; \ + elif [ "$(findstring _noconsole, $@)" ] ; then \ + echo "Configuring for no console ..." ; \ + echo "#ifndef CONFIG_SKIP_LOWLEVEL_INIT" >> $(obj)include/config.h ; \ + echo "#define CONFIG_SKIP_LOWLEVEL_INIT 1" >> $(obj)include/config.h ; \ + echo "#endif" >> $(obj)include/config.h ; \ + echo "#define CONFIG_SILENT_CONSOLE 1" >> $(obj)include/config.h ; \ + elif [ "$(findstring _udc, $@)" ] ; then \ + echo "#define CONFIG_USB_TTY 1" >> $(obj)include/config.h ; \ + fi ; \ + if [ "$(findstring _SRAM, $@)" ] ; then \ + echo "#define CONFIG_BOOT_SRAM" >> $(obj)include/config.h ; \ + echo "TEXT_BASE = 0x40030000" >$(obj)board/st/u8500/config.tmp ; \ + fi ; \ + $(MKCONFIG) -a u8500 arm arm_cortexa9 u8500 st stw8500 ; \ + fi ######################################################################### ## XScale Systems -- cgit v1.2.3