diff --git a/CMakeLists.txt b/CMakeLists.txt index d1248473..f587d808 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CROSSCOMPILING true) project(Luna LANGUAGES C CXX ASM ASM_NASM VERSION 0.4.0) +set(LUNA_RELEASE_NAME "Mercury") # Name for alpha releases set(LUNA_ROOT ${CMAKE_CURRENT_LIST_DIR}) set(LUNA_BASE ${CMAKE_CURRENT_LIST_DIR}/base) diff --git a/kernel/src/config.h.in b/kernel/src/config.h.in index 6cbc30ec..f7c0ae61 100644 --- a/kernel/src/config.h.in +++ b/kernel/src/config.h.in @@ -3,4 +3,12 @@ #define MOON_VERSION "@CMAKE_PROJECT_VERSION@" #define MOON_VERSION_MAJOR "@CMAKE_PROJECT_VERSION_MAJOR@" #define MOON_VERSION_MINOR "@CMAKE_PROJECT_VERSION_MINOR@" -#define MOON_VERSION_PATCH "@CMAKE_PROJECT_VERSION_PATCH@" \ No newline at end of file +#define MOON_VERSION_PATCH "@CMAKE_PROJECT_VERSION_PATCH@" + +#ifndef STRINGIZE_VALUE_OF +#define STRINGIZE(x) #x +#define STRINGIZE_VALUE_OF(x) STRINGIZE(x) +#endif + +#define MOON_RELEASE_NAME "@LUNA_RELEASE_NAME@" +#define MOON_RELEASE STRINGIZE_VALUE_OF(MOON_RELEASE_NAME) " " __DATE__ " " __TIME__ diff --git a/kernel/src/sys/uname.cpp b/kernel/src/sys/uname.cpp index d07e4325..8a41cad0 100644 --- a/kernel/src/sys/uname.cpp +++ b/kernel/src/sys/uname.cpp @@ -26,7 +26,7 @@ Result sys_uname(Registers*, SyscallArgs args) strncpy(result.release, MOON_VERSION, _UTSNAME_LENGTH); // FIXME: Hardcode this at build time instead of in code (should be the short commit hash). - strncpy(result.version, "alpha", _UTSNAME_LENGTH); + strncpy(result.version, MOON_RELEASE, _UTSNAME_LENGTH); strncpy(result.machine, CPU::platform_string().chars(), _UTSNAME_LENGTH);