Permalink
Browse files

Prepare build system for downloadable modules

  • Loading branch information...
arjan committed Feb 15, 2011
1 parent 7530c90 commit db933396b6c97dbe5a6499e2e26c2fdf6fbeb58d
Showing with 9 additions and 3 deletions.
  1. +2 −0 Emakefile
  2. +7 −3 Makefile
  3. 0 priv/modules/.empty
View
@@ -6,6 +6,8 @@
"src/*/*/*/*",
"modules/*/*",
"modules/*/*/*",
+ "priv/modules/*/*",
+ "priv/modules/*/*/*",
"priv/sites/*/*",
"priv/sites/*/*/*",
"priv/sites/*/support/*/*",
View
@@ -4,7 +4,7 @@ EBIN_DIRS := $(wildcard deps/*/ebin)
APP := zotonic
PARSER =src/erlydtl/erlydtl_parser
-all: gen_smtp z_logger mochiweb webmachine erlang-oauth module-deps $(PARSER).erl erl ebin/$(APP).app
+all: gen_smtp z_logger mochiweb webmachine erlang-oauth module-deps priv-module-deps $(PARSER).erl erl ebin/$(APP).app
erl:
@$(ERL) -pa $(EBIN_DIRS) -pa ebin -noinput +B \
@@ -29,7 +29,10 @@ erlang-oauth:
cd deps/erlang-oauth && $(MAKE)
module-deps:
- for f in "`ls modules/*/Makefile`"; do echo $$f; $(MAKE) -C `dirname $$f`; done
+ if [ -e modules/*/Makefile ]; then for f in "`ls modules/*/Makefile`"; do echo $$f; $(MAKE) -C `dirname $$f`; done; fi
+
+priv-module-deps:
+ if [ -e modules/priv/*/Makefile ]; then for f in "`ls priv/modules/*/Makefile`"; do echo $$f; $(MAKE) -C `dirname $$f`; done; fi
docs:
@erl -noshell -run edoc_run application '$(APP)' '"."' '[]'
@@ -41,7 +44,8 @@ clean:
(cd deps/mochiweb; $(MAKE) clean)
(cd deps/webmachine; $(MAKE) clean)
(cd deps/erlang-oauth; $(MAKE) clean)
- for f in modules/*/Makefile; do make -C `dirname $$f` clean; done
+ if [ -e modules/*/Makefile ]; then for f in modules/*/Makefile; do make -C `dirname $$f` clean; done; fi
+ if [ -e modules/priv/*/Makefile ]; then for f in priv/modules/*/Makefile; do 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
No changes.

0 comments on commit db93339

Please sign in to comment.