diff options
author | Dave Smith <dizzyd@dizzyd.com> | 2010-02-16 07:05:29 -0700 |
---|---|---|
committer | Dave Smith <dizzyd@dizzyd.com> | 2010-02-16 07:05:29 -0700 |
commit | 1f6d861ababc5bead8cf75e0d0ee63f33798f42a (patch) | |
tree | fa1da08058bf141171c37b1a9559b759e527aa63 /src/rebar_utils.erl | |
parent | 51133313a6eb44171a0eb4e3a087febf06bd8622 (diff) |
Overhaul env expansion so that rebar fully expands env refs prior to invoking the shell script. Also now using DRV_* env vars for compilation/linking of files found in c_src; this frees up "normal" CFLAGS/LDFLAGS for usage in sub build scripts.
Diffstat (limited to 'src/rebar_utils.erl')
-rw-r--r-- | src/rebar_utils.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index 1e99caa..32a2261 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -35,7 +35,8 @@ find_files/2, now_str/0, ensure_dir/1, - beam_to_mod/2, beams/1]). + beam_to_mod/2, beams/1, + abort/2]). -include("rebar.hrl"). @@ -92,7 +93,7 @@ find_files(Dir, Regex) -> now_str() -> {{Year, Month, Day}, {Hour, Minute, Second}} = calendar:local_time(), - lists:flatten(io_lib:format("~4b/~2..0b/~2..0b ~2..0b:~2..0b:~2..0b", + lists:flatten(io_lib:format("~4b/~2..0b/~2..0b ~2..0b:~2..0b:~2..0b", [Year, Month, Day, Hour, Minute, Second])). %% TODO: Review why filelib:ensure_dir/1 sometimes returns {error, eexist}. @@ -113,6 +114,10 @@ ensure_dir(Path) -> Error end. +abort(String, Args) -> + ?ERROR(String, Args), + halt(1). + %% ==================================================================== %% Internal functions %% ==================================================================== |