diff options
author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-05-23 12:24:55 +0200 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-05-23 12:24:55 +0200 |
commit | 892dc48a860892b3eeb36e519287c26f09fff5b8 (patch) | |
tree | 88760ab410462962664738d3925734c88bd0bf86 | |
parent | 39f8b344bcf27272b34965e9f28eb8335564e3ac (diff) |
Fix indentation errors
-rw-r--r-- | src/rebar.erl | 4 | ||||
-rw-r--r-- | src/rebar_port_compiler.erl | 73 |
2 files changed, 38 insertions, 39 deletions
diff --git a/src/rebar.erl b/src/rebar.erl index 6dff4e5..36114cf 100644 --- a/src/rebar.erl +++ b/src/rebar.erl @@ -244,8 +244,8 @@ version Show version information option_spec_list() -> Jobs = rebar_config:get_jobs(), JobsHelp = io_lib:format( - "Number of concurrent workers a command may use. Default: ~B", - [Jobs]), + "Number of concurrent workers a command may use. Default: ~B", + [Jobs]), [ %% {Name, ShortOpt, LongOpt, ArgSpec, HelpMsg} {help, $h, "help", undefined, "Show the program options"}, diff --git a/src/rebar_port_compiler.erl b/src/rebar_port_compiler.erl index 5ae1b40..19c6f79 100644 --- a/src/rebar_port_compiler.erl +++ b/src/rebar_port_compiler.erl @@ -115,21 +115,20 @@ compile(Config, AppFile) -> %% Only relink if necessary, given the SoName %% and list of new binaries lists:foreach( - fun({SoName,Bins}) -> - AllBins = [sets:from_list(Bins), - sets:from_list(NewBins)], - NewBins1 = sets:intersection(AllBins), - case needs_link(SoName, sets:to_list(NewBins1)) of - true -> - Fmt = "$CC ~s $LDFLAGS $DRV_LDFLAGS -o ~s", - Vars = [string:join(Bins, " "), SoName], - rebar_utils:sh(?FMT(Fmt, Vars), - [{env, Env}]); - false -> - ?INFO("Skipping relink of ~s\n", [SoName]), - ok - end - end, SoSpecs) + fun({SoName,Bins}) -> + AllBins = [sets:from_list(Bins), sets:from_list(NewBins)], + Intersection = sets:intersection(AllBins), + case needs_link(SoName, sets:to_list(Intersection)) of + true -> + rebar_utils:sh( + ?FMT("$CC ~s $LDFLAGS $DRV_LDFLAGS -o ~s", + [string:join(Bins, " "), SoName]), + [{env, Env}]); + false -> + ?INFO("Skipping relink of ~s\n", [SoName]), + ok + end + end, SoSpecs) end. clean(Config, AppFile) -> @@ -226,8 +225,8 @@ compile_each([Source | Rest], Config, Env, NewBins, ExistingBins) -> [Source, Bin]), [{env, Env}]); "$CXX" -> rebar_utils:sh( - ?FMT("$CXX -c $CXXFLAGS $DRV_CFLAGS ~s -o ~s", - [Source, Bin]), [{env, Env}]) + ?FMT("$CXX -c $CXXFLAGS $DRV_CFLAGS ~s -o ~s", + [Source, Bin]), [{env, Env}]) end, compile_each(Rest, Config, Env, [Bin | NewBins], ExistingBins); @@ -275,16 +274,16 @@ compiler(_) -> "$CC". %% apply_defaults(Vars, Defaults) -> dict:to_list( - dict:merge(fun(Key, VarValue, DefaultValue) -> - case is_expandable(DefaultValue) of - true -> - expand_env_variable(DefaultValue, - Key, VarValue); - false -> VarValue - end - end, - dict:from_list(Vars), - dict:from_list(Defaults))). + dict:merge(fun(Key, VarValue, DefaultValue) -> + case is_expandable(DefaultValue) of + true -> + expand_env_variable(DefaultValue, + Key, VarValue); + false -> VarValue + end + end, + dict:from_list(Vars), + dict:from_list(Defaults))). %% %% Given a list of {Key, Value} environment variables, where Key may be defined %% multiple times, walk the list and expand each self-reference so that we @@ -330,16 +329,16 @@ expand_vars_loop(Vars0, Count) -> %% expand_vars(Key, Value, Vars) -> lists:foldl( - fun({AKey, AValue}, Acc) -> - NewValue = case AKey of - Key -> - AValue; - _ -> - expand_env_variable(AValue, Key, Value) - end, - [{AKey, NewValue} | Acc] - end, - [], Vars). + fun({AKey, AValue}, Acc) -> + NewValue = case AKey of + Key -> + AValue; + _ -> + expand_env_variable(AValue, Key, Value) + end, + [{AKey, NewValue} | Acc] + end, + [], Vars). %% |