tests/step3: test def! within let*. Fix groovy build.
[jackhill/mal.git] / Makefile
CommitLineData
31690700
JM
1#
2# Command line settings
3#
4
5MAL_IMPL = js
6
a05f7822 7PYTHON = python
47699629 8USE_MATLAB =
32d0a1cf
JM
9# python, js, cpp, or neko are currently supported
10HAXE_MODE = neko
a05f7822 11
337c8031
JM
12# Extra options to pass to runtest.py
13TEST_OPTS =
14
17180e85
JM
15# Test with previous test files not just the test files for the
16# current step. Step 0 and 1 tests are special and not included in
17# later steps.
18REGRESS=
19
337c8031
JM
20# Extra implementation specific options to pass to runtest.py
21mal_TEST_OPTS = --start-timeout 60 --test-timeout 120
22
31690700
JM
23#
24# Settings
25#
26
ae28e856 27IMPLS = awk bash c d clojure coffee cpp crystal cs erlang elisp elixir es6 \
7511317b 28 factor forth fsharp go groovy guile haskell haxe io java julia \
2faae94c 29 js kotlin lua make mal ocaml matlab miniMAL nim objc perl php ps \
0eace3df 30 python r racket rpython ruby rust scala swift swift3 tcl vb vimscript
31690700
JM
31
32step0 = step0_repl
33step1 = step1_read_print
34step2 = step2_eval
35step3 = step3_env
36step4 = step4_if_fn_do
37step5 = step5_tco
38step6 = step6_file
39step7 = step7_quote
40step8 = step8_macros
01c97316 41step9 = step9_try
90f618cb 42stepA = stepA_mal
31690700 43
17180e85
JM
44regress_step0 = step0
45regress_step1 = step1
46regress_step2 = step2
47regress_step3 = $(regress_step2) step3
48regress_step4 = $(regress_step3) step4
49regress_step5 = $(regress_step4) step5
50regress_step6 = $(regress_step5) step6
51regress_step7 = $(regress_step6) step7
52regress_step8 = $(regress_step7) step8
53regress_step9 = $(regress_step8) step9
54regress_stepA = $(regress_step9) stepA
55
56STEP5_EXCLUDES += awk # completes at 10,000
57STEP5_EXCLUDES += bash # no stack exhaustion or completion
58STEP5_EXCLUDES += c # segfault
59STEP5_EXCLUDES += cpp # completes at 10,000
bcfd8b70 60STEP5_EXCLUDES += crystal # test completes, even at 1,000,000
17180e85
JM
61STEP5_EXCLUDES += cs # fatal stack overflow fault
62STEP5_EXCLUDES += d # completes at 10,000, fatal stack overflow at 1,000,000
63STEP5_EXCLUDES += erlang # erlang is TCO, test passes
64STEP5_EXCLUDES += elixir # elixir is TCO, test passes
65STEP5_EXCLUDES += fsharp # completes at 10,000, fatal stack overflow at 100,000
bcfd8b70 66STEP5_EXCLUDES += go # test completes, even at 100,000
17180e85 67STEP5_EXCLUDES += haskell # test completes
3da6f492 68STEP5_EXCLUDES += io # too slow to complete 10,000
17180e85
JM
69STEP5_EXCLUDES += make # no TCO capability/step
70STEP5_EXCLUDES += mal # no TCO capability/step
47699629 71STEP5_EXCLUDES += matlab # too slow to complete 10,000
17180e85
JM
72STEP5_EXCLUDES += miniMAL # strange error with runtest.py
73STEP5_EXCLUDES += nim # test completes, even at 100,000
2faae94c 74STEP5_EXCLUDES += objc # completes at 10,000, crashes at 100,000
17180e85
JM
75STEP5_EXCLUDES += php # test completes, even at 100,000
76STEP5_EXCLUDES += racket # test completes
77STEP5_EXCLUDES += ruby # test completes, even at 100,000
78STEP5_EXCLUDES += rust # no catching stack overflows
0eace3df 79STEP5_EXCLUDES += swift3 # no catching stack overflows
17180e85
JM
80STEP5_EXCLUDES += ocaml # test completes, even at 1,000,000
81STEP5_EXCLUDES += vb # completes at 10,000
17180e85
JM
82
83PERF_EXCLUDES = mal # TODO: fix this
31690700 84
bcfd8b70 85dist_EXCLUDES += mal
5245b079 86# TODO: still need to implement dist
bcfd8b70 87dist_EXCLUDES += guile io julia matlab swift
5245b079 88
31690700
JM
89#
90# Utility functions
91#
92
47699629
JM
93MATLAB = matlab -nodisplay -nosplash -nodesktop -nojvm -r
94OCTAVE = octave --no-gui -q --traditional --eval
95matlab_args = $(subst $(SPACE),$(COMMA),$(foreach x,$(strip $(1)),'$(x)'))
96matlab_cmd = $(if $(strip $(USE_MATLAB)),$(MATLAB),$(OCTAVE))
97
32d0a1cf
JM
98haxe_STEP_TO_PROG_neko = haxe/$($(1)).n
99haxe_STEP_TO_PROG_python = haxe/$($(1)).py
100haxe_STEP_TO_PROG_cpp = haxe/cpp/$($(1))
101haxe_STEP_TO_PROG_js = haxe/$($(1)).js
102
103haxe_RUNSTEP_neko = neko ../$(2) $(3)
104haxe_RUNSTEP_python = python3 ../$(2) $(3)
105haxe_RUNSTEP_cpp = ../$(2) $(3)
106haxe_RUNSTEP_js = node ../$(2) $(3)
107
17180e85
JM
108# Return list of test files for a given step. If REGRESS is set then
109# test files will include step 2 tests through tests for the step
110# being tested.
111STEP_TEST_FILES = $(strip $(wildcard \
112 $(foreach s,$(if $(strip $(REGRESS)),$(regress_$(2)),$(2)),\
113 $(1)/tests/$($(s)).mal tests/$($(s)).mal)))
31690700 114
17180e85 115# Map of step (e.g. "step8") to executable file for that step
3b7ef8c7 116awk_STEP_TO_PROG = awk/$($(1)).awk
db4c329a
JM
117bash_STEP_TO_PROG = bash/$($(1)).sh
118c_STEP_TO_PROG = c/$($(1))
f82cb965 119d_STEP_TO_PROG = d/$($(1))
31690700 120clojure_STEP_TO_PROG = clojure/src/$($(1)).clj
891c3f3b 121coffee_STEP_TO_PROG = coffee/$($(1)).coffee
9ddaa0b9 122cpp_STEP_TO_PROG = cpp/$($(1))
86fe6314 123crystal_STEP_TO_PROG = crystal/$($(1))
db4c329a 124cs_STEP_TO_PROG = cs/$($(1)).exe
ae28e856 125elisp_STEP_TO_PROG = elisp/$($(1)).el
51c2c1fe 126elixir_STEP_TO_PROG = elixir/lib/mix/tasks/$($(1)).ex
2cc3804b 127erlang_STEP_TO_PROG = erlang/$($(1))
4eb71990 128es6_STEP_TO_PROG = es6/build/$($(1)).js
199b1ce7 129factor_STEP_TO_PROG = factor/$($(1))/$($(1)).factor
59038a10 130forth_STEP_TO_PROG = forth/$($(1)).fs
1c358979 131fsharp_STEP_TO_PROG = fsharp/$($(1)).exe
69b4abd6 132go_STEP_TO_PROG = go/$($(1))
a9cd6543 133groovy_STEP_TO_PROG = groovy/$($(1)).groovy
36e287b5 134java_STEP_TO_PROG = java/target/classes/mal/$($(1)).class
b76aa73b 135haskell_STEP_TO_PROG = haskell/$($(1))
32d0a1cf 136haxe_STEP_TO_PROG = $(haxe_STEP_TO_PROG_$(HAXE_MODE))
7511317b 137io_STEP_TO_PROG = io/$($(1)).io
a23e0cdb 138julia_STEP_TO_PROG = julia/$($(1)).jl
db4c329a 139js_STEP_TO_PROG = js/$($(1)).js
53c2ea70 140kotlin_STEP_TO_PROG = kotlin/$($(1)).jar
9d42904e 141lua_STEP_TO_PROG = lua/$($(1)).lua
db4c329a
JM
142make_STEP_TO_PROG = make/$($(1)).mk
143mal_STEP_TO_PROG = mal/$($(1)).mal
59d10e1b 144ocaml_STEP_TO_PROG = ocaml/$($(1))
9a54ea18 145matlab_STEP_TO_PROG = matlab/$($(1)).m
c1fe72ae 146miniMAL_STEP_TO_PROG = miniMAL/$($(1)).json
dbac60df 147nim_STEP_TO_PROG = nim/$($(1))
2faae94c 148objc_STEP_TO_PROG = objc/$($(1))
b5dedee0 149perl_STEP_TO_PROG = perl/$($(1)).pl
db4c329a
JM
150php_STEP_TO_PROG = php/$($(1)).php
151ps_STEP_TO_PROG = ps/$($(1)).ps
152python_STEP_TO_PROG = python/$($(1)).py
4d1456b9 153r_STEP_TO_PROG = r/$($(1)).r
f5223195 154racket_STEP_TO_PROG = racket/$($(1)).rkt
80320efc 155rpython_STEP_TO_PROG = rpython/$($(1))
db4c329a 156ruby_STEP_TO_PROG = ruby/$($(1)).rb
434516e0 157rust_STEP_TO_PROG = rust/target/release/$($(1))
821930db 158scala_STEP_TO_PROG = scala/$($(1)).scala
2539e6af 159swift_STEP_TO_PROG = swift/$($(1))
0eace3df 160swift3_STEP_TO_PROG = swift3/$($(1))
54d9903c 161tcl_STEP_TO_PROG = tcl/$($(1)).tcl
ee7cd585 162vb_STEP_TO_PROG = vb/$($(1)).exe
50a964ce 163vimscript_STEP_TO_PROG = vimscript/$($(1)).vim
5eb1f5cb 164guile_STEP_TO_PROG = guile/$($(1)).scm
db4c329a 165
17180e85 166
c4033aab
JM
167# Needed some argument munging
168COMMA = ,
169noop =
170SPACE = $(noop) $(noop)
d1596ac2 171export FACTOR_ROOTS := .
db4c329a 172
17180e85
JM
173# Macro for running a step:
174# $(1): step (e.g. "stepA")
175# $(2): program for step (e.g. result of *_STEP_TO_PROG
176# $(3): program arguments
3b7ef8c7 177awk_RUNSTEP = awk -O -f ../$(2) $(3)
db4c329a
JM
178bash_RUNSTEP = bash ../$(2) $(3)
179c_RUNSTEP = ../$(2) $(3)
f82cb965 180d_RUNSTEP = ../$(2) $(3)
db4c329a 181clojure_RUNSTEP = lein with-profile +$(1) trampoline run $(3)
891c3f3b 182coffee_RUNSTEP = coffee ../$(2) $(3)
9ddaa0b9 183cpp_RUNSTEP = ../$(2) $(3)
86fe6314 184crystal_RUNSTEP = ../$(2) $(3)
db4c329a 185cs_RUNSTEP = mono ../$(2) --raw $(3)
ae28e856 186elisp_RUNSTEP = emacs -Q --batch --load ../$(2) $(3)
df2ca97b 187elixir_RUNSTEP = mix $(notdir $(basename $(2))) $(3)
2cc3804b 188erlang_RUNSTEP = ../$(2) $(3)
4eb71990 189es6_RUNSTEP = node ../$(2) $(3)
389c9b8a 190factor_RUNSTEP = factor ../$(2) $(3)
59038a10 191forth_RUNSTEP = gforth ../$(2) $(3)
1c358979 192fsharp_RUNSTEP = mono ../$(2) --raw $(3)
69b4abd6 193go_RUNSTEP = ../$(2) $(3)
a9cd6543 194groovy_RUNSTEP = groovy ../$(2) $(3)
5245b079
JM
195# needs TERM=dumb to work with readline
196guile_RUNSTEP = guile --no-auto-compile -L ../guile ../$(2) $(3)
b76aa73b 197haskell_RUNSTEP = ../$(2) $(3)
6c4c14bd 198haxe_RUNSTEP = python3 ../$(2) $(3)
32d0a1cf 199haxe_RUNSTEP = $(haxe_RUNSTEP_$(HAXE_MODE))
7511317b 200io_RUNSTEP = io ../$(2) $(3)
798206ac 201java_RUNSTEP = mvn -quiet exec:java -Dexec.mainClass="mal.$($(1))" $(if $(3), -Dexec.args="$(3)",)
a23e0cdb 202julia_RUNSTEP = ../$(2) $(3)
db4c329a 203js_RUNSTEP = node ../$(2) $(3)
53c2ea70 204kotlin_RUNSTEP = java -jar ../$(2) $(3)
798206ac 205lua_RUNSTEP = ../$(2) $(3)
db4c329a 206make_RUNSTEP = make -f ../$(2) $(3)
922d4c3b 207mal_RUNSTEP = $(call $(MAL_IMPL)_RUNSTEP,stepA,$(call $(MAL_IMPL)_STEP_TO_PROG,stepA),../$(2),") #"
59d10e1b 208ocaml_RUNSTEP = ../$(2) $(3)
47699629 209matlab_RUNSTEP = $(matlab_cmd) "$($(1))($(call matlab_args,$(3)));quit;"
c1fe72ae 210miniMAL_RUNSTEP = miniMAL ../$(2) $(3)
dbac60df 211nim_RUNSTEP = ../$(2) $(3)
2faae94c 212objc_RUNSTEP = ../$(2) $(3)
82acd3de 213perl_RUNSTEP = perl ../$(2) $(3)
db4c329a 214php_RUNSTEP = php ../$(2) $(3)
406761e7 215ps_RUNSTEP = gs -q -I./ -dNODISPLAY -- ../$(2) $(3)
db4c329a 216python_RUNSTEP = $(PYTHON) ../$(2) $(3)
4d1456b9 217r_RUNSTEP = Rscript ../$(2) $(3)
f5223195 218racket_RUNSTEP = ../$(2) $(3)
80320efc 219rpython_RUNSTEP = ../$(2) $(3)
db4c329a 220ruby_RUNSTEP = ruby ../$(2) $(3)
abdd56eb 221rust_RUNSTEP = ../$(2) $(3)
821930db 222scala_RUNSTEP = sbt 'run-main $($(1))$(if $(3), $(3),)'
2539e6af 223swift_RUNSTEP = ../$(2) $(3)
0eace3df 224swift3_RUNSTEP = ../$(2) $(3)
576ef370 225tcl_RUNSTEP = tclsh ../$(2) --raw $(3)
ee7cd585 226vb_RUNSTEP = mono ../$(2) --raw $(3)
50a964ce 227vimscript_RUNSTEP = ./run_vimscript.sh ../$(2) $(3)
db4c329a 228
31690700 229
4959b19d
JM
230# DOCKERIZE utility functions
231lc = $(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))))))))))))))))))))))))))
232impl_to_image = kanaka/mal-test-$(call lc,$(1))
233
234actual_impl = $(if $(filter mal,$(1)),$(MAL_IMPL),$(1))
235
236get_build_prefix = $(if $(strip $(DOCKERIZE)),docker run -it --rm -u $(shell id -u) -v $(dir $(abspath $(lastword $(MAKEFILE_LIST)))):/mal -w /mal/$(1) $(if $(filter factor,$(1)),-e FACTOR_ROOTS=$(FACTOR_ROOTS),) $(call impl_to_image,$(1)) ,)
237get_run_prefix = $(if $(strip $(DOCKERIZE)),docker run -it --rm -u $(shell id -u) -v $(dir $(abspath $(lastword $(MAKEFILE_LIST)))):/mal -w /mal/$(call actual_impl,$(1)) $(if $(filter factor,$(1)),-e FACTOR_ROOTS=$(FACTOR_ROOTS),) $(call impl_to_image,$(call actual_impl,$(1))) ,)
238
239
50a964ce
DM
240vimscript_TEST_OPTS = --test-timeout 30
241ifeq ($(MAL_IMPL),vimscript)
242mal_TEST_OPTS = --start-timeout 60 --test-timeout 180
243endif
31690700
JM
244
245# Derived lists
246STEPS = $(sort $(filter step%,$(.VARIABLES)))
8569b2af
JM
247DO_IMPLS = $(filter-out $(SKIP_IMPLS),$(IMPLS))
248IMPL_TESTS = $(foreach impl,$(DO_IMPLS),test^$(impl))
31690700 249STEP_TESTS = $(foreach step,$(STEPS),test^$(step))
17180e85 250ALL_TESTS = $(filter-out $(foreach impl,$(STEP5_EXCLUDES),test^$(impl)^step5),\
31690700 251 $(strip $(sort \
8569b2af 252 $(foreach impl,$(DO_IMPLS),\
31690700
JM
253 $(foreach step,$(STEPS),test^$(impl)^$(step))))))
254
cf1d3eae
JM
255DOCKER_BUILD = $(foreach impl,$(DO_IMPLS),docker-build^$(impl))
256
17180e85 257IMPL_PERF = $(foreach impl,$(filter-out $(PERF_EXCLUDES),$(DO_IMPLS)),perf^$(impl))
db4c329a 258
854cf2a6
DM
259IMPL_REPL = $(foreach impl,$(DO_IMPLS),repl^$(impl))
260ALL_REPL = $(strip $(sort \
261 $(foreach impl,$(DO_IMPLS),\
262 $(foreach step,$(STEPS),repl^$(impl)^$(step)))))
263
31690700
JM
264#
265# Build rules
266#
267
4fc7a281 268# Build a program in an implementation directory
f045aba1
JM
269# Make sure we always try and build first because the dependencies are
270# encoded in the implementation Makefile not here
271.PHONY: $(foreach i,$(DO_IMPLS),$(foreach s,$(STEPS),$(call $(i)_STEP_TO_PROG,$(s))))
4fc7a281 272$(foreach i,$(DO_IMPLS),$(foreach s,$(STEPS),$(call $(i)_STEP_TO_PROG,$(s)))):
f045aba1 273 $(foreach impl,$(word 1,$(subst /, ,$(@))),\
4959b19d
JM
274 $(if $(DOCKERIZE), \
275 $(call get_build_prefix,$(impl))$(MAKE) $(patsubst $(impl)/%,%,$(@)), \
276 $(MAKE) -C $(impl) $(subst $(impl)/,,$(@))))
9ddaa0b9 277
31690700
JM
278# Allow test, test^STEP, test^IMPL, and test^IMPL^STEP
279.SECONDEXPANSION:
280$(IMPL_TESTS): $$(filter $$@^%,$$(ALL_TESTS))
281
282.SECONDEXPANSION:
283$(STEP_TESTS): $$(foreach step,$$(subst test^,,$$@),$$(filter %^$$(step),$$(ALL_TESTS)))
284
285.SECONDEXPANSION:
286$(ALL_TESTS): $$(call $$(word 2,$$(subst ^, ,$$(@)))_STEP_TO_PROG,$$(word 3,$$(subst ^, ,$$(@))))
287 @$(foreach impl,$(word 2,$(subst ^, ,$(@))),\
288 $(foreach step,$(word 3,$(subst ^, ,$(@))),\
289 cd $(if $(filter mal,$(impl)),$(MAL_IMPL),$(impl)); \
290 $(foreach test,$(call STEP_TEST_FILES,$(impl),$(step)),\
291 echo '----------------------------------------------'; \
292 echo 'Testing $@, step file: $+, test file: $(test)'; \
4959b19d
JM
293 echo 'Running: $(call get_run_prefix,$(impl))../runtest.py $(TEST_OPTS) $(call $(impl)_TEST_OPTS) ../$(test) -- $(call $(impl)_RUNSTEP,$(step),$(+))'; \
294 $(call get_run_prefix,$(impl))../runtest.py $(TEST_OPTS) $(call $(impl)_TEST_OPTS) ../$(test) -- $(call $(impl)_RUNSTEP,$(step),$(+));)))
31690700 295
31690700 296
db4c329a 297
4959b19d
JM
298test: $(ALL_TESTS)
299tests: $(ALL_TESTS)
712af9ef 300
b6dc3e37
JM
301# dist rules
302
303dist: $(IMPL_DIST)
304
305.SECONDEXPANSION:
306$(IMPL_DIST):
307 @echo "----------------------------------------------"; \
308 $(foreach impl,$(word 2,$(subst ^, ,$(@))),\
309 echo "Running: make -C $(impl) dist"; \
310 $(MAKE) --no-print-directory -C $(impl) dist)
311
cf1d3eae
JM
312# Docker build rules
313
314docker-build: $(DOCKER_BUILD)
315
316.SECONDEXPANSION:
317$(DOCKER_BUILD):
318 echo "----------------------------------------------"; \
319 $(foreach impl,$(word 2,$(subst ^, ,$(@))),\
4959b19d
JM
320 echo "Running: docker build -t $(call impl_to_image,$(impl)) .:"; \
321 cd $(impl) && docker build -t $(call impl_to_image,$(impl)) .)
db4c329a
JM
322
323# Performance test rules
324
325perf: $(IMPL_PERF)
326
327.SECONDEXPANSION:
328$(IMPL_PERF):
329 @echo "----------------------------------------------"; \
330 $(foreach impl,$(word 2,$(subst ^, ,$(@))),\
331 cd $(if $(filter mal,$(impl)),$(MAL_IMPL),$(impl)); \
332 echo "Performance test for $(impl):"; \
4959b19d
JM
333 echo 'Running: $(call get_run_prefix,$(impl))$(call $(impl)_RUNSTEP,stepA,$(call $(impl)_STEP_TO_PROG,stepA),../tests/perf1.mal)'; \
334 $(call get_run_prefix,$(impl))$(call $(impl)_RUNSTEP,stepA,$(call $(impl)_STEP_TO_PROG,stepA),../tests/perf1.mal); \
db4c329a 335 echo 'Running: $(call $(impl)_RUNSTEP,stepA,$(call $(impl)_STEP_TO_PROG,stepA),../tests/perf2.mal)'; \
4959b19d 336 $(call get_run_prefix,$(impl))$(call $(impl)_RUNSTEP,stepA,$(call $(impl)_STEP_TO_PROG,stepA),../tests/perf2.mal); \
699f0ad2 337 echo 'Running: $(call $(impl)_RUNSTEP,stepA,$(call $(impl)_STEP_TO_PROG,stepA),../tests/perf3.mal)'; \
4959b19d
JM
338 $(call get_run_prefix,$(impl))$(call $(impl)_RUNSTEP,stepA,$(call $(impl)_STEP_TO_PROG,stepA),../tests/perf3.mal))
339
854cf2a6
DM
340
341# REPL invocation rules
342# Allow repl^IMPL^STEP and repl^IMPL (which starts REPL of stepA)
343
344.SECONDEXPANSION:
345$(IMPL_REPL): $$@^stepA
346
347.SECONDEXPANSION:
348$(ALL_REPL): $$(call $$(word 2,$$(subst ^, ,$$(@)))_STEP_TO_PROG,$$(word 3,$$(subst ^, ,$$(@))))
349 @$(foreach impl,$(word 2,$(subst ^, ,$(@))),\
350 $(foreach step,$(word 3,$(subst ^, ,$(@))),\
351 cd $(if $(filter mal,$(impl)),$(MAL_IMPL),$(impl)); \
352 echo 'REPL implementation $(impl), step file: $+'; \
4959b19d
JM
353 echo 'Running: $(call get_run_prefix,$(impl))$(call $(impl)_RUNSTEP,$(step),$(+))'; \
354 $(call get_run_prefix,$(impl))$(call $(impl)_RUNSTEP,$(step),$(+));))
bcfd8b70
JM
355
356
357# Recursive rules (call make FOO in each subdirectory)
358
359define recur_template
360.PHONY: $(1)
361$(1): $(2)
362.SECONDEXPANSION:
363$(2):
364 @echo "----------------------------------------------"; \
365 $$(foreach impl,$$(word 2,$$(subst ^, ,$$(@))),\
4959b19d
JM
366 $$(if $$(DOCKERIZE), \
367 echo "Running: $$(call get_build_prefix,$$(impl))$$(MAKE) --no-print-directory $(1)"; \
368 $$(call get_build_prefix,$$(impl))$$(MAKE) --no-print-directory $(1), \
369 echo "Running: $$(MAKE) --no-print-directory -C $$(impl) $(1)"; \
370 $$(MAKE) --no-print-directory -C $$(impl) $(1)))
bcfd8b70
JM
371endef
372
373recur_impls_ = $(filter-out $(foreach impl,$($(1)_EXCLUDES),$(1)^$(impl)),$(foreach impl,$(IMPLS),$(1)^$(impl)))
374
375# recursive clean
376$(eval $(call recur_template,clean,$(call recur_impls_,clean)))
377
378# recursive stats
379$(eval $(call recur_template,stats,$(call recur_impls_,stats)))
380$(eval $(call recur_template,stats-lisp,$(call recur_impls_,stats-lisp)))
381
382# recursive dist
383$(eval $(call recur_template,dist,$(call recur_impls_,dist)))