aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/confdata.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/confdata.c')
-rw-r--r--scripts/kconfig/confdata.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 61c35bf2d9cb..2bafd9a7c8da 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -560,8 +560,6 @@ int conf_write(const char *name)
560 const char *basename; 560 const char *basename;
561 const char *str; 561 const char *str;
562 char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1]; 562 char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1];
563 time_t now;
564 int use_timestamp = 1;
565 char *env; 563 char *env;
566 564
567 dirname[0] = 0; 565 dirname[0] = 0;
@@ -598,19 +596,11 @@ int conf_write(const char *name)
598 if (!out) 596 if (!out)
599 return 1; 597 return 1;
600 598
601 time(&now);
602 env = getenv("KCONFIG_NOTIMESTAMP");
603 if (env && *env)
604 use_timestamp = 0;
605
606 fprintf(out, _("#\n" 599 fprintf(out, _("#\n"
607 "# Automatically generated make config: don't edit\n" 600 "# Automatically generated make config: don't edit\n"
608 "# %s\n" 601 "# %s\n"
609 "%s%s"
610 "#\n"), 602 "#\n"),
611 rootmenu.prompt->text, 603 rootmenu.prompt->text);
612 use_timestamp ? "# " : "",
613 use_timestamp ? ctime(&now) : "");
614 604
615 if (!conf_get_changed()) 605 if (!conf_get_changed())
616 sym_clear_all_valid(); 606 sym_clear_all_valid();
@@ -784,7 +774,6 @@ int conf_write_autoconf(void)
784 const char *str; 774 const char *str;
785 const char *name; 775 const char *name;
786 FILE *out, *tristate, *out_h; 776 FILE *out, *tristate, *out_h;
787 time_t now;
788 int i; 777 int i;
789 778
790 sym_clear_all_valid(); 779 sym_clear_all_valid();
@@ -811,22 +800,19 @@ int conf_write_autoconf(void)
811 return 1; 800 return 1;
812 } 801 }
813 802
814 time(&now);
815 fprintf(out, "#\n" 803 fprintf(out, "#\n"
816 "# Automatically generated make config: don't edit\n" 804 "# Automatically generated make config: don't edit\n"
817 "# %s\n" 805 "# %s\n"
818 "# %s"
819 "#\n", 806 "#\n",
820 rootmenu.prompt->text, ctime(&now)); 807 rootmenu.prompt->text);
821 fprintf(tristate, "#\n" 808 fprintf(tristate, "#\n"
822 "# Automatically generated - do not edit\n" 809 "# Automatically generated - do not edit\n"
823 "\n"); 810 "\n");
824 fprintf(out_h, "/*\n" 811 fprintf(out_h, "/*\n"
825 " * Automatically generated C config: don't edit\n" 812 " * Automatically generated C config: don't edit\n"
826 " * %s\n" 813 " * %s\n"
827 " * %s"
828 " */\n", 814 " */\n",
829 rootmenu.prompt->text, ctime(&now)); 815 rootmenu.prompt->text);
830 816
831 for_all_symbols(i, sym) { 817 for_all_symbols(i, sym) {
832 sym_calc_value(sym); 818 sym_calc_value(sym);