aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRandy Dunlap <rddunlap@osdl.org>2004-10-17 03:26:48 +0200
committerSam Ravnborg <sam@mars.ravnborg.org>2004-10-17 03:26:48 +0200
commit6950111513386dd0e3bf19e1f694f2e00e421f67 (patch)
tree75b7a2372e3484efe91fc5043c7e21b2287c3d5c /scripts
parent3c25e9e949ff6f266908a1ee4230061cdfb4438c (diff)
downloadhistory-6950111513386dd0e3bf19e1f694f2e00e421f67.tar.gz
kconfig: OVERRIDE: save kernel version in .config file
Omit .config file timestamp in the file if the environment variable "KCONFIG_NOTIMESTAMP" exists and is non-null. Signed-off-by: Randy Dunlap <rddunlap@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/confdata.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 7b6285e7c8f9b3..b5f2fc031503c3 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -270,6 +270,8 @@ int conf_write(const char *name)
int type, l;
const char *str;
time_t now;
+ int use_timestamp = 1;
+ char *env;
dirname[0] = 0;
if (name && name[0]) {
@@ -306,22 +308,28 @@ int conf_write(const char *name)
sym = sym_lookup("KERNELRELEASE", 0);
sym_calc_value(sym);
time(&now);
+ env = getenv("KCONFIG_NOTIMESTAMP");
+ if (env && *env)
+ use_timestamp = 0;
+
fprintf(out, "#\n"
"# Automatically generated make config: don't edit\n"
"# Linux kernel version: %s\n"
- "# %s"
+ "%s%s"
"#\n",
sym_get_string_value(sym),
- ctime(&now));
+ use_timestamp ? "# " : "",
+ use_timestamp ? ctime(&now) : "");
if (out_h)
fprintf(out_h, "/*\n"
" * Automatically generated C config: don't edit\n"
" * Linux kernel version: %s\n"
- " * %s"
+ "%s%s"
" */\n"
"#define AUTOCONF_INCLUDED\n",
sym_get_string_value(sym),
- ctime(&now));
+ use_timestamp ? " * " : "",
+ use_timestamp ? ctime(&now) : "");
if (!sym_change_count)
sym_clear_all_valid();