Skip to content

Commit

Permalink
Modify Makefile and .app file to make them suitable for rebar
Browse files Browse the repository at this point in the history
  • Loading branch information
jcomellas committed Feb 16, 2011
1 parent 29a5cfb commit 25d164a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 22 deletions.
49 changes: 30 additions & 19 deletions Makefile
@@ -1,31 +1,42 @@
APPLICATION := erlsom

SUBDIRS = src
include ./include.mk
include vsn.mk
ERL := erl
EPATH := -pa ebin
TEST_EPATH := -pa .eunit

DIALYZER=dialyzer
DIALYZER_OPTS=-Wno_return -Wrace_conditions -Wunderspecs -Wbehaviours
PLT_FILE=.erlsom_plt
APPS=kernel stdlib

all debug clean:
@set -e ; \
for d in $(SUBDIRS) ; do \
if [ -f $$d/Makefile ]; then ( cd $$d && $(MAKE) $@ ) || exit 1 ; fi ; \
done
.PHONY: all clean test

install: all
set -e ; \
for d in $(SUBDIRS) ; do \
if [ -f $$d/Makefile ]; then ( cd $$d && $(MAKE) $@ ) || exit 1 ; fi ; \
done; \
echo "** beam files went into $(DESTDIR)/$(APPDIR)/ebin"
all: compile

compile:
@./rebar compile

doc:
@./rebar doc

docs:
( cd doc && $(MAKE) docs )
clean:
@./rebar clean

conf_clean:
-rm include.mk config.cache config.status config.log 2> /dev/null
build-plt: compile
@./rebar build-plt

check-plt: compile
@./rebar check-plt

dialyze:
@./rebar dialyze

eunit:
@./rebar eunit

shell: compile
$(ERL) -sname $(APPLICATION) $(EPATH)

touch:
find . -name '*' -print | xargs touch -m
find . -name '*.erl' -print | xargs touch -m

6 changes: 3 additions & 3 deletions src/erlsom.app.src
@@ -1,7 +1,7 @@
{application,erlsom,
[{description,"erlsom XSD parser"},
{vsn,"%VSN%"},
{modules,[%MODULES%]},
{vsn,"1.2.1"},
{modules,[]},
{registered, []},
{env, []},
{applications,[kernel,stdlib]}]}.
{applications,[kernel,stdlib,inets]}]}.

0 comments on commit 25d164a

Please sign in to comment.