Skip to content

Commit

Permalink
Use rebar for compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
ates committed Aug 6, 2012
1 parent 6741827 commit 72e303c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
1 change: 0 additions & 1 deletion Emakefile

This file was deleted.

9 changes: 3 additions & 6 deletions Makefile
@@ -1,10 +1,7 @@
ERL=erl

all: compile
REBAR = ./rebar

compile:
test -d ebin || mkdir ebin
$(ERL) -make
@$(REBAR) compile

clean:
rm -rf ebin erl_crash.dump manager.conf snmpm_config_db
@$(REBAR) clean
Binary file added rebar
Binary file not shown.
10 changes: 10 additions & 0 deletions rebar.config
@@ -0,0 +1,10 @@
{erl_opts, [
debug_info,
warn_obsolete_guards,
warn_unused_vars,
warn_unused_import
]}.

{clean_files, ["manager.conf", "snmpm_config_db"]}.

{xref_checks, [undefined_function_calls]}.
5 changes: 1 addition & 4 deletions snmpcl.app → src/snmpcl.app.src
@@ -1,10 +1,7 @@
{application, snmpcl, [
{description, "Simple SNMP client"},
{vsn, "0.1"},
{modules, [
snmpcl,
snmpcl_user
]},
{modules, []},
{registered, []},
{applications, [kernel, stdlib]},
{mod, {snmpcl, []}}
Expand Down
5 changes: 4 additions & 1 deletion src/snmpcl.erl
Expand Up @@ -2,8 +2,10 @@

-behaviour(application).

%% application callbacks
-export([start/2, stop/1]).

%% API
-export([walk/2, walk/3, walk/4]).

start(normal, _StartArgs) ->
Expand Down Expand Up @@ -34,5 +36,6 @@ walk(Version, Address, Community, Oid) ->
[{_, Oid, Type, Value, _}] = Result,
{Oid, Type, Value};
{error, Reason} ->
io:format("Can't send request to ~s due to ~p~n", [Address, Reason])
error_logger:error_msg("Can't send request to ~s due to ~p~n",
[Address, Reason])
end.

0 comments on commit 72e303c

Please sign in to comment.