From dce1673fdbf53448260b6c5757a25160c70ee1d2 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Thu, 14 Jan 2010 07:02:14 -0500 Subject: Make sure include/ directory exists --- src/rebar_protobuffs_compiler.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -> -- cgit v1.1