17
17
ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST ) ) )
18
18
export ERLANG_MK_FILENAME
19
19
20
- ERLANG_MK_VERSION = 2.0.0-pre.2-256-g2cce185
20
+ ERLANG_MK_VERSION = 2.0.0-pre.2-278-gd9a9158
21
21
ERLANG_MK_WITHOUT =
22
22
23
23
# Make 3.81 and 3.82 are deprecated.
@@ -2023,6 +2023,14 @@ pkg_ibrowse_fetch = git
2023
2023
pkg_ibrowse_repo = https://github.com/cmullaparthi/ibrowse
2024
2024
pkg_ibrowse_commit = master
2025
2025
2026
+ PACKAGES += idna
2027
+ pkg_idna_name = idna
2028
+ pkg_idna_description = Erlang IDNA lib
2029
+ pkg_idna_homepage = https://github.com/benoitc/erlang-idna
2030
+ pkg_idna_fetch = git
2031
+ pkg_idna_repo = https://github.com/benoitc/erlang-idna
2032
+ pkg_idna_commit = master
2033
+
2026
2034
PACKAGES += ierlang
2027
2035
pkg_ierlang_name = ierlang
2028
2036
pkg_ierlang_description = An Erlang language kernel for IPython.
@@ -2298,9 +2306,9 @@ pkg_kvs_commit = master
2298
2306
PACKAGES += lager
2299
2307
pkg_lager_name = lager
2300
2308
pkg_lager_description = A logging framework for Erlang/OTP.
2301
- pkg_lager_homepage = https://github.com/basho /lager
2309
+ pkg_lager_homepage = https://github.com/erlang-lager /lager
2302
2310
pkg_lager_fetch = git
2303
- pkg_lager_repo = https://github.com/basho /lager
2311
+ pkg_lager_repo = https://github.com/erlang-lager /lager
2304
2312
pkg_lager_commit = master
2305
2313
2306
2314
PACKAGES += lager_amqp_backend
@@ -2314,9 +2322,9 @@ pkg_lager_amqp_backend_commit = master
2314
2322
PACKAGES += lager_syslog
2315
2323
pkg_lager_syslog_name = lager_syslog
2316
2324
pkg_lager_syslog_description = Syslog backend for lager
2317
- pkg_lager_syslog_homepage = https://github.com/basho /lager_syslog
2325
+ pkg_lager_syslog_homepage = https://github.com/erlang-lager /lager_syslog
2318
2326
pkg_lager_syslog_fetch = git
2319
- pkg_lager_syslog_repo = https://github.com/basho /lager_syslog
2327
+ pkg_lager_syslog_repo = https://github.com/erlang-lager /lager_syslog
2320
2328
pkg_lager_syslog_commit = master
2321
2329
2322
2330
PACKAGES += lambdapad
@@ -3786,9 +3794,9 @@ pkg_trie_commit = master
3786
3794
PACKAGES += triq
3787
3795
pkg_triq_name = triq
3788
3796
pkg_triq_description = Trifork QuickCheck
3789
- pkg_triq_homepage = https://github.com/krestenkrab /triq
3797
+ pkg_triq_homepage = https://github.com/triqng /triq
3790
3798
pkg_triq_fetch = git
3791
- pkg_triq_repo = https://github.com/krestenkrab /triq
3799
+ pkg_triq_repo = https://github.com/triqng /triq.git
3792
3800
pkg_triq_commit = master
3793
3801
3794
3802
PACKAGES += tunctl
@@ -4280,7 +4288,7 @@ endef
4280
4288
# if given. Do it for all 3 possible Makefile file names.
4281
4289
ifeq ($(NO_AUTOPATCH_ERLANG_MK ) ,)
4282
4290
define dep_autopatch_erlang_mk
4283
- $t for f in Makefile makefile GNUmakefile; do \
4291
+ for f in Makefile makefile GNUmakefile; do \
4284
4292
if [ -f $(DEPS_DIR ) /$1/$$f ]; then \
4285
4293
sed -i.bak s/'include *erlang.mk'/'include $$(if $$(ERLANG_MK_FILENAME ) ,$$(ERLANG_MK_FILENAME ) ,erlang.mk) '/ $(DEPS_DIR ) /$1/$$f; \
4286
4294
fi \
@@ -4357,6 +4365,8 @@ define dep_autopatch_rebar.erl
4357
4365
lists:foreach(fun
4358
4366
({d, D}) ->
4359
4367
Write("ERLC_OPTS += -D" ++ atom_to_list(D) ++ "=1\n");
4368
+ ({d, DKey, DVal}) ->
4369
+ Write("ERLC_OPTS += -D" ++ atom_to_list(DKey) ++ "=" ++ atom_to_list(DVal) ++ "\n");
4360
4370
({i, I}) ->
4361
4371
Write(["ERLC_OPTS += -I ", I, "\n"]);
4362
4372
({platform_define, Regex, D}) ->
@@ -4579,7 +4589,7 @@ define dep_autopatch_appsrc_script.erl
4579
4589
AppSrc = "$(call core_native_path,$(DEPS_DIR ) /$1/src/$1.app.src) ",
4580
4590
AppSrcScript = AppSrc ++ ".script",
4581
4591
Bindings = erl_eval:new_bindings(),
4582
- {ok, Conf} = file:script(AppSrcScript, Bindings),
4592
+ {ok, [ Conf] } = file:script(AppSrcScript, Bindings),
4583
4593
ok = file:write_file(AppSrc, io_lib:format("~p.~n", [Conf])),
4584
4594
halt()
4585
4595
endef
@@ -4731,6 +4741,87 @@ ERLANG_MK_RECURSIVE_REL_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-rel-deps-list.log
4731
4741
ERLANG_MK_RECURSIVE_TEST_DEPS_LIST = $(ERLANG_MK_TMP ) /recursive-test-deps-list.log
4732
4742
ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST = $(ERLANG_MK_TMP ) /recursive-shell-deps-list.log
4733
4743
4744
+ # Copyright (c) 2015-2017, Loïc Hoguin <[email protected] >
4745
+ # This file is part of erlang.mk and subject to the terms of the ISC License.
4746
+
4747
+ .PHONY : distclean-kerl
4748
+
4749
+ KERL_INSTALL_DIR ?= $(HOME ) /erlang
4750
+
4751
+ ifeq ($(strip $(KERL ) ) ,)
4752
+ KERL := $(ERLANG_MK_TMP ) /kerl/kerl
4753
+ endif
4754
+
4755
+ export KERL
4756
+
4757
+ KERL_GIT ?= https://github.com/kerl/kerl
4758
+ KERL_COMMIT ?= master
4759
+
4760
+ KERL_MAKEFLAGS ?=
4761
+
4762
+ OTP_GIT ?= https://github.com/erlang/otp
4763
+
4764
+ define kerl_otp_target
4765
+ ifeq ($(wildcard $(KERL_INSTALL_DIR ) /$(1 ) ) ,)
4766
+ $(KERL_INSTALL_DIR ) /$(1 ) : $(KERL )
4767
+ MAKEFLAGS=" $( KERL_MAKEFLAGS) " $(KERL ) build git $(OTP_GIT ) $(1 ) $(1 )
4768
+ $(KERL ) install $(1 ) $(KERL_INSTALL_DIR ) /$(1 )
4769
+ endif
4770
+ endef
4771
+
4772
+ define kerl_hipe_target
4773
+ ifeq ($(wildcard $(KERL_INSTALL_DIR ) /$1-native) ,)
4774
+ $(KERL_INSTALL_DIR ) /$1-native : $(KERL )
4775
+ KERL_CONFIGURE_OPTIONS=--enable-native-libs \
4776
+ MAKEFLAGS=" $( KERL_MAKEFLAGS) " $(KERL ) build git $(OTP_GIT ) $1 $1 -native
4777
+ $(KERL ) install $1 -native $(KERL_INSTALL_DIR ) /$1 -native
4778
+ endif
4779
+ endef
4780
+
4781
+ $(KERL ) :
4782
+ $(verbose ) mkdir -p $(ERLANG_MK_TMP )
4783
+ $(gen_verbose ) git clone --depth 1 $(KERL_GIT ) $(ERLANG_MK_TMP ) /kerl
4784
+ $(verbose ) cd $(ERLANG_MK_TMP ) /kerl && git checkout $(KERL_COMMIT )
4785
+ $(verbose ) chmod +x $(KERL )
4786
+
4787
+ distclean :: distclean-kerl
4788
+
4789
+ distclean-kerl :
4790
+ $(gen_verbose ) rm -rf $(KERL )
4791
+
4792
+ # Allow users to select which version of Erlang/OTP to use for a project.
4793
+
4794
+ ERLANG_OTP ?=
4795
+ ERLANG_HIPE ?=
4796
+
4797
+ # Use kerl to enforce a specific Erlang/OTP version for a project.
4798
+ ifneq ($(strip $(ERLANG_OTP ) ) ,)
4799
+ export PATH := $(KERL_INSTALL_DIR ) /$(ERLANG_OTP ) /bin:$(PATH )
4800
+ SHELL := env PATH=$(PATH ) $(SHELL )
4801
+ $(eval $(call kerl_otp_target,$(ERLANG_OTP)))
4802
+
4803
+ # Build Erlang/OTP only if it doesn't already exist.
4804
+ ifeq ($(wildcard $(KERL_INSTALL_DIR ) /$(ERLANG_OTP ) )$(BUILD_ERLANG_OTP ) ,)
4805
+ $(info Building Erlang/OTP $(ERLANG_OTP)... Please wait...)
4806
+ $(shell $(MAKE) $(KERL_INSTALL_DIR)/$(ERLANG_OTP) ERLANG_OTP=$(ERLANG_OTP) BUILD_ERLANG_OTP=1 >&2)
4807
+ endif
4808
+
4809
+ else
4810
+ # Same for a HiPE enabled VM.
4811
+ ifneq ($(strip $(ERLANG_HIPE ) ) ,)
4812
+ export PATH := $(KERL_INSTALL_DIR ) /$(ERLANG_HIPE ) -native/bin:$(PATH )
4813
+ SHELL := env PATH=$(PATH ) $(SHELL )
4814
+ $(eval $(call kerl_hipe_target,$(ERLANG_HIPE)))
4815
+
4816
+ # Build Erlang/OTP only if it doesn't already exist.
4817
+ ifeq ($(wildcard $(KERL_INSTALL_DIR ) /$(ERLANG_HIPE ) )$(BUILD_ERLANG_OTP ) ,)
4818
+ $(info Building HiPE-enabled Erlang/OTP $(ERLANG_OTP)... Please wait...)
4819
+ $(shell $(MAKE) $(KERL_INSTALL_DIR)/$(ERLANG_HIPE) ERLANG_HIPE=$(ERLANG_HIPE) BUILD_ERLANG_OTP=1 >&2)
4820
+ endif
4821
+
4822
+ endif
4823
+ endif
4824
+
4734
4825
# Copyright (c) 2015-2016, Loïc Hoguin <[email protected] >
4735
4826
# This file is part of erlang.mk and subject to the terms of the ISC License.
4736
4827
@@ -5966,10 +6057,10 @@ else
5966
6057
$(call render_template,bs_erl_nif,src/$n.erl)
5967
6058
endif
5968
6059
5969
- # Copyright (c) 2015-2016 , Loïc Hoguin <[email protected] >
6060
+ # Copyright (c) 2015-2017 , Loïc Hoguin <[email protected] >
5970
6061
# This file is part of erlang.mk and subject to the terms of the ISC License.
5971
6062
5972
- .PHONY : ci ci-prepare ci-setup distclean-kerl
6063
+ .PHONY : ci ci-prepare ci-setup
5973
6064
5974
6065
CI_OTP ?=
5975
6066
CI_HIPE ?=
@@ -5987,24 +6078,9 @@ ifeq ($(strip $(CI_OTP) $(CI_HIPE) $(CI_ERLLVM)),)
5987
6078
ci ::
5988
6079
else
5989
6080
5990
- ifeq ($(strip $(KERL ) ) ,)
5991
- KERL := $(ERLANG_MK_TMP ) /kerl/kerl
5992
- endif
5993
-
5994
- export KERL
5995
-
5996
- KERL_GIT ?= https://github.com/kerl/kerl
5997
- KERL_COMMIT ?= master
5998
-
5999
- KERL_MAKEFLAGS ?=
6000
-
6001
- OTP_GIT ?= https://github.com/erlang/otp
6002
-
6003
- CI_INSTALL_DIR ?= $(HOME ) /erlang
6004
-
6005
6081
ci :: $(addprefix ci-,$(CI_OTP ) $(addsuffix -native,$(CI_HIPE ) ) $(addsuffix -erllvm,$(CI_ERLLVM ) ) )
6006
6082
6007
- ci-prepare : $(addprefix $(CI_INSTALL_DIR ) /,$(CI_OTP ) $(addsuffix -native,$(CI_HIPE ) ) )
6083
+ ci-prepare : $(addprefix $(KERL_INSTALL_DIR ) /,$(CI_OTP ) $(addsuffix -native,$(CI_HIPE ) ) )
6008
6084
6009
6085
ci-setup ::
6010
6086
@@ -6014,10 +6090,10 @@ ci_verbose_0 = @echo " CI " $(1);
6014
6090
ci_verbose = $(ci_verbose_$(V ) )
6015
6091
6016
6092
define ci_target
6017
- ci-$1: $(CI_INSTALL_DIR ) /$2
6093
+ ci-$1: $(KERL_INSTALL_DIR ) /$2
6018
6094
$(verbose ) $(MAKE ) --no-print-directory clean
6019
6095
$(ci_verbose ) \
6020
- PATH="$(CI_INSTALL_DIR ) /$2/bin:$(PATH ) " \
6096
+ PATH="$(KERL_INSTALL_DIR ) /$2/bin:$(PATH ) " \
6021
6097
CI_OTP_RELEASE="$1" \
6022
6098
CT_OPTS="-label $1" \
6023
6099
CI_VM="$3" \
@@ -6029,32 +6105,8 @@ $(foreach otp,$(CI_OTP),$(eval $(call ci_target,$(otp),$(otp),otp)))
6029
6105
$(foreach otp,$(CI_HIPE),$(eval $(call ci_target,$(otp)-native,$(otp)-native,native)))
6030
6106
$(foreach otp,$(CI_ERLLVM),$(eval $(call ci_target,$(otp)-erllvm,$(otp)-native,erllvm)))
6031
6107
6032
- define ci_otp_target
6033
- ifeq ($(wildcard $(CI_INSTALL_DIR ) /$(1 ) ) ,)
6034
- $(CI_INSTALL_DIR ) /$(1 ) : $(KERL )
6035
- MAKEFLAGS=" $( KERL_MAKEFLAGS) " $(KERL ) build git $(OTP_GIT ) $(1 ) $(1 )
6036
- $(KERL ) install $(1 ) $(CI_INSTALL_DIR ) /$(1 )
6037
- endif
6038
- endef
6039
-
6040
- $(foreach otp,$(CI_OTP),$(eval $(call ci_otp_target,$(otp))))
6041
-
6042
- define ci_hipe_target
6043
- ifeq ($(wildcard $(CI_INSTALL_DIR ) /$1-native) ,)
6044
- $(CI_INSTALL_DIR ) /$1-native : $(KERL )
6045
- KERL_CONFIGURE_OPTIONS=--enable-native-libs \
6046
- MAKEFLAGS=" $( KERL_MAKEFLAGS) " $(KERL ) build git $(OTP_GIT ) $1 $1 -native
6047
- $(KERL ) install $1 -native $(CI_INSTALL_DIR ) /$1 -native
6048
- endif
6049
- endef
6050
-
6051
- $(foreach otp,$(sort $(CI_HIPE) $(CI_ERLLLVM)),$(eval $(call ci_hipe_target,$(otp))))
6052
-
6053
- $(KERL ) :
6054
- $(verbose ) mkdir -p $(ERLANG_MK_TMP )
6055
- $(gen_verbose ) git clone --depth 1 $(KERL_GIT ) $(ERLANG_MK_TMP ) /kerl
6056
- $(verbose ) cd $(ERLANG_MK_TMP ) /kerl && git checkout $(KERL_COMMIT )
6057
- $(verbose ) chmod +x $(KERL )
6108
+ $(foreach otp,$(CI_OTP),$(eval $(call kerl_otp_target,$(otp))))
6109
+ $(foreach otp,$(sort $(CI_HIPE) $(CI_ERLLLVM)),$(eval $(call kerl_hipe_target,$(otp))))
6058
6110
6059
6111
help ::
6060
6112
$(verbose ) printf " %s\n" " " \
@@ -6064,10 +6116,6 @@ help::
6064
6116
" The CI_OTP variable must be defined with the Erlang versions" \
6065
6117
" that must be tested. For example: CI_OTP = OTP-17.3.4 OTP-17.5.3"
6066
6118
6067
- distclean :: distclean-kerl
6068
-
6069
- distclean-kerl :
6070
- $(gen_verbose ) rm -rf $(KERL )
6071
6119
endif
6072
6120
6073
6121
# Copyright (c) 2013-2016, Loïc Hoguin <[email protected] >
@@ -6433,6 +6481,60 @@ apps-eunit:
6433
6481
endif
6434
6482
endif
6435
6483
6484
+ # Copyright (c) 2015-2017, Loïc Hoguin <[email protected] >
6485
+ # This file is part of erlang.mk and subject to the terms of the ISC License.
6486
+
6487
+ ifeq ($(filter proper,$(DEPS ) $(TEST_DEPS ) ) ,proper)
6488
+ .PHONY : proper
6489
+
6490
+ # Targets.
6491
+
6492
+ tests :: proper
6493
+
6494
+ define proper_check.erl
6495
+ code:add_pathsa(["$(call core_native_path,$(CURDIR ) /ebin) ", "$(call core_native_path,$(DEPS_DIR ) /* /ebin) "]),
6496
+ Module = fun(M) ->
6497
+ [true] =:= lists:usort([
6498
+ case atom_to_list(F) of
6499
+ "prop_" ++ _ ->
6500
+ io:format("Testing ~p:~p/0~n", [M, F]),
6501
+ proper:quickcheck(M:F());
6502
+ _ ->
6503
+ true
6504
+ end
6505
+ || {F, 0} <- M:module_info(exports)])
6506
+ end,
6507
+ try
6508
+ case $(1 ) of
6509
+ all -> [true] =:= lists:usort([Module(M) || M <- [$(call comma_list,$(3 ) ) ]]);
6510
+ module -> Module($(2 ) );
6511
+ function -> proper:quickcheck($(2 ) )
6512
+ end
6513
+ of
6514
+ true -> halt(0);
6515
+ _ -> halt(1)
6516
+ catch error:undef ->
6517
+ io:format("Undefined property or module?~n~p~n", [erlang:get_stacktrace()]),
6518
+ halt(0)
6519
+ end.
6520
+ endef
6521
+
6522
+ ifdef t
6523
+ ifeq (,$(findstring :,$(t ) ))
6524
+ proper : test-build
6525
+ $(verbose ) $(call erlang,$(call proper_check.erl,module,$(t ) ) )
6526
+ else
6527
+ proper : test-build
6528
+ $(verbose ) echo Testing $(t ) /0
6529
+ $(verbose ) $(call erlang,$(call proper_check.erl,function,$(t ) () ) )
6530
+ endif
6531
+ else
6532
+ proper : test-build
6533
+ $(eval MODULES := $(patsubst % ,'% ',$(sort $(notdir $(basename $(wildcard ebin/* .beam) ) ) ) ) )
6534
+ $(gen_verbose ) $(call erlang,$(call proper_check.erl,all,undefined,$(MODULES ) ) )
6535
+ endif
6536
+ endif
6537
+
6436
6538
# Copyright (c) 2013-2016, Loïc Hoguin <[email protected] >
6437
6539
# This file is part of erlang.mk and subject to the terms of the ISC License.
6438
6540
@@ -6443,7 +6545,7 @@ endif
6443
6545
RELX ?= $(ERLANG_MK_TMP ) /relx
6444
6546
RELX_CONFIG ?= $(CURDIR ) /relx.config
6445
6547
6446
- RELX_URL ?= https://github.com/erlware/relx/releases/download/v3.19 .0/relx
6548
+ RELX_URL ?= https://github.com/erlware/relx/releases/download/v3.23 .0/relx
6447
6549
RELX_OPTS ?=
6448
6550
RELX_OUTPUT_DIR ?= _rel
6449
6551
RELX_REL_EXT ?=
@@ -6489,7 +6591,7 @@ distclean-relx-rel:
6489
6591
# Run target.
6490
6592
6491
6593
ifeq ($(wildcard $(RELX_CONFIG ) ) ,)
6492
- run :
6594
+ run ::
6493
6595
else
6494
6596
6495
6597
define get_relx_release.erl
@@ -6513,7 +6615,7 @@ ifeq ($(PLATFORM),msys2)
6513
6615
RELX_REL_EXT := .cmd
6514
6616
endif
6515
6617
6516
- run : all
6618
+ run :: all
6517
6619
$(verbose ) $(RELX_OUTPUT_DIR ) /$(RELX_REL_NAME ) /bin/$(RELX_REL_NAME )$(RELX_REL_EXT ) console
6518
6620
6519
6621
help ::
@@ -6579,7 +6681,10 @@ ifeq ($(filter triq,$(DEPS) $(TEST_DEPS)),triq)
6579
6681
tests :: triq
6580
6682
6581
6683
define triq_check.erl
6582
- code:add_pathsa(["$(call core_native_path,$(CURDIR ) /ebin) ", "$(call core_native_path,$(DEPS_DIR ) /* /ebin) "]),
6684
+ code:add_pathsa([
6685
+ "$(call core_native_path,$(CURDIR ) /ebin) ",
6686
+ "$(call core_native_path,$(DEPS_DIR ) /* /ebin) ",
6687
+ "$(call core_native_path,$(TEST_DIR ) ) "]),
6583
6688
try
6584
6689
case $(1 ) of
6585
6690
all -> [true] =:= lists:usort([triq:check(M) || M <- [$(call comma_list,$(3 ) ) ]]);
@@ -6590,7 +6695,7 @@ define triq_check.erl
6590
6695
true -> halt(0);
6591
6696
_ -> halt(1)
6592
6697
catch error:undef ->
6593
- io:format("Undefined property or module~n" ),
6698
+ io:format("Undefined property or module?~n~p~n", [erlang:get_stacktrace()] ),
6594
6699
halt(0)
6595
6700
end.
6596
6701
endef
@@ -6606,7 +6711,8 @@ triq: test-build
6606
6711
endif
6607
6712
else
6608
6713
triq : test-build
6609
- $(eval MODULES := $(patsubst % ,'% ',$(sort $(notdir $(basename $(wildcard ebin/* .beam) ) ) ) ) )
6714
+ $(eval MODULES := $(patsubst % ,'% ',$(sort $(notdir $(basename \
6715
+ $(wildcard ebin/* .beam) $(call core_find,$(TEST_DIR ) /,* .beam) )))))
6610
6716
$(gen_verbose ) $(call erlang,$(call triq_check.erl,all,undefined,$(MODULES ) ) )
6611
6717
endif
6612
6718
endif
0 commit comments