Skip to content

Commit 733307a

Browse files
committed
Fixing up bits and pieces to allow releases to build.
1 parent 586c74e commit 733307a

File tree

7 files changed

+19
-16
lines changed

7 files changed

+19
-16
lines changed

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ D_INC_DIRS=$(subst lib/, -I lib/,$(wildcard lib/*/include))
1212
D_EBIN_DIRS=$(subst lib/, -pa lib/,$(wildcard lib/*/ebin))
1313

1414
INCLUDE ?=-I ${ERLANG_ROOT}/lib/stdlib-*/include ${D_INC_DIRS} -I ${EUNIT_ROOT}/include -I include/
15-
CODEPATH ?=-pz lib/*/ebin/ -pz ebin/
15+
CODEPATH ?=-pz lib/*/ebin/ -pz ebin/ -pz ${EUNIT_ROOT}/ebin/
1616
CODEPATH_JUNGERL ?=-pz ${JUNGERL_ROOT}/lib/*/ebin/
1717

1818
ERLC_CODEPATH ?=${D_EBIN_DIRS} -pz ${EUNIT_ROOT}/ebin -pz ebin
@@ -23,7 +23,7 @@ EXTRA_DIALYZER_BEAM_FILES ?=$(wildcard lib/oserl*/ebin/*.beam lib/common_lib*/eb
2323

2424
NODE ?=-name ${APP_NAME}@127.0.0.1
2525

26-
all: ${BEAM_FILES} src/TAGS
26+
all: ebin ${BEAM_FILES} src/TAGS
2727

2828
release: ${BEAM_FILES} test xref dialyzer.report docs releases/${VSN}/${APP_NAME}.tar.gz
2929

@@ -40,14 +40,15 @@ clean:
4040
@rm -f ebin/*.beam priv/sasl/* priv/sasl.log priv/yaws/logs/*.{log,old,access}
4141
@find src/ priv/ -iname \*~ | xargs rm -v
4242

43+
ebin:
44+
[ ! -d ebin ] && mkdir ebin
45+
4346
ebin/%.beam: src/%.erl ${HRL_FILES}
4447
@echo $@: erlc ${ERLC_FLAGS} ${ERLC_CODEPATH} ${ERLC_CODEPATH_JUNGERL} ${INCLUDE} $<
4548
@erlc ${ERLC_FLAGS} ${ERLC_CODEPATH} ${ERLC_CODEPATH_JUNGERL} ${INCLUDE} $<
4649

4750
docs: ${ERL_FILES}
4851
erl -noshell -run edoc_run application "'$(APP_NAME)'" '"."' '[{def,{vsn,"$(VSN)"}}]'
49-
rm -rf priv/yaws/docroot/doc
50-
cp -r doc priv/yaws/docroot/
5152

5253
test: ${BEAM_FILES}
5354
erl $(CODEPATH) $(CODEPATH_JUNGERL) -config priv/${APP_NAME} -eval "lists:map(fun(A) -> {A,application:start(A)} end, [${APP_DEPS}]), application:load(${APP_NAME}), lists:foreach(fun (M) -> io:fwrite(\"Testing ~p:~n\", [M]), eunit:test(M) end, [`perl -e 'print join(",", qw(${MODULES}));'`])." -s init stop -noshell

doc/.git.notempty

Whitespace-only changes.

lib/.git.notempty

Whitespace-only changes.

releases/0.1/skel.rel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{release,
2+
{"SKEL", "0.1"},
3+
{erts, "5.6.3"},
4+
[{skel,"0.1"},
5+
{stdlib,"1.15.3"},
6+
{kernel,"2.12.3"}
7+
]}.

src/skel_app.erl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
%% @doc application skeleton
66
%% @end
77
%%%-------------------------------------------------------------------
8-
-module(skell_app).
8+
-module(skel_app).
99

1010
-behaviour(application).
1111

@@ -26,12 +26,7 @@
2626
%% top supervisor of the tree.
2727
%%--------------------------------------------------------------------
2828
start(_Type, StartArgs) ->
29-
case skel_sup:start_link(StartArgs) of
30-
{ok, Pid} ->
31-
{ok, Pid};
32-
Error ->
33-
Error
34-
end.
29+
skel_sup:start_link(StartArgs).
3530

3631
%%--------------------------------------------------------------------
3732
%% Function: stop(State) -> void()

src/skel_fsm.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
%% does not return until Module:init/1 has returned.
3232
%%--------------------------------------------------------------------
3333
start_link() ->
34-
gen_fsm:start_link({local, ?SERVER}, ?MODULE, [], []).
34+
gen_fsm:start_link({local, ?MODULE}, ?MODULE, [], []).
3535

3636
%%====================================================================
3737
%% gen_fsm callbacks

src/skel_sup.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
-behaviour(supervisor).
1111

1212
%% API
13-
-export([start_link/0]).
13+
-export([start_link/1]).
1414

1515
%% Supervisor callbacks
1616
-export([init/1]).
@@ -21,11 +21,11 @@
2121
%% API functions
2222
%%====================================================================
2323
%%--------------------------------------------------------------------
24-
%% @spec start_link() -> {ok,Pid} | ignore | {error,Error}
24+
%% @spec start_link(Args::any()) -> {ok,Pid} | ignore | {error,Error}
2525
%% @doc: Starts the supervisor
2626
%% @end
2727
%%--------------------------------------------------------------------
28-
start_link() ->
28+
start_link(_) ->
2929
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
3030

3131
%%====================================================================
@@ -44,7 +44,7 @@ start_link() ->
4444
%%--------------------------------------------------------------------
4545
init([]) ->
4646
AChild = {"Skeleton Server",
47-
{skel_server,start_link,[]},
47+
{skel_srv,start_link,[]},
4848
permanent,2000,worker,
4949
[skel_server]},
5050
{ok,{{one_for_all,0,1}, [AChild]}}.

0 commit comments

Comments
 (0)