Remove useless information from awesome -v

Most of this information isn't interesting. If you are getting awesome from a
distro, then the time, hostname and username of the build are likely 'random
stuff' and if you are building awesome yourself, then the hostname and username
are obviously yours and the time can still be interfered based on the awesome's
binary ctime.

The GCC version shouldn't make any difference at all.

Closes https://github.com/awesomeWM/awesome/pull/566.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2015-11-19 17:15:48 +01:00
parent f29eb2fee3
commit a93dc75cd6
3 changed files with 13 additions and 38 deletions

View File

@ -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_

View File

@ -47,7 +47,6 @@ a_find_program(CAT_EXECUTABLE cat TRUE)
a_find_program(LN_EXECUTABLE ln TRUE)
a_find_program(GREP_EXECUTABLE grep TRUE)
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)
@ -113,14 +112,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:
@ -271,9 +262,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)

View File

@ -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);
}