aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/src/ts_install.erl
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2014-01-13 17:57:28 +0100
committerRickard Green <[email protected]>2014-01-16 18:20:35 +0100
commit0499e4b878216153eeb7a1d6fee07531470007a7 (patch)
tree300ab76489e90128d6c2a446b05e83459046b6f7 /lib/test_server/src/ts_install.erl
parent589eba64f9c1fdef8a717c930aa8a51c47291a53 (diff)
downloadotp-0499e4b878216153eeb7a1d6fee07531470007a7.tar.gz
otp-0499e4b878216153eeb7a1d6fee07531470007a7.tar.bz2
otp-0499e4b878216153eeb7a1d6fee07531470007a7.zip
Teach ts_install --enable-mXX-build flag
Pick up --enable-m32-build and --enable-m64-build configure flags from the CONFIG_FLAGS environment variable and pass along to the ts configure script.
Diffstat (limited to 'lib/test_server/src/ts_install.erl')
-rw-r--r--lib/test_server/src/ts_install.erl14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/test_server/src/ts_install.erl b/lib/test_server/src/ts_install.erl
index e9e559df5d..bc62015ac3 100644
--- a/lib/test_server/src/ts_install.erl
+++ b/lib/test_server/src/ts_install.erl
@@ -112,6 +112,12 @@ get_vars([], name, [], Result) ->
get_vars(_, _, _, _) ->
{error, fatal_bad_conf_vars}.
+config_flags() ->
+ case os:getenv("CONFIG_FLAGS") of
+ false -> [];
+ CF -> string:tokens(CF, " \t\n")
+ end.
+
unix_autoconf(XConf) ->
Configure = filename:absname("configure"),
Flags = proplists:get_value(crossflags,XConf,[]),
@@ -122,11 +128,14 @@ unix_autoconf(XConf) ->
erlang:system_info(threads) /= false],
Debug = [" --enable-debug-mode" ||
string:str(erlang:system_info(system_version),"debug") > 0],
- Args = Host ++ Build ++ Threads ++ Debug,
+ MXX_Build = [Y || Y <- config_flags(),
+ Y == "--enable-m64-build"
+ orelse Y == "--enable-m32-build"],
+ Args = Host ++ Build ++ Threads ++ Debug ++ " " ++ MXX_Build,
case filelib:is_file(Configure) of
true ->
OSXEnv = macosx_cflags(),
- io:format("Running ~sEnv: ~p~n",
+ io:format("Running ~s~nEnv: ~p~n",
[lists:flatten(Configure ++ Args),Env++OSXEnv]),
Port = open_port({spawn, lists:flatten(["\"",Configure,"\"",Args])},
[stream, eof, {env,Env++OSXEnv}]),
@@ -135,7 +144,6 @@ unix_autoconf(XConf) ->
{error, no_configure_script}
end.
-
get_xcomp_flag(Flag, Flags) ->
get_xcomp_flag(Flag, Flag, Flags).
get_xcomp_flag(Flag, Tag, Flags) ->