Move ucore_version.h.in to src/ dir so it gets built properly
This commit is contained in:
@@ -1,12 +1,9 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
Import('env', 'build_type', 'prefix', 'version_info')
|
Import('env', 'build_type', 'prefix', 'version_info')
|
||||||
|
|
||||||
ucore_env = env.Clone()
|
ucore_env = env.Clone()
|
||||||
|
|
||||||
#substitute @version_xx@ strings
|
|
||||||
subst_version_info = dict(('@' + key + '@', version_info[key]) for key in version_info)
|
|
||||||
ucore_env.Substfile('ucore_version.c.in', SUBST_DICT = subst_version_info)
|
|
||||||
|
|
||||||
headers = ucore_env.Glob('*.h')
|
headers = ucore_env.Glob('*.h')
|
||||||
|
|
||||||
#install targets
|
#install targets
|
||||||
|
|||||||
@@ -43,5 +43,8 @@ extern const int ucore_version_patch;
|
|||||||
* e.g. development version or similar*/
|
* e.g. development version or similar*/
|
||||||
extern const char ucore_version_str[];
|
extern const char ucore_version_str[];
|
||||||
|
|
||||||
|
/** Hostname where the library was built
|
||||||
|
*/
|
||||||
|
extern const char ucore_build_host[];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,15 @@
|
|||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
|
|
||||||
Import('env', 'build_type', 'prefix', 'version_info')
|
Import('env', 'build_type', 'prefix', 'version_info')
|
||||||
|
|
||||||
ucore_env = env.Clone()
|
ucore_env = env.Clone()
|
||||||
|
|
||||||
|
#substitute @version_xx@ strings
|
||||||
|
subst_version_info = dict(('@' + key + '@', version_info[key]) for key in version_info)
|
||||||
|
subst_version_info['@build_host@'] = platform.node()
|
||||||
|
ucore_env.Substfile('ucore_version.c.in', SUBST_DICT = subst_version_info)
|
||||||
|
|
||||||
sources = ucore_env.Glob('*.c')
|
sources = ucore_env.Glob('*.c')
|
||||||
|
|
||||||
#print 'ucore_env', dir(ucore_env)
|
#print 'ucore_env', dir(ucore_env)
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
|
//Various info about the version and build.
|
||||||
|
//The SConscript file substitutes these at build time
|
||||||
|
|
||||||
const int ucore_version_major = @version_major@;
|
const int ucore_version_major = @version_major@;
|
||||||
const int ucore_version_minor = @version_minor@;
|
const int ucore_version_minor = @version_minor@;
|
||||||
const int ucore_version_patch = @version_patch@;
|
const int ucore_version_patch = @version_patch@;
|
||||||
|
|
||||||
const char ucore_version_str[] = "@version_major@.@version_minor@.@version_patch@.@version_revision@";
|
const char ucore_version_str[] = "@version_major@.@version_minor@.@version_patch@.@version_revision@";
|
||||||
|
const char ucore_build_host[] = "@build_host@";
|
||||||
|
|
||||||
Reference in New Issue
Block a user