aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/deps.mk1
-rw-r--r--core/erlc.mk11
2 files changed, 10 insertions, 2 deletions
diff --git a/core/deps.mk b/core/deps.mk
index f15ae74..1c1892f 100644
--- a/core/deps.mk
+++ b/core/deps.mk
@@ -47,6 +47,7 @@ define dep_fetch
git clone -n -- $$$$REPO $(DEPS_DIR)/$(1); \
cd $(DEPS_DIR)/$(1) && git checkout -q $$$$COMMIT; \
else \
+ echo "Unknown or invalid dependency: $(1). Please consult the erlang.mk README for instructions." >&2; \
exit 78; \
fi
endef
diff --git a/core/erlc.mk b/core/erlc.mk
index 2ca7040..c75c656 100644
--- a/core/erlc.mk
+++ b/core/erlc.mk
@@ -22,12 +22,14 @@ xyrl_verbose_0 = @echo " XYRL " $(filter %.xrl %.yrl,$(?F));
xyrl_verbose = $(xyrl_verbose_$(V))
# Core targets.
-erlc-include:
- -@find include/ src/ -type f -name \*.hrl -newer ebin -exec touch $(shell find src/ -type f -name "*.erl") \;
app:: erlc-include ebin/$(PROJECT).app
$(eval MODULES := $(shell find ebin -type f -name \*.beam \
| sed "s/ebin\//'/;s/\.beam/',/" | sed '$$s/.$$//'))
+ @if [ -z "$$(grep -E '^[^%]*{modules,' src/$(PROJECT).app.src)" ]; then \
+ echo "Empty modules entry not found in $(PROJECT).app.src. Please consult the erlang.mk README for instructions." >&2; \
+ exit 1; \
+ fi
$(appsrc_verbose) cat src/$(PROJECT).app.src \
| sed "s/{modules,[[:space:]]*\[\]}/{modules, \[$(MODULES)\]}/" \
> ebin/$(PROJECT).app
@@ -60,5 +62,10 @@ clean:: clean-app
# Extra targets.
+erlc-include:
+ -@if [ -d ebin/ ]; then \
+ find include/ src/ -type f -name \*.hrl -newer ebin -exec touch $(shell find src/ -type f -name "*.erl") \; ; \
+ fi
+
clean-app:
$(gen_verbose) rm -rf ebin/