summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebastian.rasmussen@stericsson.com>2010-11-23 01:54:51 +0100
committerMichael BRANDT <michael.brandt@stericsson.com>2010-11-23 15:32:23 +0100
commit8d16a1caa1e65871c78ec1cd8ee37ab38cc1bdf4 (patch)
tree045b852f0cda8318ecf2e237587ceee3e5abb585 /Makefile
parent8a81734f8320002a727c5c3280e8159aa3c51c04 (diff)
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 <sebastian.rasmussen@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/9228 Reviewed-by: Robert ROSENGREN <robert.rosengren@stericsson.com> Reviewed-by: Michael BRANDT <michael.brandt@stericsson.com> Tested-by: Michael BRANDT <michael.brandt@stericsson.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile47
1 files changed, 25 insertions, 22 deletions
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