]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
kconfig: invoke silentoldconfig if spl, tpl/.config is updated
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Thu, 23 Oct 2014 16:30:45 +0000 (01:30 +0900)
committerTom Rini <trini@ti.com>
Thu, 23 Oct 2014 17:19:13 +0000 (13:19 -0400)
When spl/.config is updated by "make spl/menuconfig" or friends,
spl/include/config/auto.conf, spl/include/generated/autoconf.h
and some other files must be updated by "make silentoldconfig".

There is no hook for SPL in the top Makefile, so this commit
touches .config when spl/.config is updated to invoke silentoldconfig.
Likewise for TPL.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
scripts/multiconfig.sh

index 3a963c7973da5da0e37c0ac350ea7e4b1e2d59e1..3e3040b2e2ab9210ebef73859b93e158d2875ecc 100644 (file)
@@ -297,9 +297,24 @@ do_others () {
        else
                objdir=${1%/*}
                check_enabled_subimage $1 $objdir
+
+               if [ -f "$objdir/$KCONFIG_CONFIG" ]; then
+                       timestamp_before=$(stat --printf="%Y" \
+                                               $objdir/$KCONFIG_CONFIG)
+               fi
        fi
 
        run_make_config $target $objdir
+
+       if [ "$timestamp_before" -a -f "$objdir/$KCONFIG_CONFIG" ]; then
+               timestamp_after=$(stat --printf="%Y" $objdir/$KCONFIG_CONFIG)
+
+               if [ "$timestamp_after" -gt "$timestamp_before" ]; then
+                       # $objdir/.config has been updated.
+                       # touch .config to invoke "make silentoldconfig"
+                       touch $KCONFIG_CONFIG
+               fi
+       fi
 }
 
 progname=$(basename $0)