diff options
author | Rickard Green <[email protected]> | 2014-01-16 18:24:23 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2014-01-16 18:24:23 +0100 |
commit | 045fcfc02ace59d07618f8983809236642bba630 (patch) | |
tree | 487889c5c7db88105b780fe73afd354d4d1870d5 /lib/test_server/src/ts_install.erl | |
parent | 733be6df9ca424a5545779af9526bc46fb9c5581 (diff) | |
parent | 0499e4b878216153eeb7a1d6fee07531470007a7 (diff) | |
download | otp-045fcfc02ace59d07618f8983809236642bba630.tar.gz otp-045fcfc02ace59d07618f8983809236642bba630.tar.bz2 otp-045fcfc02ace59d07618f8983809236642bba630.zip |
Merge branch 'rickard/ts_install_mXX_build'
* rickard/ts_install_mXX_build:
Teach ts_install --enable-mXX-build flag
Diffstat (limited to 'lib/test_server/src/ts_install.erl')
-rw-r--r-- | lib/test_server/src/ts_install.erl | 14 |
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) -> |