Update erlang.mk
This commit is contained in:
parent
de224081cb
commit
f057013bef
|
|
@ -17,7 +17,7 @@
|
|||
ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST)))
|
||||
export ERLANG_MK_FILENAME
|
||||
|
||||
ERLANG_MK_VERSION = 2019.07.01-18-g7edc30a
|
||||
ERLANG_MK_VERSION = 2019.07.01-32-g89f2eca
|
||||
ERLANG_MK_WITHOUT =
|
||||
|
||||
# Make 3.81 and 3.82 are deprecated.
|
||||
|
|
@ -1633,6 +1633,14 @@ pkg_escalus_fetch = git
|
|||
pkg_escalus_repo = https://github.com/esl/escalus
|
||||
pkg_escalus_commit = master
|
||||
|
||||
PACKAGES += esh_mk
|
||||
pkg_esh_mk_name = esh_mk
|
||||
pkg_esh_mk_description = esh template engine plugin for erlang.mk
|
||||
pkg_esh_mk_homepage = https://github.com/crownedgrouse/esh.mk
|
||||
pkg_esh_mk_fetch = git
|
||||
pkg_esh_mk_repo = https://github.com/crownedgrouse/esh.mk.git
|
||||
pkg_esh_mk_commit = master
|
||||
|
||||
PACKAGES += espec
|
||||
pkg_espec_name = espec
|
||||
pkg_espec_description = ESpec: Behaviour driven development framework for Erlang
|
||||
|
|
@ -5374,11 +5382,16 @@ define makedep.erl
|
|||
string:join(DirSubname ++ [atom_to_list(Target)], "/")
|
||||
end
|
||||
end,
|
||||
ok = file:write_file("$(1)", unicode:characters_to_binary([
|
||||
Output0 = [
|
||||
"# Generated by Erlang.mk. Edit at your own risk!\n\n",
|
||||
[[F, "::", [[" ", D] || D <- Deps], "; @touch \$$@\n"] || {F, Deps} <- Depend],
|
||||
"\nCOMPILE_FIRST +=", [[" ", TargetPath(CF)] || CF <- CompileFirst], "\n"
|
||||
])),
|
||||
],
|
||||
Output = case "é" of
|
||||
[233] -> unicode:characters_to_binary(Output0);
|
||||
_ -> Output0
|
||||
end,
|
||||
ok = file:write_file("$(1)", Output),
|
||||
halt()
|
||||
endef
|
||||
|
||||
|
|
@ -5538,9 +5551,23 @@ test-deps: $(ALL_TEST_DEPS_DIRS)
|
|||
endif
|
||||
|
||||
ifneq ($(wildcard $(TEST_DIR)),)
|
||||
test-dir:
|
||||
$(gen_verbose) erlc -v $(TEST_ERLC_OPTS) -o $(TEST_DIR) \
|
||||
-pa ebin/ -I include/ $(call core_find,$(TEST_DIR)/,*.erl)
|
||||
test-dir: $(ERLANG_MK_TMP)/$(PROJECT).last-testdir-build
|
||||
@:
|
||||
|
||||
test_erlc_verbose_0 = @echo " ERLC " $(filter-out $(patsubst %,%.erl,$(ERLC_EXCLUDE)),\
|
||||
$(filter %.erl %.core,$(notdir $(FILES_TO_COMPILE))));
|
||||
test_erlc_verbose_2 = set -x;
|
||||
test_erlc_verbose = $(test_erlc_verbose_$(V))
|
||||
|
||||
define compile_test_erl
|
||||
$(test_erlc_verbose) erlc -v $(TEST_ERLC_OPTS) -o $(TEST_DIR) \
|
||||
-pa ebin/ -I include/ $(1)
|
||||
endef
|
||||
|
||||
ERL_TEST_FILES = $(call core_find,$(TEST_DIR)/,*.erl)
|
||||
$(ERLANG_MK_TMP)/$(PROJECT).last-testdir-build: $(ERL_TEST_FILES) $(MAKEFILE_LIST)
|
||||
$(eval FILES_TO_COMPILE := $(if $(filter $(MAKEFILE_LIST),$?),$(filter $(ERL_TEST_FILES),$^),$?))
|
||||
$(if $(strip $(FILES_TO_COMPILE)),$(call compile_test_erl,$(FILES_TO_COMPILE)); touch $@)
|
||||
endif
|
||||
|
||||
test-build:: IS_TEST=1
|
||||
|
|
@ -5548,14 +5575,14 @@ test-build:: ERLC_OPTS=$(TEST_ERLC_OPTS)
|
|||
test-build:: $(if $(wildcard src),$(if $(wildcard ebin/test),,clean)) $(if $(IS_APP),,deps test-deps)
|
||||
# We already compiled everything when IS_APP=1.
|
||||
ifndef IS_APP
|
||||
ifneq ($(wildcard $(TEST_DIR)),)
|
||||
$(verbose) $(MAKE) --no-print-directory test-dir ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"
|
||||
endif
|
||||
ifneq ($(wildcard src),)
|
||||
$(verbose) $(MAKE) --no-print-directory $(PROJECT).d ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"
|
||||
$(verbose) $(MAKE) --no-print-directory app-build ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"
|
||||
$(gen_verbose) touch ebin/test
|
||||
endif
|
||||
ifneq ($(wildcard $(TEST_DIR)),)
|
||||
$(verbose) $(MAKE) --no-print-directory test-dir ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"
|
||||
endif
|
||||
endif
|
||||
|
||||
# Roughly the same as test-build, but when IS_APP=1.
|
||||
|
|
@ -5563,21 +5590,21 @@ endif
|
|||
ifdef IS_APP
|
||||
test-build-app:: ERLC_OPTS=$(TEST_ERLC_OPTS)
|
||||
test-build-app:: deps test-deps
|
||||
ifneq ($(wildcard $(TEST_DIR)),)
|
||||
$(verbose) $(MAKE) --no-print-directory test-dir ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"
|
||||
endif
|
||||
ifneq ($(wildcard src),)
|
||||
$(verbose) $(MAKE) --no-print-directory $(PROJECT).d ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"
|
||||
$(verbose) $(MAKE) --no-print-directory app-build ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"
|
||||
$(gen_verbose) touch ebin/test
|
||||
endif
|
||||
ifneq ($(wildcard $(TEST_DIR)),)
|
||||
$(verbose) $(MAKE) --no-print-directory test-dir ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"
|
||||
endif
|
||||
endif
|
||||
|
||||
clean:: clean-test-dir
|
||||
|
||||
clean-test-dir:
|
||||
ifneq ($(wildcard $(TEST_DIR)/*.beam),)
|
||||
$(gen_verbose) rm -f $(TEST_DIR)/*.beam
|
||||
$(gen_verbose) rm -f $(TEST_DIR)/*.beam $(ERLANG_MK_TMP)/$(PROJECT).last-testdir-build
|
||||
endif
|
||||
|
||||
# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu>
|
||||
|
|
@ -6261,14 +6288,14 @@ endif
|
|||
CFLAGS += -I"$(ERTS_INCLUDE_DIR)" -I"$(ERL_INTERFACE_INCLUDE_DIR)"
|
||||
CXXFLAGS += -I"$(ERTS_INCLUDE_DIR)" -I"$(ERL_INTERFACE_INCLUDE_DIR)"
|
||||
|
||||
LDLIBS += -L"$(ERL_INTERFACE_LIB_DIR)" -lerl_interface -lei
|
||||
LDLIBS += -L"$(ERL_INTERFACE_LIB_DIR)" -lei
|
||||
|
||||
# Verbosity.
|
||||
|
||||
c_verbose_0 = @echo " C " $(?F);
|
||||
c_verbose_0 = @echo " C " $(filter-out $(notdir $(MAKEFILE_LIST) $(C_SRC_ENV)),$(^F));
|
||||
c_verbose = $(c_verbose_$(V))
|
||||
|
||||
cpp_verbose_0 = @echo " CPP " $(?F);
|
||||
cpp_verbose_0 = @echo " CPP " $(filter-out $(notdir $(MAKEFILE_LIST) $(C_SRC_ENV)),$(^F));
|
||||
cpp_verbose = $(cpp_verbose_$(V))
|
||||
|
||||
link_verbose_0 = @echo " LD " $(@F);
|
||||
|
|
|
|||
Loading…
Reference in New Issue