kconfig: convert to SPDX License Identifier
[carl9170fw.git] / config / util.c
index a365594770d9daaaaf3220c80eb1522113930072..29585394df71dfb75e3f56fcd1995b593863fc8d 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2002-2005 Roman Zippel <zippel@linux-m68k.org>
  * Copyright (C) 2002-2005 Sam Ravnborg <sam@ravnborg.org>
- *
- * Released under the terms of the GNU GPL v2.0.
  */
 
 #include <stdarg.h>
@@ -29,36 +28,6 @@ struct file *file_lookup(const char *name)
        return file;
 }
 
-/* write a dependency file as used by kbuild to track dependencies */
-int file_write_dep(const char *name)
-{
-       struct file *file;
-       FILE *out;
-
-       if (!name)
-               name = ".kconfig.d";
-       out = fopen("..config.tmp", "w");
-       if (!out)
-               return 1;
-       fprintf(out, "deps_config := \\\n");
-       for (file = file_list; file; file = file->next) {
-               if (file->next)
-                       fprintf(out, "\t%s \\\n", file->name);
-               else
-                       fprintf(out, "\t%s\n", file->name);
-       }
-       fprintf(out, "\n%s: \\\n"
-                    "\t$(deps_config)\n\n", conf_get_autoconfig_name());
-
-       env_write_dep(out, conf_get_autoconfig_name());
-
-       fprintf(out, "\n$(deps_config): ;\n");
-       fclose(out);
-       rename("..config.tmp", name);
-       return 0;
-}
-
-
 /* Allocate initial growable string */
 struct gstr str_new(void)
 {