1717ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST ) ) )
1818export ERLANG_MK_FILENAME
1919
20- ERLANG_MK_VERSION = 04c473a
20+ ERLANG_MK_VERSION = 2022.05.31-69-gb54e4b5-dirty
2121ERLANG_MK_WITHOUT =
2222
2323# Make 3.81 and 3.82 are deprecated.
@@ -184,8 +184,9 @@ core_http_get = curl -Lf$(if $(filter-out 0,$(V)),,s)o $(call core_native_path,$
184184
185185core_eq = $(and $(findstring $(1 ) ,$(2 ) ) ,$(findstring $(2 ) ,$(1 ) ) )
186186
187- # We skip files that contain spaces or '#' because they end up causing issues.
188- core_find = $(if $(wildcard $1) ,$(shell find $(1:%/=% ) \( -type l -o -type f \) -name $(subst * ,\* ,$2) -not -name "* [ \#]* ") )
187+ # We skip files that contain spaces because they end up causing issues.
188+ # Files that begin with a dot are already ignored by the wildcard function.
189+ core_find = $(foreach f,$(wildcard $(1:%/=% ) /$2) ,$(if $(wildcard $f/.) ,$(call core_find,$f,$2) ,$(if $(wildcard $f) ,$f) ) )
189190
190191core_lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$(1 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )
191192
@@ -3564,8 +3565,10 @@ export DEPS_DIR
35643565REBAR_DEPS_DIR = $(DEPS_DIR )
35653566export REBAR_DEPS_DIR
35663567
3568+ # When testing Erlang.mk and updating these, make sure
3569+ # to delete test/test_rebar_git before running tests again.
35673570REBAR3_GIT ?= https://github.com/erlang/rebar3
3568- REBAR3_COMMIT ?= 3f563feaf1091a1980241adefa83a32dd2eebf7c # 3.20 .0
3571+ REBAR3_COMMIT ?= bde4b54248d16280b2c70a244aca3bb7566e2033 # 3.23 .0
35693572
35703573CACHE_DEPS ?= 0
35713574
@@ -4018,7 +4021,7 @@ define dep_autopatch_rebar.erl
40184021 false -> ok;
40194022 {_, Files0} ->
40204023 Files = [begin
4021- hd(filelib:wildcard("$(call core_native_path,$(DEPS_DIR ) /$1/src/** /" ++ filename:rootname(F) ++ ".*rl") ))
4024+ hd(filelib:wildcard("$(call core_native_path,$(DEPS_DIR ) /$1/src/) **/" ++ filename:rootname(F) ++ ".*rl"))
40224025 end || "src/" ++ F <- Files0],
40234026 Names = [[" ", case lists:reverse(F) of
40244027 "lre." ++ Elif -> lists:reverse(Elif);
@@ -4147,8 +4150,8 @@ define dep_autopatch_rebar.erl
41474150 "\t$$\(CC) -o $$\@ $$\? $$\(LDFLAGS) $$\(ERL_LDFLAGS) $$\(DRV_LDFLAGS) $$\(LDLIBS) $$\(EXE_LDFLAGS)",
41484151 case {filename:extension(Output), $(PLATFORM ) } of
41494152 {[], _} -> "\n";
4150- {".so", darwin} -> "-shared\n";
4151- {".dylib", darwin} -> "-shared\n";
4153+ {".so", darwin} -> " -shared\n";
4154+ {".dylib", darwin} -> " -shared\n";
41524155 {_, darwin} -> "\n";
41534156 _ -> " -shared\n"
41544157 end])
@@ -4665,7 +4668,6 @@ define makedep.erl
46654668 end,
46664669 MakeDepend = fun
46674670 (F, Fd, Mod, StartLocation) ->
4668- {ok, Filename} = file:pid2name(Fd),
46694671 case io:parse_erl_form(Fd, undefined, StartLocation) of
46704672 {ok, AbsData, EndLocation} ->
46714673 case AbsData of
@@ -5838,7 +5840,7 @@ else
58385840
58395841ci :: $(addprefix ci-,$(CI_OTP ) )
58405842
5841- ci-prepare : $(addprefix $( KERL_INSTALL_DIR ) / ,$(CI_OTP ) )
5843+ ci-prepare : $(addprefix ci-prepare- ,$(CI_OTP ) )
58425844
58435845ci-setup ::
58445846 $(verbose ) :
@@ -5850,7 +5852,10 @@ ci_verbose_0 = @echo " CI " $(1);
58505852ci_verbose = $(ci_verbose_$(V ) )
58515853
58525854define ci_target
5853- ci-$1: $(KERL_INSTALL_DIR ) /$2
5855+ ci-prepare-$1: $(KERL_INSTALL_DIR ) /$2
5856+ $(verbose ) :
5857+
5858+ ci-$1: ci-prepare-$1
58545859 $(verbose ) $(MAKE ) --no-print-directory clean
58555860 $(ci_verbose ) \
58565861 PATH="$(KERL_INSTALL_DIR ) /$2/bin:$(PATH ) " \
0 commit comments