From 747bfc29ee951841f38d6e8d471041d6a3008d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 29 Jan 2013 02:33:23 +0100 Subject: Makefile: only recompile files newer than the .app --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3