Skip to content

Commit

Permalink
windows support in escript for refuge-build
Browse files Browse the repository at this point in the history
  • Loading branch information
fairwinds committed May 20, 2012
1 parent e50e2ae commit 37e90eb
Showing 1 changed file with 36 additions and 4 deletions.
40 changes: 36 additions & 4 deletions apps/couch/support/build.escript
Expand Up @@ -84,13 +84,45 @@ clean_unix() ->
sh(unix_make() ++ " -f c_src/Makefile.unix clean", Env),
erlang:halt(0).


build_win() ->
io:format("Windows platform isn't supported yet", []),
erlang:halt(1).
RefugeBuild = "c:\\refuge-build",
BuildWinLibs = filename:join(
[RefugeBuild, "scripts", "build_win_libs.bat"]
),
MakefileWindows = filename:join(
[RefugeBuild, "scripts", "Makefile_windows.bat"]
),
Env = os_env(),
case filelib:is_dir(RefugeBuild) of
true ->
%% build static libs
sh(BuildWinLibs ++ " " ++ rootdir(), Env),

%% make couchjs, icu driver and nifs
sh(MakefileWindows, Env),
erlang:halt(0);
false ->
io:format("[INFO] Refuge-Build is not installed~n", []),
erlang:halt(1)
end.


clean_win() ->
io:format("Windows platform isn't supported yet", []),
erlang:halt(1).
RefugeBuild = "c:\\refuge-build",
MakefileWindows = filename:join(
[RefugeBuild, "scripts", "Makefile_windows.bat"]
),
Env = os_env(),
case filelib:is_dir(RefugeBuild) of
true ->
io:format("==> couchjs, couch_collate (clean)~n", []),
sh(MakefileWindows ++ " clean", Env),
erlang:halt(0);
false ->
io:format("[INFO] Refuge-Build is not installed~n", []),
erlang:halt(1)
end.


unix_make() ->
Expand Down

0 comments on commit 37e90eb

Please sign in to comment.