Skip to content

Commit

Permalink
Build deps which are contained in site-specific modules and add to $PA.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arjan Scherpenisse committed Feb 16, 2011
1 parent 1488ff4 commit 6daaf42
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ EBIN_DIRS := $(wildcard deps/*/ebin)
APP := zotonic
PARSER =src/erlydtl/erlydtl_parser

all: gen_smtp z_logger mochiweb webmachine module-deps priv-module-deps $(PARSER).erl erl ebin/$(APP).app
all: gen_smtp z_logger mochiweb webmachine module-deps $(PARSER).erl erl ebin/$(APP).app

erl:
@$(ERL) -pa $(EBIN_DIRS) -pa ebin -noinput +B \
Expand All @@ -26,10 +26,9 @@ webmachine:
cd deps/webmachine && $(MAKE)

module-deps:
if [ "`find modules/ -name Makefile`" != "" ]; then for f in "`ls modules/*/Makefile`"; do echo $$f; $(MAKE) -C `dirname $$f`; done; fi

priv-module-deps:
if [ "`find priv/modules/ -name Makefile`" != "" ]; then for f in "`ls priv/modules/*/Makefile`"; do echo $$f; $(MAKE) -C `dirname $$f`; done; fi
@if [ "`find modules/ -name Makefile`" != "" ]; then for f in "`ls modules/*/Makefile`"; do echo $$f; $(MAKE) -C `dirname $$f`; done; fi
@if [ "`find priv/modules/ -name Makefile`" != "" ]; then for f in "`ls priv/modules/*/Makefile`"; do echo $$f; $(MAKE) -C `dirname $$f`; done; fi
@if [ "`find priv/sites/*/modules/ -name Makefile`" != "" ]; then for f in "`ls priv/sites/*/modules/*/Makefile`"; do echo $$f; $(MAKE) -C `dirname $$f`; done; fi

docs:
@erl -noshell -run edoc_run application '$(APP)' '"."' '[]'
Expand All @@ -40,8 +39,9 @@ clean:
(cd deps/z_logger; $(MAKE) clean)
(cd deps/mochiweb; $(MAKE) clean)
(cd deps/webmachine; $(MAKE) clean)
if [ "`find modules/ -name Makefile`" != "" ]; then for f in "`ls modules/*/Makefile`"; do echo $$f; $(MAKE) -C `dirname $$f` clean; done; fi
if [ "`find priv/modules/ -name Makefile`" != "" ]; then for f in "`ls priv/modules/*/Makefile`"; do echo $$f; $(MAKE) -C `dirname $$f` clean; done; fi
@if [ "`find modules/ -name Makefile`" != "" ]; then for f in "`ls modules/*/Makefile`"; do echo $$f; $(MAKE) -C `dirname $$f` clean; done; fi
@if [ "`find priv/modules/ -name Makefile`" != "" ]; then for f in "`ls priv/modules/*/Makefile`"; do echo $$f; $(MAKE) -C `dirname $$f` clean; done; fi
@if [ "`find priv/sites/*/modules/ -name Makefile`" != "" ]; then for f in "`ls priv/sites/*/modules/*/Makefile`"; do echo $$f; $(MAKE) -C `dirname $$f` clean; done; fi
rm -f ebin/*.beam ebin/*.app
rm -f erl_crash.dump $(PARSER).erl
rm -f priv/log/*
Expand Down
2 changes: 1 addition & 1 deletion doc/zotonic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ZOTONIC=$BASE/zotonic
ERL="/usr/local/bin/erl"

# The include path for the erlang vm, add when needed for your application.
PA="$ZOTONIC/ebin $ZOTONIC/deps/*/ebin $ZOTONIC/modules/*/deps/*/ebin"
PA="$ZOTONIC/ebin $ZOTONIC/deps/*/ebin $ZOTONIC/modules/*/deps/*/ebin $ZOTONIC/priv/modules/*/deps/*/ebin $ZOTONIC/priv/sites/*/modules/*/deps/*/ebin"

# The name of the Erlang node, this must be unique on your host.
SNAME=zotonic001
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/helpers/zotonic_setup
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export SITES=${SITES:=$ZOTONIC/priv/sites}
export ERL=${ERL:=erl}

# The include path for the erlang vm, add when needed for your application.
export PA=${PA:="$ZOTONIC/ebin $ZOTONIC/deps/*/ebin $ZOTONIC/modules/*/deps/*/ebin $ZOTONIC/priv/modules/*/deps/*/ebin"}
export PA=${PA:="$ZOTONIC/ebin $ZOTONIC/deps/*/ebin $ZOTONIC/modules/*/deps/*/ebin $ZOTONIC/priv/modules/*/deps/*/ebin $ZOTONIC/priv/sites/*/modules/*/deps/*/ebin"}

# The name of the Erlang node, this must be unique on your host.
export SNAME=${SNAME:=zotonic001}
Expand Down

0 comments on commit 6daaf42

Please sign in to comment.