From 6dc0f21244f08fe7c11bed471bf5d863aa1b6093 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= <essen@ninenines.eu>
Date: Fri, 11 Sep 2015 11:05:09 +0200
Subject: Fix bug where ERLC_EXCLUDE'd modules were in .app file

---
 core/erlc.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/core/erlc.mk b/core/erlc.mk
index 04c11e5..96690da 100644
--- a/core/erlc.mk
+++ b/core/erlc.mk
@@ -198,7 +198,8 @@ endef
 ebin/$(PROJECT).app:: $(ERL_FILES) $(CORE_FILES)
 	$(if $(strip $?),$(call compile_erl,$?))
 	$(eval GITDESCRIBE := $(shell git describe --dirty --abbrev=7 --tags --always --first-parent 2>/dev/null || true))
-	$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename $(ERL_FILES) $(CORE_FILES))))))
+	$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \
+		$(filter-out $(ERLC_EXCLUDE_PATHS),$(ERL_FILES) $(CORE_FILES)))))))
 ifeq ($(wildcard src/$(PROJECT).app.src),)
 	$(app_verbose) echo $(subst $(newline),,$(subst ",\",$(call app_file,$(GITDESCRIBE),$(MODULES)))) \
 		> ebin/$(PROJECT).app
-- 
cgit v1.2.3