Move ucore_version.h.in to src/ dir so it gets built properly

This commit is contained in:
Nils O. Selåsdal
2012-12-14 11:48:27 +01:00
parent 1ff2c00399
commit 993fad0076
4 changed files with 14 additions and 4 deletions
+1 -4
View File
@@ -1,12 +1,9 @@
import os
Import('env', 'build_type', 'prefix', 'version_info')
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')
#install targets
+3
View File
@@ -43,5 +43,8 @@ extern const int ucore_version_patch;
* e.g. development version or similar*/
extern const char ucore_version_str[];
/** Hostname where the library was built
*/
extern const char ucore_build_host[];
#endif
+7
View File
@@ -1,8 +1,15 @@
import os
import platform
Import('env', 'build_type', 'prefix', 'version_info')
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')
#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_minor = @version_minor@;
const int ucore_version_patch = @version_patch@;
const char ucore_version_str[] = "@version_major@.@version_minor@.@version_patch@.@version_revision@";
const char ucore_build_host[] = "@build_host@";