Commit 264a26838056fc2d759f58bec2e720e01fcb1bdb

Authored by Sam Ravnborg
Committed by Michal Marek
1 parent 98b8788ae9

kbuild: move autoconf.h to include/generated

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Showing 7 changed files with 16 additions and 15 deletions Side-by-side Diff

... ... @@ -46,7 +46,6 @@
46 46 # Generated include files
47 47 #
48 48 include/config
49   -include/linux/autoconf.h
50 49 include/linux/version.h
51 50 include/linux/utsrelease.h
52 51 include/generated
Documentation/kbuild/kconfig.txt
... ... @@ -106,7 +106,8 @@
106 106 KCONFIG_AUTOHEADER
107 107 --------------------------------------------------
108 108 This environment variable can be set to specify the path & name of the
109   -"autoconf.h" (header) file. Its default value is "include/linux/autoconf.h".
  109 +"autoconf.h" (header) file.
  110 +Its default value is "include/generated/autoconf.h".
110 111  
111 112  
112 113 ======================================================================
... ... @@ -336,7 +336,7 @@
336 336 # Needed to be compatible with the O= option
337 337 LINUXINCLUDE := -I$(srctree)/arch/$(hdr-arch)/include -Iinclude \
338 338 $(if $(KBUILD_SRC), -I$(srctree)/include) \
339   - -include include/linux/autoconf.h
  339 + -include include/generated/autoconf.h
340 340  
341 341 KBUILD_CPPFLAGS := -D__KERNEL__
342 342  
343 343  
344 344  
345 345  
... ... @@ -492,17 +492,18 @@
492 492 # if auto.conf.cmd is missing then we are probably in a cleaned tree so
493 493 # we execute the config step to be sure to catch updated Kconfig files
494 494 include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
  495 + $(Q)mkdir -p include/generated
495 496 $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
496 497 else
497   -# external modules needs include/linux/autoconf.h and include/config/auto.conf
  498 +# external modules needs include/generated/autoconf.h and include/config/auto.conf
498 499 # but do not care if they are up-to-date. Use auto.conf to trigger the test
499 500 PHONY += include/config/auto.conf
500 501  
501 502 include/config/auto.conf:
502   - $(Q)test -e include/linux/autoconf.h -a -e $@ || ( \
  503 + $(Q)test -e include/generated/autoconf.h -a -e $@ || ( \
503 504 echo; \
504 505 echo " ERROR: Kernel configuration is invalid."; \
505   - echo " include/linux/autoconf.h or $@ are missing."; \
  506 + echo " include/generated/autoconf.h or $@ are missing.";\
506 507 echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
507 508 echo; \
508 509 /bin/false)
... ... @@ -1149,7 +1150,7 @@
1149 1150 # Directories & files removed with 'make mrproper'
1150 1151 MRPROPER_DIRS += include/config usr/include include/generated
1151 1152 MRPROPER_FILES += .config .config.old .version .old_version \
1152   - include/linux/autoconf.h include/linux/version.h \
  1153 + include/linux/version.h \
1153 1154 include/linux/utsrelease.h \
1154 1155 Module.symvers Module.markers tags TAGS cscope*
1155 1156  
arch/m68k/kernel/head.S
... ... @@ -196,7 +196,7 @@
196 196 * for them and trying to understand what they mean.
197 197 *
198 198 * CONFIG_xxx: These are the obvious machine configuration defines created
199   - * during configuration. These are defined in include/linux/autoconf.h.
  199 + * during configuration. These are defined in autoconf.h.
200 200 *
201 201 * CONSOLE: There is support for head.S console in this file. This
202 202 * console can talk to a Mac frame buffer, but could easily be extrapolated
scripts/basic/fixdep.c
... ... @@ -16,15 +16,15 @@
16 16 * tells make when to remake a file.
17 17 *
18 18 * To use this list as-is however has the drawback that virtually
19   - * every file in the kernel includes <linux/autoconf.h>.
  19 + * every file in the kernel includes autoconf.h.
20 20 *
21   - * If the user re-runs make *config, linux/autoconf.h will be
  21 + * If the user re-runs make *config, autoconf.h will be
22 22 * regenerated. make notices that and will rebuild every file which
23 23 * includes autoconf.h, i.e. basically all files. This is extremely
24 24 * annoying if the user just changed CONFIG_HIS_DRIVER from n to m.
25 25 *
26 26 * So we play the same trick that "mkdep" played before. We replace
27   - * the dependency on linux/autoconf.h by a dependency on every config
  27 + * the dependency on autoconf.h by a dependency on every config
28 28 * option which is mentioned in any of the listed prequisites.
29 29 *
30 30 * kconfig populates a tree in include/config/ with an empty file
... ... @@ -73,7 +73,7 @@
73 73 * cmd_<target> = <cmdline>
74 74 *
75 75 * and then basically copies the .<target>.d file to stdout, in the
76   - * process filtering out the dependency on linux/autoconf.h and adding
  76 + * process filtering out the dependency on autoconf.h and adding
77 77 * dependencies on include/config/my/option.h for every
78 78 * CONFIG_MY_OPTION encountered in any of the prequisites.
79 79 *
... ... @@ -324,7 +324,7 @@
324 324 p++;
325 325 }
326 326 memcpy(s, m, p-m); s[p-m] = 0;
327   - if (strrcmp(s, "include/linux/autoconf.h") &&
  327 + if (strrcmp(s, "include/generated/autoconf.h") &&
328 328 strrcmp(s, "arch/um/include/uml-config.h") &&
329 329 strrcmp(s, ".ver")) {
330 330 printf(" %s \\\n", s);
scripts/kconfig/confdata.c
... ... @@ -776,7 +776,7 @@
776 776  
777 777 name = getenv("KCONFIG_AUTOHEADER");
778 778 if (!name)
779   - name = "include/linux/autoconf.h";
  779 + name = "include/generated/autoconf.h";
780 780 if (rename(".tmpconfig.h", name))
781 781 return 1;
782 782 name = conf_get_autoconfig_name();
... ... @@ -14,7 +14,7 @@
14 14 # So "sudo make install" won't change the "compiled by <user>"
15 15 # do "compiled by root"
16 16  
17   -if [ -r $TARGET -a ! -O include/linux/autoconf.h ]; then
  17 +if [ -r $TARGET -a ! -O include/generated/autoconf.h ]; then
18 18 vecho " SKIPPED $TARGET"
19 19 exit 0
20 20 fi