kbuild: move autoconf.h to include/generated
authorSam Ravnborg <sam@ravnborg.org>
Sat, 17 Oct 2009 22:49:24 +0000 (00:49 +0200)
committerMichal Marek <mmarek@suse.cz>
Sat, 12 Dec 2009 12:08:15 +0000 (13:08 +0100)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
.gitignore
Documentation/kbuild/kconfig.txt
Makefile
arch/m68k/kernel/head.S
scripts/basic/fixdep.c
scripts/kconfig/confdata.c
scripts/mkcompile_h

index c06b4c9..c6c19ea 100644 (file)
@@ -46,7 +46,6 @@ Module.symvers
 # Generated include files
 #
 include/config
 # Generated include files
 #
 include/config
-include/linux/autoconf.h
 include/linux/version.h
 include/linux/utsrelease.h
 include/generated
 include/linux/version.h
 include/linux/utsrelease.h
 include/generated
index 849b5e5..ab8dc35 100644 (file)
@@ -106,7 +106,8 @@ This environment variable can be set to specify the path & name of the
 KCONFIG_AUTOHEADER
 --------------------------------------------------
 This environment variable can be set to specify the path & name of the
 KCONFIG_AUTOHEADER
 --------------------------------------------------
 This environment variable can be set to specify the path & name of the
-"autoconf.h" (header) file.  Its default value is "include/linux/autoconf.h".
+"autoconf.h" (header) file.
+Its default value is "include/generated/autoconf.h".
 
 
 ======================================================================
 
 
 ======================================================================
index 86b66cf..3bdd932 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -336,7 +336,7 @@ CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
 # Needed to be compatible with the O= option
 LINUXINCLUDE    := -I$(srctree)/arch/$(hdr-arch)/include -Iinclude \
                    $(if $(KBUILD_SRC), -I$(srctree)/include) \
 # Needed to be compatible with the O= option
 LINUXINCLUDE    := -I$(srctree)/arch/$(hdr-arch)/include -Iinclude \
                    $(if $(KBUILD_SRC), -I$(srctree)/include) \
-                   -include include/linux/autoconf.h
+                   -include include/generated/autoconf.h
 
 KBUILD_CPPFLAGS := -D__KERNEL__
 
 
 KBUILD_CPPFLAGS := -D__KERNEL__
 
@@ -492,17 +492,18 @@ $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
 # if auto.conf.cmd is missing then we are probably in a cleaned tree so
 # we execute the config step to be sure to catch updated Kconfig files
 include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
 # if auto.conf.cmd is missing then we are probably in a cleaned tree so
 # we execute the config step to be sure to catch updated Kconfig files
 include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
+       $(Q)mkdir -p include/generated
        $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
 else
        $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
 else
-# external modules needs include/linux/autoconf.h and include/config/auto.conf
+# external modules needs include/generated/autoconf.h and include/config/auto.conf
 # but do not care if they are up-to-date. Use auto.conf to trigger the test
 PHONY += include/config/auto.conf
 
 include/config/auto.conf:
 # but do not care if they are up-to-date. Use auto.conf to trigger the test
 PHONY += include/config/auto.conf
 
 include/config/auto.conf:
-       $(Q)test -e include/linux/autoconf.h -a -e $@ || (              \
+       $(Q)test -e include/generated/autoconf.h -a -e $@ || (          \
        echo;                                                           \
        echo "  ERROR: Kernel configuration is invalid.";               \
        echo;                                                           \
        echo "  ERROR: Kernel configuration is invalid.";               \
-       echo "         include/linux/autoconf.h or $@ are missing.";    \
+       echo "         include/generated/autoconf.h or $@ are missing.";\
        echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
        echo;                                                           \
        /bin/false)
        echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
        echo;                                                           \
        /bin/false)
@@ -1149,7 +1150,7 @@ CLEAN_FILES +=    vmlinux System.map \
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config usr/include include/generated
 MRPROPER_FILES += .config .config.old .version .old_version             \
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config usr/include include/generated
 MRPROPER_FILES += .config .config.old .version .old_version             \
-                  include/linux/autoconf.h include/linux/version.h      \
+                  include/linux/version.h                               \
                   include/linux/utsrelease.h                            \
                  Module.symvers Module.markers tags TAGS cscope*
 
                   include/linux/utsrelease.h                            \
                  Module.symvers Module.markers tags TAGS cscope*
 
index 86edb5f..ef54128 100644 (file)
  * for them and trying to understand what they mean.
  *
  * CONFIG_xxx: These are the obvious machine configuration defines created
  * for them and trying to understand what they mean.
  *
  * CONFIG_xxx: These are the obvious machine configuration defines created
