Only include awesome-version-internal.h in one place
This means we have one less file which gets recompiled every time the result from "git describe" changes. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
e65ecb853b
commit
a7cdbf468b
|
@ -66,4 +66,22 @@ eprint_version(void)
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Get version string.
|
||||||
|
* \return A string describing the current version.
|
||||||
|
*/
|
||||||
|
const char *
|
||||||
|
awesome_version_string(void)
|
||||||
|
{
|
||||||
|
return AWESOME_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get release string.
|
||||||
|
* \return A string describing the code name of the relase.
|
||||||
|
*/
|
||||||
|
const char *
|
||||||
|
awesome_release_string(void)
|
||||||
|
{
|
||||||
|
return AWESOME_RELEASE;
|
||||||
|
}
|
||||||
|
|
||||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||||
|
|
|
@ -23,5 +23,7 @@
|
||||||
#define AWESOME_COMMON_VERSION_H
|
#define AWESOME_COMMON_VERSION_H
|
||||||
|
|
||||||
void eprint_version(void) __attribute__ ((noreturn));
|
void eprint_version(void) __attribute__ ((noreturn));
|
||||||
|
const char *awesome_version_string(void);
|
||||||
|
const char *awesome_release_string(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
6
luaa.c
6
luaa.c
|
@ -23,9 +23,9 @@
|
||||||
|
|
||||||
#include "luaa.h"
|
#include "luaa.h"
|
||||||
#include "globalconf.h"
|
#include "globalconf.h"
|
||||||
#include "awesome-version-internal.h"
|
|
||||||
#include "awesome.h"
|
#include "awesome.h"
|
||||||
#include "common/backtrace.h"
|
#include "common/backtrace.h"
|
||||||
|
#include "common/version.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "objects/client.h"
|
#include "objects/client.h"
|
||||||
|
@ -222,13 +222,13 @@ luaA_awesome_index(lua_State *L)
|
||||||
|
|
||||||
if(A_STREQ(buf, "version"))
|
if(A_STREQ(buf, "version"))
|
||||||
{
|
{
|
||||||
lua_pushliteral(L, AWESOME_VERSION);
|
lua_pushstring(L, awesome_version_string());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(A_STREQ(buf, "release"))
|
if(A_STREQ(buf, "release"))
|
||||||
{
|
{
|
||||||
lua_pushliteral(L, AWESOME_RELEASE);
|
lua_pushstring(L, awesome_release_string());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue