summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2010-01-14 07:02:14 -0500
committerDave Smith <dizzyd@dizzyd.com>2010-01-14 07:02:14 -0500
commitdce1673fdbf53448260b6c5757a25160c70ee1d2 (patch)
tree858d1377156c50aaccc55435881f74bcbf7256fd /src
parentabeac053e0a4656017f414b0a6417b7a8f163285 (diff)
Make sure include/ directory exists
Diffstat (limited to 'src')
-rw-r--r--src/rebar_protobuffs_compiler.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rebar_protobuffs_compiler.erl b/src/rebar_protobuffs_compiler.erl
index c754747..7a61fad 100644
--- a/src/rebar_protobuffs_compiler.erl
+++ b/src/rebar_protobuffs_compiler.erl
@@ -45,7 +45,8 @@ compile(_Config, _AppFile) ->
case protobuffs_is_present() of
true ->
%% Build a list of output files - { Proto, Beam, Hrl }
- Targets = [{Proto, beam_file(Proto), hrl_file(Proto)} || Proto <- FoundFiles],
+ Targets = [{Proto, beam_file(Proto), hrl_file(Proto)} ||
+ Proto <- FoundFiles],
%% Compile each proto file
compile_each(Targets);
@@ -109,6 +110,7 @@ compile_each([{Proto, Beam, Hrl} | Rest]) ->
%% into the ebin/ and include/ directories respectively
%% TODO: Protobuffs really needs to be better about this...sigh.
[] = os:cmd(?FMT("mv ~s ebin", [Beam])),
+ filelib:ensure_dir(Hrl),
[] = os:cmd(?FMT("mv ~s include", [Hrl])),
ok;
Other ->