- * during configuration.  These are defined in include/linux/autoconf.h.
+ * during configuration.  These are defined in autoconf.h.
  *
  * CONSOLE:    There is support for head.S console in this file.  This
  * console can talk to a Mac frame buffer, but could easily be extrapolated
  *
  * CONSOLE:    There is support for head.S console in this file.  This
  * console can talk to a Mac frame buffer, but could easily be extrapolated
index 6bf21f8..ea26b23 100644 (file)
  * tells make when to remake a file.
  *
  * To use this list as-is however has the drawback that virtually
  * tells make when to remake a file.
  *
  * To use this list as-is however has the drawback that virtually
- * every file in the kernel includes <linux/autoconf.h>.
+ * every file in the kernel includes autoconf.h.
  *
  *
- * If the user re-runs make *config, linux/autoconf.h will be
+ * If the user re-runs make *config, autoconf.h will be
  * regenerated.  make notices that and will rebuild every file which
  * includes autoconf.h, i.e. basically all files. This is extremely
  * annoying if the user just changed CONFIG_HIS_DRIVER from n to m.
  *
  * So we play the same trick that "mkdep" played before. We replace
  * regenerated.  make notices that and will rebuild every file which
  * includes autoconf.h, i.e. basically all files. This is extremely
  * annoying if the user just changed CONFIG_HIS_DRIVER from n to m.
  *
  * So we play the same trick that "mkdep" played before. We replace
- * the dependency on linux/autoconf.h by a dependency on every config
+ * the dependency on autoconf.h by a dependency on every config
  * option which is mentioned in any of the listed prequisites.
  *
  * kconfig populates a tree in include/config/ with an empty file
  * option which is mentioned in any of the listed prequisites.
  *
  * kconfig populates a tree in include/config/ with an empty file
@@ -73,7 +73,7 @@
  *   cmd_<target> = <cmdline>
  *
  * and then basically copies the .<target>.d file to stdout, in the
  *   cmd_<target> = <cmdline>
  *
  * and then basically copies the .<target>.d file to stdout, in the
- * process filtering out the dependency on linux/autoconf.h and adding
+ * process filtering out the dependency on autoconf.h and adding
  * dependencies on include/config/my/option.h for every
  * CONFIG_MY_OPTION encountered in any of the prequisites.
  *
  * dependencies on include/config/my/option.h for every
  * CONFIG_MY_OPTION encountered in any of the prequisites.
  *
@@ -324,7 +324,7 @@ static void parse_dep_file(void *map, size_t len)
                        p++;
                }
                memcpy(s, m, p-m); s[p-m] = 0;
                        p++;
                }
                memcpy(s, m, p-m); s[p-m] = 0;
-               if (strrcmp(s, "include/linux/autoconf.h") &&
+               if (strrcmp(s, "include/generated/autoconf.h") &&
                    strrcmp(s, "arch/um/include/uml-config.h") &&
                    strrcmp(s, ".ver")) {
                        printf("  %s \\\n", s);
                    strrcmp(s, "arch/um/include/uml-config.h") &&
                    strrcmp(s, ".ver")) {
                        printf("  %s \\\n", s);
index b55e72f..797a741 100644 (file)
@@ -776,7 +776,7 @@ int conf_write_autoconf(void)
 
        name = getenv("KCONFIG_AUTOHEADER");
        if (!name)
 
        name = getenv("KCONFIG_AUTOHEADER");
        if (!name)
-               name = "include/linux/autoconf.h";
+               name = "include/generated/autoconf.h";
        if (rename(".tmpconfig.h", name))
                return 1;
        name = conf_get_autoconfig_name();
        if (rename(".tmpconfig.h", name))
                return 1;
        name = conf_get_autoconfig_name();
index bce3d0f..23dbad8 100755 (executable)
@@ -14,7 +14,7 @@ vecho() { [ "${quiet}" = "silent_" ] || echo "$@" ; }
 # So "sudo make install" won't change the "compiled by <user>"
 # do "compiled by root"
 
 # So "sudo make install" won't change the "compiled by <user>"
 # do "compiled by root"
 
-if [ -r $TARGET -a ! -O include/linux/autoconf.h ]; then
+if [ -r $TARGET -a ! -O include/generated/autoconf.h ]; then
   vecho "  SKIPPED $TARGET"
   exit 0
 fi
   vecho "  SKIPPED $TARGET"
   exit 0
 fi