From 003e93e82bd427e6fdca999f9b6cef6b277b7045 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Thu, 4 Dec 2014 19:49:21 -0600 Subject: change name of config for where project apps lib to project_apps_dir --- src/rebar.hrl | 2 +- src/rebar_dir.erl | 2 +- src/rebar_prv_app_discovery.erl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rebar.hrl b/src/rebar.hrl index 260e188..fdef438 100644 --- a/src/rebar.hrl +++ b/src/rebar.hrl @@ -15,7 +15,7 @@ -define(DEFAULT_BASE_DIR, "_build"). -define(DEFAULT_PROFILE_DIR, "default"). --define(DEFAULT_LIB_DIRS, ["_checkouts", "apps", "lib", "."]). +-define(DEFAULT_PROJECT_APP_DIRS, ["_checkouts", "apps", "lib", "."]). -define(DEFAULT_DEPS_DIR, "lib"). -define(DEFAULT_PLUGINS_DIR, "plugins"). -define(DEFAULT_TEST_DEPS_DIR, "test/lib"). diff --git a/src/rebar_dir.erl b/src/rebar_dir.erl index a6f18ed..e692c65 100644 --- a/src/rebar_dir.erl +++ b/src/rebar_dir.erl @@ -44,7 +44,7 @@ plugins_dir(State) -> -spec lib_dirs(rebar_state:t()) -> file:filename_all(). lib_dirs(State) -> - rebar_state:get(State, lib_dirs, ?DEFAULT_LIB_DIRS). + rebar_state:get(State, project_app_dirs, ?DEFAULT_PROJECT_APP_DIRS). -spec default_profile_dir(rebar_state:t()) -> file:filename_all(). default_profile_dir(State) -> diff --git a/src/rebar_prv_app_discovery.erl b/src/rebar_prv_app_discovery.erl index b6cdf80..5e304cb 100644 --- a/src/rebar_prv_app_discovery.erl +++ b/src/rebar_prv_app_discovery.erl @@ -32,7 +32,7 @@ init(State) -> -spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}. do(State) -> - LibDirs = rebar_state:get(State, lib_dirs, ?DEFAULT_LIB_DIRS), + LibDirs = rebar_dir:lib_dirs(State), try State1 = rebar_app_discover:do(State, LibDirs), {ok, State1} -- cgit v1.1 From 111fc9769b629d8fa1bb0acf7da19404fc84e606 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Fri, 5 Dec 2014 09:58:05 -0600 Subject: merge over rebar2 PR #401 --- src/rebar_base_compiler.erl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/rebar_base_compiler.erl b/src/rebar_base_compiler.erl index ee023e7..293b4d8 100644 --- a/src/rebar_base_compiler.erl +++ b/src/rebar_base_compiler.erl @@ -104,12 +104,8 @@ simple_compile_wrapper(Source, Target, Compile3Fn, Config, true) -> end. target_file(SourceFile, SourceDir, SourceExt, TargetDir, TargetExt) -> - %% Remove all leading components of the source dir from the file -- we want - %% to maintain the deeper structure (if any) of the source file path BaseFile = remove_common_path(SourceFile, SourceDir), - filename:join([TargetDir, filename:dirname(BaseFile), - filename:basename(BaseFile, SourceExt) ++ TargetExt]). - + filename:join([TargetDir, filename:basename(BaseFile, SourceExt) ++ TargetExt]). remove_common_path(Fname, Path) -> remove_common_path1(filename:split(Fname), filename:split(Path)). -- cgit v1.1