aboutsummaryrefslogtreecommitdiffstats
path: root/erlang.mk
diff options
context:
space:
mode:
Diffstat (limited to 'erlang.mk')
-rw-r--r--erlang.mk8
1 files changed, 6 insertions, 2 deletions
diff --git a/erlang.mk b/erlang.mk
index b731299..ce30415 100644
--- a/erlang.mk
+++ b/erlang.mk
@@ -132,8 +132,8 @@ endef
define dep_target
$(DEPS_DIR)/$(1):
@mkdir -p $(DEPS_DIR)
- @if [ ! -f $(PKG_FILE2) ]; then $(call core_http_get,$(PKG_FILE2),$(PKG_FILE_URL)); fi
ifeq (,$(dep_$(1)))
+ @if [ ! -f $(PKG_FILE2) ]; then $(call core_http_get,$(PKG_FILE2),$(PKG_FILE_URL)); fi
@DEPPKG=$$$$(awk 'BEGIN { FS = "\t" }; $$$$1 == "$(1)" { print $$$$2 " " $$$$3 " " $$$$4 }' $(PKG_FILE2);); \
VS=$$$$(echo $$$$DEPPKG | cut -d " " -f1); \
REPO=$$$$(echo $$$$DEPPKG | cut -d " " -f2); \
@@ -217,8 +217,10 @@ app:: erlc-include ebin/$(PROJECT).app
echo "Empty modules entry not found in $(PROJECT).app.src. Please consult the erlang.mk README for instructions." >&2; \
exit 1; \
fi
+ $(eval GITDESCRIBE := $(shell git describe --dirty --abbrev=7 --tags --always --first-parent 2>/dev/null || true))
$(appsrc_verbose) cat src/$(PROJECT).app.src \
| sed "s/{modules,[[:space:]]*\[\]}/{modules, \[$(MODULES)\]}/" \
+ | sed "s/{id,[[:space:]]*\"git\"}/{id, \"$(GITDESCRIBE)\"}/" \
> ebin/$(PROJECT).app
define compile_erl
@@ -278,6 +280,7 @@ help::
bs_appsrc = "{application, $(PROJECT), [" \
" {description, \"\"}," \
" {vsn, \"0.1.0\"}," \
+ " {id, \"git\"}," \
" {modules, []}," \
" {registered, []}," \
" {applications, [" \
@@ -290,6 +293,7 @@ bs_appsrc = "{application, $(PROJECT), [" \
bs_appsrc_lib = "{application, $(PROJECT), [" \
" {description, \"\"}," \
" {vsn, \"0.1.0\"}," \
+ " {id, \"git\"}," \
" {modules, []}," \
" {registered, []}," \
" {applications, [" \
@@ -580,7 +584,7 @@ build-ct-deps: $(ALL_TEST_DEPS_DIRS)
@for dep in $(ALL_TEST_DEPS_DIRS) ; do $(MAKE) -C $$dep; done
build-ct-suites: build-ct-deps
- $(gen_verbose) erlc -v $(TEST_ERLC_OPTS) -o test/ \
+ $(gen_verbose) erlc -v $(TEST_ERLC_OPTS) -I include/ -o test/ \
$(wildcard test/*.erl test/*/*.erl) -pa ebin/
tests-ct: ERLC_OPTS = $(TEST_ERLC_OPTS)