History

kbuild: move autoconf.h to include/generated

Sam Ravnborg committed 17 years ago

Commit 264a2681 parent 98b87887 files · +16 −15Browse files

Unified · Split

7 files
  1. .gitignore +0 −1
  2. Documentation/kbuild/kconfig.txt +2 −1
  3. Makefile +6 −5
  4. arch/m68k/kernel/head.S +1 −1
  5. scripts/basic/fixdep.c +5 −5
  6. scripts/kconfig/confdata.c +1 −1
  7. scripts/mkcompile_h +1 −1
.gitignore+0−1
@@ -46,7 +46,6 @@ Module.symvers · 45 unmodified lines
46# Generated include files46# Generated include files
47#47#
48include/config48include/config
49include/linux/autoconf.h
50include/linux/version.h49include/linux/version.h
51include/linux/utsrelease.h50include/linux/utsrelease.h
52include/generated51include/generated
Documentation/kbuild/kconfig.txt+2−1
@@ -106,7 +106,8 @@ This environment variable can be set to specify the path & name of the · 105 unmodified lines
106KCONFIG_AUTOHEADER106KCONFIG_AUTOHEADER
107--------------------------------------------------107--------------------------------------------------
108This environment variable can be set to specify the path & name of the108This 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.
110Its default value is "include/generated/autoconf.h".
110 111
111 112
112======================================================================113======================================================================
Makefile+6−5
@@ -336,7 +336,7 @@ CFLAGS_GCOV = -fprofile-arcs -ftest-coverage · 335 unmodified lines
336# Needed to be compatible with the O= option336# Needed to be compatible with the O= option
337LINUXINCLUDE := -I$(srctree)/arch/$(hdr-arch)/include -Iinclude \337LINUXINCLUDE := -I$(srctree)/arch/$(hdr-arch)/include -Iinclude \
338 $(if $(KBUILD_SRC), -I$(srctree)/include) \338 $(if $(KBUILD_SRC), -I$(srctree)/include) \
339 -include include/linux/autoconf.h339 -include include/generated/autoconf.h
340 340
341KBUILD_CPPFLAGS := -D__KERNEL__341KBUILD_CPPFLAGS := -D__KERNEL__
342 342
@@ -492,17 +492,18 @@ $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ; · 149 unmodified lines
492# if auto.conf.cmd is missing then we are probably in a cleaned tree so492# if auto.conf.cmd is missing then we are probably in a cleaned tree so
493# we execute the config step to be sure to catch updated Kconfig files493# we execute the config step to be sure to catch updated Kconfig files
494include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd494include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
495 $(Q)mkdir -p include/generated
495 $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig496 $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
496else497else
497# external modules needs include/linux/autoconf.h and include/config/auto.conf498# external modules needs include/generated/autoconf.h and include/config/auto.conf
498# but do not care if they are up-to-date. Use auto.conf to trigger the test499# but do not care if they are up-to-date. Use auto.conf to trigger the test
499PHONY += include/config/auto.conf500PHONY += include/config/auto.conf
500 501
501include/config/auto.conf:502include/config/auto.conf:
502 $(Q)test -e include/linux/autoconf.h -a -e $@ || ( \503 $(Q)test -e include/generated/autoconf.h -a -e $@ || ( \
503 echo; \504 echo; \
504 echo " ERROR: Kernel configuration is invalid."; \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 echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \507 echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
507 echo; \508 echo; \
508 /bin/false)509 /bin/false)
@@ -1149,7 +1150,7 @@ CLEAN_FILES += vmlinux System.map \ · 640 unmodified lines
1149# Directories & files removed with 'make mrproper'1150# Directories & files removed with 'make mrproper'
1150MRPROPER_DIRS += include/config usr/include include/generated1151MRPROPER_DIRS += include/config usr/include include/generated
1151MRPROPER_FILES += .config .config.old .version .old_version \1152MRPROPER_FILES += .config .config.old .version .old_version \
1152 include/linux/autoconf.h include/linux/version.h \1153 include/linux/version.h \
1153 include/linux/utsrelease.h \1154 include/linux/utsrelease.h \
1154 Module.symvers Module.markers tags TAGS cscope*1155 Module.symvers Module.markers tags TAGS cscope*
1155 1156
arch/m68k/kernel/head.S+1−1
@@ -196,7 +196,7 @@ · 195 unmodified lines
196 * for them and trying to understand what they mean.196 * for them and trying to understand what they mean.
197 *197 *
198 * CONFIG_xxx: These are the obvious machine configuration defines created198 * 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 * CONSOLE: There is support for head.S console in this file. This201 * CONSOLE: There is support for head.S console in this file. This
202 * console can talk to a Mac frame buffer, but could easily be extrapolated202 * console can talk to a Mac frame buffer, but could easily be extrapolated
scripts/basic/fixdep.c+5−5
@@ -16,15 +16,15 @@ · 15 unmodified lines
16 * tells make when to remake a file.16 * tells make when to remake a file.
17 *17 *
18 * To use this list as-is however has the drawback that virtually18 * 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 be21 * If the user re-runs make *config, autoconf.h will be
22 * regenerated. make notices that and will rebuild every file which22 * regenerated. make notices that and will rebuild every file which
23 * includes autoconf.h, i.e. basically all files. This is extremely23 * includes autoconf.h, i.e. basically all files. This is extremely
24 * annoying if the user just changed CONFIG_HIS_DRIVER from n to m.24 * annoying if the user just changed CONFIG_HIS_DRIVER from n to m.
25 *25 *
26 * So we play the same trick that "mkdep" played before. We replace26 * So we play the same trick that "mkdep" played before. We replace
27 * the dependency on linux/autoconf.h by a dependency on every config27 * the dependency on autoconf.h by a dependency on every config
28 * option which is mentioned in any of the listed prequisites.28 * option which is mentioned in any of the listed prequisites.
29 *29 *
30 * kconfig populates a tree in include/config/ with an empty file30 * kconfig populates a tree in include/config/ with an empty file
@@ -73,7 +73,7 @@ · 42 unmodified lines
73 * cmd_<target> = <cmdline>73 * cmd_<target> = <cmdline>
74 *74 *
75 * and then basically copies the .<target>.d file to stdout, in the75 * and then basically copies the .<target>.d file to stdout, in the
76 * process filtering out the dependency on linux/autoconf.h and adding76 * process filtering out the dependency on autoconf.h and adding
77 * dependencies on include/config/my/option.h for every77 * dependencies on include/config/my/option.h for every
78 * CONFIG_MY_OPTION encountered in any of the prequisites.78 * CONFIG_MY_OPTION encountered in any of the prequisites.
79 *79 *
@@ -324,7 +324,7 @@ static void parse_dep_file(void *map, size_t len) · 244 unmodified lines
324 p++;324 p++;
325 }325 }
326 memcpy(s, m, p-m); s[p-m] = 0;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 strrcmp(s, "arch/um/include/uml-config.h") &&328 strrcmp(s, "arch/um/include/uml-config.h") &&
329 strrcmp(s, ".ver")) {329 strrcmp(s, ".ver")) {
330 printf(" %s \\\n", s);330 printf(" %s \\\n", s);
scripts/kconfig/confdata.c+1−1
@@ -776,7 +776,7 @@ int conf_write_autoconf(void) · 775 unmodified lines
776 776
777 name = getenv("KCONFIG_AUTOHEADER");777 name = getenv("KCONFIG_AUTOHEADER");
778 if (!name)778 if (!name)
779 name = "include/linux/autoconf.h";779 name = "include/generated/autoconf.h";
780 if (rename(".tmpconfig.h", name))780 if (rename(".tmpconfig.h", name))
781 return 1;781 return 1;
782 name = conf_get_autoconfig_name();782 name = conf_get_autoconfig_name();
scripts/mkcompile_h+1−1
@@ -14,7 +14,7 @@ vecho() { [ "${quiet}" = "silent_" ] || echo "$@" ; } · 13 unmodified lines
14# So "sudo make install" won't change the "compiled by <user>"14# So "sudo make install" won't change the "compiled by <user>"
15# do "compiled by root"15# do "compiled by root"
16 16
17if [ -r $TARGET -a ! -O include/linux/autoconf.h ]; then17if [ -r $TARGET -a ! -O include/generated/autoconf.h ]; then
18 vecho " SKIPPED $TARGET"18 vecho " SKIPPED $TARGET"
19 exit 019 exit 0
20fi20fi