Permalink
Browse files

Build deps which are contained in site-specific modules and add to $PA.

  • Loading branch information...
1 parent 6fb9ce5 commit 98c6c630d7b036adb64d881642a2e38fd274386e @arjan arjan committed Feb 16, 2011
Showing with 9 additions and 9 deletions.
  1. +7 −7 Makefile
  2. +1 −1 doc/zotonic.sh
  3. +1 −1 src/scripts/helpers/zotonic_setup
View
@@ -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 \
@@ -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)' '"."' '[]'
@@ -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/*
View
@@ -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
@@ -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}

0 comments on commit 98c6c63

Please sign in to comment.