kbuild: make sure autoksyms.h exists early
authorNicolas Pitre <nicolas.pitre@linaro.org>
Wed, 30 Nov 2016 22:41:58 +0000 (17:41 -0500)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 1 Dec 2016 18:19:22 +0000 (10:19 -0800)
Some people are able to trigger a race where autoksyms.h is used before
its empty version is even created.  Let's create it at the same time as
the directory holding it is created.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Prarit Bhargava <prarit@redhat.com>
Tested-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Makefile
scripts/kconfig/Makefile

index 694111b43cf8a5a8df969010f3d32a50bae2854a..9f9c3b577c756191571415edb7800ef3da19ecd3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1019,8 +1019,6 @@ prepare2: prepare3 prepare-compiler-check outputmakefile asm-generic
 prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
                    include/config/auto.conf
        $(cmd_crmodverdir)
-       $(Q)test -e include/generated/autoksyms.h || \
-           touch   include/generated/autoksyms.h
 
 archprepare: archheaders archscripts prepare1 scripts_basic
 
index ebced77deb9c4dc380ab5f58751950adc0ac3d7f..90a091b6ae4de74e6c070d77255b9f4b5655629a 100644 (file)
@@ -35,6 +35,8 @@ nconfig: $(obj)/nconf
 
 silentoldconfig: $(obj)/conf
        $(Q)mkdir -p include/config include/generated
+       $(Q)test -e include/generated/autoksyms.h || \
+           touch   include/generated/autoksyms.h
        $< $(silent) --$@ $(Kconfig)
 
 localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf