diff options
author | Loïc Hoguin <[email protected]> | 2014-11-18 18:43:12 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-11-18 18:43:12 +0200 |
commit | d5de756707a047d4872342fff10f7c43530a6e17 (patch) | |
tree | b46ceb7d36e4fafb751ed31b0659bfefabc591e4 | |
parent | e523171600610df7235053fa929bc6ee0dbb393e (diff) | |
parent | ffe08666ea9b365512310b3408a1397f87cb766c (diff) | |
download | erlang.mk-d5de756707a047d4872342fff10f7c43530a6e17.tar.gz erlang.mk-d5de756707a047d4872342fff10f7c43530a6e17.tar.bz2 erlang.mk-d5de756707a047d4872342fff10f7c43530a6e17.zip |
Merge branch 'erlc-excl' of git://github.com/efcasado/erlang.mk
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | core/erlc.mk | 8 | ||||
-rw-r--r-- | erlang.mk | 8 |
3 files changed, 17 insertions, 4 deletions
@@ -215,6 +215,11 @@ variable. It takes the arguments that will then be passed to You can specify a list of modules to be compiled first using the `COMPILE_FIRST` variable. +You can also use the `ERLC_EXCLUDE` variable to prevent some +modules from being compiled by the core compiler. Note that +`ERLC_EXCLUDE` is a list of module names (i.e., no file extension +is required). + If `{id, "git"},` is found in your project's `.app.src`, the extended output of `git describe ...` will replace it. This can be retrieved at runtime via `application:get_key/2`. diff --git a/core/erlc.mk b/core/erlc.mk index a7f73f8..c13c714 100644 --- a/core/erlc.mk +++ b/core/erlc.mk @@ -9,13 +9,16 @@ ERLC_OPTS ?= -Werror +debug_info +warn_export_all +warn_export_vars \ +warn_shadow_vars +warn_obsolete_guard # +bin_opt_info +warn_missing_spec COMPILE_FIRST ?= COMPILE_FIRST_PATHS = $(addprefix src/,$(addsuffix .erl,$(COMPILE_FIRST))) +ERLC_EXCLUDE ?= +ERLC_EXCLUDE_PATHS = $(addprefix src/,$(addsuffix .erl,$(ERLC_EXCLUDE))) # Verbosity. appsrc_verbose_0 = @echo " APP " $(PROJECT).app.src; appsrc_verbose = $(appsrc_verbose_$(V)) -erlc_verbose_0 = @echo " ERLC " $(filter %.erl %.core,$(?F)); +erlc_verbose_0 = @echo " ERLC " $(filter-out $(patsubst %,%.erl,$(ERLC_EXCLUDE)),\ + $(filter %.erl %.core,$(?F))); erlc_verbose = $(erlc_verbose_$(V)) xyrl_verbose_0 = @echo " XYRL " $(filter %.xrl %.yrl,$(?F)); @@ -38,7 +41,8 @@ app:: erlc-include ebin/$(PROJECT).app define compile_erl $(erlc_verbose) erlc -v $(ERLC_OPTS) -o ebin/ \ - -pa ebin/ -I include/ $(COMPILE_FIRST_PATHS) $(1) + -pa ebin/ -I include/ $(filter-out $(ERLC_EXCLUDE_PATHS),\ + $(COMPILE_FIRST_PATHS) $(1)) endef define compile_xyrl @@ -210,13 +210,16 @@ ERLC_OPTS ?= -Werror +debug_info +warn_export_all +warn_export_vars \ +warn_shadow_vars +warn_obsolete_guard # +bin_opt_info +warn_missing_spec COMPILE_FIRST ?= COMPILE_FIRST_PATHS = $(addprefix src/,$(addsuffix .erl,$(COMPILE_FIRST))) +ERLC_EXCLUDE ?= +ERLC_EXCLUDE_PATHS = $(addprefix src/,$(addsuffix .erl,$(ERLC_EXCLUDE))) # Verbosity. appsrc_verbose_0 = @echo " APP " $(PROJECT).app.src; appsrc_verbose = $(appsrc_verbose_$(V)) -erlc_verbose_0 = @echo " ERLC " $(filter %.erl %.core,$(?F)); +erlc_verbose_0 = @echo " ERLC " $(filter-out $(patsubst %,%.erl,$(ERLC_EXCLUDE)),\ + $(filter %.erl %.core,$(?F))); erlc_verbose = $(erlc_verbose_$(V)) xyrl_verbose_0 = @echo " XYRL " $(filter %.xrl %.yrl,$(?F)); @@ -239,7 +242,8 @@ app:: erlc-include ebin/$(PROJECT).app define compile_erl $(erlc_verbose) erlc -v $(ERLC_OPTS) -o ebin/ \ - -pa ebin/ -I include/ $(COMPILE_FIRST_PATHS) $(1) + -pa ebin/ -I include/ $(filter-out $(ERLC_EXCLUDE_PATHS),\ + $(COMPILE_FIRST_PATHS) $(1)) endef define compile_xyrl |