aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-01-29 02:33:23 +0100
committerLoïc Hoguin <[email protected]>2013-01-29 02:33:23 +0100
commit747bfc29ee951841f38d6e8d471041d6a3008d60 (patch)
tree202735e378a3b05e7a98da7e7580cb164c2117b0 /Makefile
parentba924cbb7fa3b8dc08a89b4ebb276e7802a9697c (diff)
downloadcowboy-747bfc29ee951841f38d6e8d471041d6a3008d60.tar.gz
cowboy-747bfc29ee951841f38d6e8d471041d6a3008d60.tar.bz2
cowboy-747bfc29ee951841f38d6e8d471041d6a3008d60.zip
Makefile: only recompile files newer than the .app
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index fb00e22..8403c22 100644
--- a/Makefile
+++ b/Makefile
@@ -24,14 +24,16 @@ deps/ranch:
MODULES = $(shell ls src/*.erl | sed 's/src\///;s/\.erl/,/' | sed '$$s/.$$//')
-app: deps/ranch
- @$(MAKE) -C $(DEPS_DIR)/ranch
- @mkdir -p ebin/
+app: deps/ranch ebin/$(PROJECT).app
@cat src/$(PROJECT).app.src \
| sed 's/{modules, \[\]}/{modules, \[$(MODULES)\]}/' \
> ebin/$(PROJECT).app
+ @$(MAKE) -C $(DEPS_DIR)/ranch
+
+ebin/$(PROJECT).app: src/*.erl
+ @mkdir -p ebin/
erlc -v $(ERLC_OPTS) -o ebin/ -pa ebin/ \
- src/$(PROJECT)_middleware.erl src/*.erl
+ src/$(PROJECT)_middleware.erl $?
clean:
-@$(MAKE) -C $(DEPS_DIR)/ranch clean