diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..4cb74af1b --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +14.02 diff --git a/base-codezero/src/core/target.inc b/base-codezero/src/core/target.inc index efcdc655f..bc74b52d1 100644 --- a/base-codezero/src/core/target.inc +++ b/base-codezero/src/core/target.inc @@ -36,6 +36,8 @@ INC_DIR += $(REP_DIR)/src/core/include \ $(REP_DIR)/include/codezero/dummies \ $(BASE_DIR)/src/base/thread +include $(GEN_CORE_DIR)/version.inc + vpath main.cc $(GEN_CORE_DIR) vpath ram_session_component.cc $(GEN_CORE_DIR) vpath rom_session_component.cc $(GEN_CORE_DIR) diff --git a/base-fiasco/src/core/target.inc b/base-fiasco/src/core/target.inc index 5c52fe575..e3b444148 100644 --- a/base-fiasco/src/core/target.inc +++ b/base-fiasco/src/core/target.inc @@ -36,6 +36,8 @@ INC_DIR += $(REP_DIR)/src/core/include \ LIBS += base-common +include $(GEN_CORE_DIR)/version.inc + vpath main.cc $(GEN_CORE_DIR) vpath multiboot_info.cc $(GEN_CORE_DIR) vpath ram_session_component.cc $(GEN_CORE_DIR) diff --git a/base-foc/src/core/target.inc b/base-foc/src/core/target.inc index 3c6e3078d..ba2114ec4 100644 --- a/base-foc/src/core/target.inc +++ b/base-foc/src/core/target.inc @@ -42,6 +42,8 @@ INC_DIR += $(REP_DIR)/src/core/include \ $(BASE_DIR)/src/base/thread \ $(REP_DIR)/src/base/console +include $(GEN_CORE_DIR)/version.inc + vpath context_area.cc $(GEN_CORE_DIR) vpath cpu_session_component.cc $(GEN_CORE_DIR) vpath dataspace_component.cc $(GEN_CORE_DIR) diff --git a/base-hw/src/core/target.inc b/base-hw/src/core/target.inc index 366be47f4..546b1c232 100644 --- a/base-hw/src/core/target.inc +++ b/base-hw/src/core/target.inc @@ -60,6 +60,9 @@ SRC_CC += console.cc \ pager.cc \ _main.cc +# provide Genode version information +include $(BASE_DIR)/src/core/version.inc + # declare file locations vpath _main.cc $(BASE_DIR)/src/platform vpath cpu_session_component.cc $(BASE_DIR)/src/core diff --git a/base-linux/src/core/target.mk b/base-linux/src/core/target.mk index 2c32c381f..c1ff26894 100644 --- a/base-linux/src/core/target.mk +++ b/base-linux/src/core/target.mk @@ -45,6 +45,8 @@ LD_SCRIPT_STATIC = $(LD_SCRIPT_DEFAULT) \ $(call select_from_repositories,src/platform/context_area.stdlib.ld) endif +include $(GEN_CORE_DIR)/version.inc + vpath main.cc $(GEN_CORE_DIR) vpath ram_session_component.cc $(GEN_CORE_DIR) vpath cpu_session_component.cc $(GEN_CORE_DIR) diff --git a/base-nova/src/core/target.inc b/base-nova/src/core/target.inc index 9d0a1cece..dbab69a0a 100644 --- a/base-nova/src/core/target.inc +++ b/base-nova/src/core/target.inc @@ -40,6 +40,8 @@ INC_DIR = $(REP_DIR)/src/core/include \ $(BASE_DIR)/src/base/thread \ $(GEN_CORE_DIR)/include +include $(GEN_CORE_DIR)/version.inc + vpath main.cc $(GEN_CORE_DIR) vpath ram_session_component.cc $(GEN_CORE_DIR) vpath rom_session_component.cc $(GEN_CORE_DIR) diff --git a/base-okl4/src/core/target.inc b/base-okl4/src/core/target.inc index 1a79e751d..d7fbcf5ed 100644 --- a/base-okl4/src/core/target.inc +++ b/base-okl4/src/core/target.inc @@ -39,6 +39,8 @@ INC_DIR += $(REP_DIR)/src/core/include \ $(BASE_DIR)/src/platform \ $(REP_DIR)/src/platform +include $(GEN_CORE_DIR)/version.inc + vpath main.cc $(GEN_CORE_DIR) vpath ram_session_component.cc $(GEN_CORE_DIR) vpath rom_session_component.cc $(GEN_CORE_DIR) diff --git a/base-pistachio/src/core/target.inc b/base-pistachio/src/core/target.inc index 5505bcfe3..e5fa0abd2 100644 --- a/base-pistachio/src/core/target.inc +++ b/base-pistachio/src/core/target.inc @@ -36,6 +36,8 @@ INC_DIR += $(REP_DIR)/src/core/include \ $(BASE_DIR)/src/base/thread \ $(GEN_CORE_DIR)/include +include $(GEN_CORE_DIR)/version.inc + vpath main.cc $(GEN_CORE_DIR) vpath ram_session_component.cc $(GEN_CORE_DIR) vpath rom_session_component.cc $(GEN_CORE_DIR) diff --git a/base/src/core/main.cc b/base/src/core/main.cc index d2f6fe9c0..f032ec404 100644 --- a/base/src/core/main.cc +++ b/base/src/core/main.cc @@ -181,6 +181,8 @@ int main() */ inhibit_tracing = true; + PINF("Genode " GENODE_VERSION); + PDBG("--- create local services ---"); static Trace::Source_registry trace_sources; diff --git a/base/src/core/version.inc b/base/src/core/version.inc new file mode 100644 index 000000000..e75f69332 --- /dev/null +++ b/base/src/core/version.inc @@ -0,0 +1,16 @@ +# +# Provide version information to main.cc +# +GENODE_ROOT_DIR = $(BASE_DIR)/.. +GENODE_VERSION := $(shell \ + which git > /dev/null \ + && git -C $(GENODE_ROOT_DIR) describe --dirty=" " 2> /dev/null \ + && exit 0 \ + || \ + test -r $(GENODE_ROOT_DIR)/VERSION \ + && cat $(GENODE_ROOT_DIR)/VERSION \ + && exit 0 \ + || \ + echo "") + +CC_OPT_main += -DGENODE_VERSION="\"$(GENODE_VERSION)\""