Makefile: move version string from Config.in into Makefile

This re-instates writing the version string in .config headers, and no
longer provides it as a kconfig symbol in .config (it is now a variable
in the Makefile, and in the environment).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
Yann E. MORIN 2010-10-31 17:35:10 +01:00 committed by Peter Korsgaard
parent 2d239bbe27
commit e5e8fae892
4 changed files with 16 additions and 10 deletions

View File

@ -8,7 +8,7 @@ config BR2_HAVE_DOT_CONFIG
config BR2_VERSION config BR2_VERSION
string string
default "2010.11-git" option env="BR2_VERSION"
source "target/Config.in.arch" source "target/Config.in.arch"
source "target/device/Config.in" source "target/device/Config.in"

View File

@ -23,6 +23,9 @@
# You shouldn't need to mess with anything beyond this point... # You shouldn't need to mess with anything beyond this point...
#-------------------------------------------------------------- #--------------------------------------------------------------
# Set and export the version string
export BR2_VERSION:=2010.11-git
# This top-level Makefile can *not* be executed in parallel # This top-level Makefile can *not* be executed in parallel
.NOTPARALLEL: .NOTPARALLEL:
@ -631,9 +634,8 @@ help:
@echo 'See docs/README and docs/buildroot.html for further details' @echo 'See docs/README and docs/buildroot.html for further details'
@echo @echo
release: release: OUT=buildroot-$(BR2_VERSION)
OUT=buildroot-$$(grep -A2 BR2_VERSION $(CONFIG_CONFIG_IN)|grep default|cut -f2 -d\"); \ git archive --format=tar --prefix=$(OUT)/ master|gzip -9 >$(OUT).tar.gz
git archive --format=tar --prefix=$$OUT/ master|gzip -9 >$$OUT.tar.gz
.PHONY: $(noconfig_targets) .PHONY: $(noconfig_targets)

View File

@ -586,8 +586,10 @@ int conf_write(const char *name)
fprintf(out, _("#\n" fprintf(out, _("#\n"
"# Automatically generated make config: don't edit\n" "# Automatically generated make config: don't edit\n"
"# Buildroot version: %s\n"
"%s%s" "%s%s"
"#\n"), "#\n"),
sym_get_string_value(sym),
use_timestamp ? "# " : "", use_timestamp ? "# " : "",
use_timestamp ? ctime(&now) : ""); use_timestamp ? ctime(&now) : "");
@ -831,8 +833,10 @@ int conf_write_autoconf(void)
time(&now); time(&now);
fprintf(out, "#\n" fprintf(out, "#\n"
"# Automatically generated make config: don't edit\n" "# Automatically generated make config: don't edit\n"
"# Buildroot version: %s\n"
"# %s" "# %s"
"#\n", "#\n",
sym_get_string_value(sym),
ctime(&now)); ctime(&now));
fprintf(tristate, "#\n" fprintf(tristate, "#\n"
"# Automatically generated - do not edit\n" "# Automatically generated - do not edit\n"

View File

@ -69,18 +69,16 @@ Index: config/confdata.c
sym_calc_value(sym); sym_calc_value(sym);
time(&now); time(&now);
env = getenv("KCONFIG_NOTIMESTAMP"); env = getenv("KCONFIG_NOTIMESTAMP");
@@ -588,10 +588,8 @@ @@ -588,7 +588,7 @@
fprintf(out, _("#\n" fprintf(out, _("#\n"
"# Automatically generated make config: don't edit\n" "# Automatically generated make config: don't edit\n"
- "# Linux kernel version: %s\n" - "# Linux kernel version: %s\n"
+ "# Buildroot version: %s\n"
"%s%s" "%s%s"
"#\n"), "#\n"),
- sym_get_string_value(sym), sym_get_string_value(sym),
use_timestamp ? "# " : "", @@ -802,25 +802,25 @@
use_timestamp ? ctime(&now) : "");
@@ -802,25 +800,23 @@
return 1; return 1;
} }
@ -91,9 +89,11 @@ Index: config/confdata.c
fprintf(out, "#\n" fprintf(out, "#\n"
"# Automatically generated make config: don't edit\n" "# Automatically generated make config: don't edit\n"
- "# Linux kernel version: %s\n" - "# Linux kernel version: %s\n"
+ "# Buildroot version: %s\n"
"# %s" "# %s"
"#\n", "#\n",
- sym_get_string_value(sym), ctime(&now)); - sym_get_string_value(sym), ctime(&now));
+ sym_get_string_value(sym),
+ ctime(&now)); + ctime(&now));
fprintf(tristate, "#\n" fprintf(tristate, "#\n"
"# Automatically generated - do not edit\n" "# Automatically generated - do not edit\n"