aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-10-30 00:13:42 +0300
committerLoïc Hoguin <[email protected]>2016-10-30 00:13:42 +0300
commit373122de2f3e3a6e937e527044ae3b62ba939c96 (patch)
tree9bdea11465eb4621af14fdbc1391872dd1774d15 /core
parent1c06eab8369fae4aed56a9583c1ddb8a49e66462 (diff)
downloaderlang.mk-373122de2f3e3a6e937e527044ae3b62ba939c96.tar.gz
erlang.mk-373122de2f3e3a6e937e527044ae3b62ba939c96.tar.bz2
erlang.mk-373122de2f3e3a6e937e527044ae3b62ba939c96.zip
Use := instead of = for list of files
This will make sure we don't look twice. Also make a single call to find the common file formats rather than many calls.
Diffstat (limited to 'core')
-rw-r--r--core/erlc.mk10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/erlc.mk b/core/erlc.mk
index 5bb4078..bf6d605 100644
--- a/core/erlc.mk
+++ b/core/erlc.mk
@@ -91,8 +91,10 @@ app-build: ebin/$(PROJECT).app
# Source files.
-ERL_FILES = $(sort $(call core_find,src/,*.erl))
-CORE_FILES = $(sort $(call core_find,src/,*.core))
+ALL_SRC_FILES := $(sort $(call core_find,src/,*))
+
+ERL_FILES := $(filter %.erl,$(ALL_SRC_FILES))
+CORE_FILES := $(filter %.core,$(ALL_SRC_FILES))
# ASN.1 files.
@@ -125,11 +127,11 @@ endif
# Leex and Yecc files.
-XRL_FILES = $(sort $(call core_find,src/,*.xrl))
+XRL_FILES := $(filter %.xrl,$(ALL_SRC_FILES))
XRL_ERL_FILES = $(addprefix src/,$(patsubst %.xrl,%.erl,$(notdir $(XRL_FILES))))
ERL_FILES += $(XRL_ERL_FILES)
-YRL_FILES = $(sort $(call core_find,src/,*.yrl))
+YRL_FILES := $(filter %.yrl,$(ALL_SRC_FILES))
YRL_ERL_FILES = $(addprefix src/,$(patsubst %.yrl,%.erl,$(notdir $(YRL_FILES))))
ERL_FILES += $(YRL_ERL_FILES)