aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/src
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-03-11 14:53:18 +0100
committerFredrik Gustafsson <[email protected]>2013-03-11 14:53:18 +0100
commit5a43729e86657e75e716ee879c03689a185965da (patch)
tree06b10689691064fb5a78e178dc81b5c243ba86d8 /lib/test_server/src
parentbcedc55d806e55da2c9967ae89878817cdc89460 (diff)
downloadotp-5a43729e86657e75e716ee879c03689a185965da.tar.gz
otp-5a43729e86657e75e716ee879c03689a185965da.tar.bz2
otp-5a43729e86657e75e716ee879c03689a185965da.zip
String instead of atom, not_found handled by ts:make
Diffstat (limited to 'lib/test_server/src')
-rw-r--r--lib/test_server/src/ts_erl_config.erl24
1 files changed, 20 insertions, 4 deletions
diff --git a/lib/test_server/src/ts_erl_config.erl b/lib/test_server/src/ts_erl_config.erl
index 298ab2c047..a0fab4e2d2 100644
--- a/lib/test_server/src/ts_erl_config.erl
+++ b/lib/test_server/src/ts_erl_config.erl
@@ -32,7 +32,7 @@ variables(Base0, OsType) ->
Base2 = get_app_vars(fun erl_interface/2, Base1, OsType),
Base3 = get_app_vars(fun ic/2, Base2, OsType),
Base4 = get_app_vars(fun jinterface/2, Base3, OsType),
- Base5 = dl_vars(Base4, OsType),
+ Base5 = dl_vars(Base4, Base3, OsType),
Base6 = emu_vars(Base5),
Base7 = get_app_vars(fun ssl/2, Base6, OsType),
Base8 = erts_lib(Base7, OsType),
@@ -53,14 +53,14 @@ get_app_vars(AppFun, Vars, OsType) ->
Res;
{cannot_find_app, App} ->
io:format("* WARNING: Cannot find ~p!~n", [App]),
- [{App,not_found}|Vars];
+ Vars;
{'EXIT', Reason} ->
exit(Reason);
Garbage ->
exit({unexpected_internal_error, Garbage})
end.
-dl_vars(Vars, _) ->
+dl_vars(Vars, Base3, OsType) ->
ShlibRules0 = ".SUFFIXES:\n" ++
".SUFFIXES: @dll@ @obj@ .c\n\n" ++
".c@dll@:\n" ++
@@ -68,7 +68,23 @@ dl_vars(Vars, _) ->
"\t@SHLIB_LD@ @CROSSLDFLAGS@ @SHLIB_LDFLAGS@ $(SHLIB_EXTRA_LDFLAGS) -o $@ $*@obj@ @SHLIB_LDLIBS@ $(SHLIB_EXTRA_LDLIBS)",
ShlibRules = ts_lib:subst(ShlibRules0, Vars),
- [{'SHLIB_RULES', ShlibRules}|Vars].
+ case get_app_vars2(fun jinterface/2, Base3, OsType) of
+ {App, not_found} ->
+ [{'SHLIB_RULES', ShlibRules}, {App, "not_found"}|Vars];
+ _ ->
+ [{'SHLIB_RULES', ShlibRules}|Vars]
+ end.
+get_app_vars2(AppFun, Vars, OsType) ->
+ case catch AppFun(Vars,OsType) of
+ Res when is_list(Res) ->
+ {jinterface, ok};
+ {cannot_find_app, App} ->
+ {App, not_found};
+ {'EXIT', Reason} ->
+ exit(Reason);
+ Garbage ->
+ exit({unexpected_internal_error, Garbage})
+ end.
erts_lib_name(multi_threaded, {win32, V}) ->
link_library("erts_MD" ++ case is_debug_build() of