mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Makefile: only recompile files newer than the .app
This commit is contained in:
parent
ba924cbb7f
commit
747bfc29ee
1 changed files with 6 additions and 4 deletions
10
Makefile
10
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue