diff --git a/awesome-version-internal.h b/awesome-version-internal.h index 85d23b7c6..e916e50c1 100644 --- a/awesome-version-internal.h +++ b/awesome-version-internal.h @@ -2,9 +2,6 @@ #define _AWE_VERSION_INTERNAL_H_ #define AWESOME_VERSION "@AWESOME_VERSION@" -#define AWESOME_COMPILE_MACHINE "@AWESOME_COMPILE_MACHINE@" -#define AWESOME_COMPILE_BY "@AWESOME_COMPILE_BY@" -#define AWESOME_COMPILE_HOSTNAME "@AWESOME_COMPILE_HOSTNAME@" #define AWESOME_RELEASE "@AWESOME_RELEASE@" #endif //_AWE_VERSION_INTERNAL_H_ diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index 2cb6e236e..060785a8e 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -35,7 +35,6 @@ macro(a_find_program var prg req) endmacro() a_find_program(GIT_EXECUTABLE git FALSE) -a_find_program(HOSTNAME_EXECUTABLE hostname FALSE) # programs needed for man pages a_find_program(ASCIIDOC_EXECUTABLE asciidoc FALSE) a_find_program(XMLTO_EXECUTABLE xmlto FALSE) @@ -100,14 +99,6 @@ elseif( EXISTS ${SOURCE_DIR}/.version_stamp ) endif() # }}} -# {{{ Get hostname -execute_process( - COMMAND ${HOSTNAME_EXECUTABLE} - WORKING_DIRECTORY ${SOURCE_DIR} - OUTPUT_VARIABLE BUILDHOSTNAME - OUTPUT_STRIP_TRAILING_WHITESPACE) -# }}} - # {{{ Required libraries # # this sets up: @@ -297,9 +288,6 @@ endif() mark_as_advanced(CMAKE_INSTALL_CMAKE_INSTALL_PREFIX) set(AWESOME_VERSION ${VERSION}) -set(AWESOME_COMPILE_MACHINE ${CMAKE_SYSTEM_PROCESSOR}) -set(AWESOME_COMPILE_HOSTNAME ${BUILDHOSTNAME}) -set(AWESOME_COMPILE_BY $ENV{USER}) set(AWESOME_RELEASE ${CODENAME}) set(AWESOME_SYSCONFDIR ${XDG_CONFIG_DIR}/${PROJECT_AWE_NAME}) set(AWESOME_LUA_LIB_PATH ${AWESOME_DATA_PATH}/lib) diff --git a/common/version.c b/common/version.c index 2786a4d91..fbd970e61 100644 --- a/common/version.c +++ b/common/version.c @@ -35,34 +35,24 @@ void eprint_version(void) { - printf("awesome " AWESOME_VERSION - " (" AWESOME_RELEASE ")\n" - " • Build:"); -#if defined(__DATE__) && defined(__TIME__) - printf(" " __DATE__ " " __TIME__); -#endif - printf(" for %s", AWESOME_COMPILE_MACHINE); -#if defined(__GNUC__) \ - && defined(__GNUC_MINOR__) \ - && defined(__GNUC_PATCHLEVEL__) - printf(" by gcc version %d.%d.%d", - __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__); -#endif - printf(" (%s@%s)\n", AWESOME_COMPILE_BY, AWESOME_COMPILE_HOSTNAME); - lua_State *L = luaL_newstate(); luaopen_base(L); lua_getglobal(L, "_VERSION"); - printf(" • Compiled against " LUA_RELEASE - " (running with %s)\n", lua_tostring(L, -1)); + +#ifdef WITH_DBUS + const char *has_dbus = "✔"; +#else + const char *has_dbus = "✘"; +#endif + + printf("awesome %s (%s)\n" + " • Compiled against %s (running with %s)\n" + " • D-Bus support: %s\n", + AWESOME_VERSION, AWESOME_RELEASE, + LUA_RELEASE, lua_tostring(L, -1), + has_dbus); lua_close(L); - printf(" • D-Bus support: "); -#ifdef WITH_DBUS - printf("✔\n"); -#else - printf("✘\n"); -#endif exit(EXIT_SUCCESS); }