diff options
author | Lukas Larsson <[email protected]> | 2012-03-19 16:52:14 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2012-05-02 09:51:44 +0200 |
commit | b834e188e6a2df3b2fd689618d43e6f878a5d1e4 (patch) | |
tree | b0c0fd1191d9cba7b04231226c30e6af006f297a /lib/test_server/src/ts_erl_config.erl | |
parent | 5573888eea1ff6e3e169a6c873c2f5ada81eab62 (diff) | |
download | otp-b834e188e6a2df3b2fd689618d43e6f878a5d1e4.tar.gz otp-b834e188e6a2df3b2fd689618d43e6f878a5d1e4.tar.bz2 otp-b834e188e6a2df3b2fd689618d43e6f878a5d1e4.zip |
Update cross build system for tests to work
ts has been fixed to again work in a cross build environment.
See ts:help() and xcomp/README.md for details about how it works.
Diffstat (limited to 'lib/test_server/src/ts_erl_config.erl')
-rw-r--r-- | lib/test_server/src/ts_erl_config.erl | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/lib/test_server/src/ts_erl_config.erl b/lib/test_server/src/ts_erl_config.erl index 5585e8ccd3..ed26156180 100644 --- a/lib/test_server/src/ts_erl_config.erl +++ b/lib/test_server/src/ts_erl_config.erl @@ -220,10 +220,6 @@ erl_interface(Vars,OsType) -> _ -> "" % VxWorks end, - CrossCompile = case OsType of - vxworks -> "true"; - _ -> "false" - end, [{erl_interface_libpath, filename:nativename(LibPath)}, {erl_interface_sock_libs, sock_libraries(OsType)}, {erl_interface_lib, Lib}, @@ -232,8 +228,8 @@ erl_interface(Vars,OsType) -> {erl_interface_eilib_drv, Lib1Drv}, {erl_interface_threadlib, ThreadLib}, {erl_interface_include, filename:nativename(Incl)}, - {erl_interface_mk_include, filename:nativename(MkIncl)}, - {erl_interface_cross_compile, CrossCompile} | Vars]. + {erl_interface_mk_include, filename:nativename(MkIncl)} + | Vars]. ic(Vars, OsType) -> {ClassPath, LibPath, Incl} = @@ -276,8 +272,6 @@ lib_dir(Vars, Lib) -> case {get_var(crossroot, Vars), LibLibDir} of {{error, _}, _} -> %no crossroot LibLibDir; - {_, {error, _}} -> %no lib - LibLibDir; {CrossRoot, _} -> %% XXX: Ugly. So ugly I won't comment it %% /Patrik @@ -299,18 +293,16 @@ lib_dir(Vars, Lib) -> end. erl_root(Vars) -> - Root = code:root_dir(), - case ts_lib:erlang_type() of + Root = case get_var(crossroot,Vars) of + {error, notfound} -> code:root_dir(); + CrossRoot -> CrossRoot + end, + case ts_lib:erlang_type(Root) of {srctree, _Version} -> Target = get_var(target, Vars), {srctree, Root, Target}; {_, _Version} -> - case get_var(crossroot,Vars) of - {error, notfound} -> - {installed, Root}; - CrossRoot -> - {installed, CrossRoot} - end + {installed, Root} end. |