From 2b39c09e4a6c5602d9188f3d2b276b82f82952bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Garay?= Date: Fri, 3 May 2013 12:34:45 -0300 Subject: [PATCH 1/3] Renamed test directory to /test from /tests --- Emakefile | 2 +- rebar.config | 2 +- {tests => test}/apns_tests.erl | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename {tests => test}/apns_tests.erl (100%) diff --git a/Emakefile b/Emakefile index acec763..51f591a 100644 --- a/Emakefile +++ b/Emakefile @@ -1,2 +1,2 @@ {"src/*", [warn_unused_vars, warn_export_all, warn_shadow_vars, warn_unused_import, warn_unused_function, warn_bif_clash, warn_unused_record, warn_deprecated_function, warn_obsolete_guard, strict_validation, report, warn_export_vars, warn_exported_vars, warn_missing_spec, warn_untyped_record, debug_info, {outdir, "ebin"}, {i, "include"}]}. -{"tests/*", [warn_unused_vars, warn_export_all, warn_shadow_vars, warn_unused_import, warn_unused_function, warn_bif_clash, warn_unused_record, warn_deprecated_function, warn_obsolete_guard, strict_validation, report, warn_export_vars, warn_exported_vars, warn_missing_spec, warn_untyped_record, debug_info, {outdir, "ebin"}, {i, "include"}]}. +{"test/*", [warn_unused_vars, warn_export_all, warn_shadow_vars, warn_unused_import, warn_unused_function, warn_bif_clash, warn_unused_record, warn_deprecated_function, warn_obsolete_guard, strict_validation, report, warn_export_vars, warn_exported_vars, warn_missing_spec, warn_untyped_record, debug_info, {outdir, "ebin"}, {i, "include"}]}. diff --git a/rebar.config b/rebar.config index 6557c5f..ab1d276 100644 --- a/rebar.config +++ b/rebar.config @@ -1,5 +1,5 @@ {require_otp_vsn, "R1[456]"}. -{erl_opts, [{src_dirs, ["src", "tests"]}, +{erl_opts, [{src_dirs, ["src", "test"]}, warn_unused_vars, warn_export_all, warn_shadow_vars, diff --git a/tests/apns_tests.erl b/test/apns_tests.erl similarity index 100% rename from tests/apns_tests.erl rename to test/apns_tests.erl From eb7fcb928d807e201309392378ee9d6e0fd3e647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Garay?= Date: Fri, 3 May 2013 12:36:48 -0300 Subject: [PATCH 2/3] Cleanup of Makefile for consistency. Removed use of deprecated rebar options for running build_plt and dialyze. Removed update-deps target. --- Makefile | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index bc9f74f..cc956d1 100644 --- a/Makefile +++ b/Makefile @@ -3,36 +3,34 @@ RUN := +Bc +K true -smp enable -pa ebin -s crypto -s inets -s ssl all: rebar get-deps && rebar compile +compile: + rebar compile + clean: rebar clean build_plt: all - rebar skip_deps=true build-plt + dialyzer --verbose --build_plt --apps kernel stdlib erts compiler hipe crypto \ + edoc gs syntax_tools --output_plt ~/.apns4erl.plt analyze: all - rebar dialyze - -update-deps: - rebar update-deps - -doc: all - rebar skip_deps=true doc + dialyzer --verbose --plt ~/.apns4erl.plt -Werror_handling ebin xref: all rebar skip_deps=true xref - -run: all + +shell: all if [ -f `hostname`.config ]; then\ - erl -config `hostname` -boot start_sasl ${RUN} -s apns;\ + erl -config `hostname` -boot start_sasl ${RUN};\ else\ - erl -boot start_sasl ${RUN} -s apns;\ + erl -boot start_sasl ${RUN};\ fi -shell: all +run: all if [ -f `hostname`.config ]; then\ - erl -config `hostname` -boot start_sasl ${RUN};\ + erl -config `hostname` -boot start_sasl ${RUN} -s apns;\ else\ - erl -boot start_sasl ${RUN};\ + erl -boot start_sasl ${RUN} -s apns;\ fi test: all @@ -41,3 +39,7 @@ test: all else\ erl -noshell -noinput ${RUN} -run apns_tests main;\ fi + +doc: compile + rebar skip_deps=true doc + From 1dd26cee1260a65cda2b6710876c58157d347779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Garay?= Date: Fri, 3 May 2013 12:47:41 -0300 Subject: [PATCH 3/3] Made xref verbose. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cc956d1..11a8de7 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ analyze: all dialyzer --verbose --plt ~/.apns4erl.plt -Werror_handling ebin xref: all - rebar skip_deps=true xref + rebar skip_deps=true --verbose xref shell: all if [ -f `hostname`.config ]; then\