$(foreach step,$(STEPS),test^$(impl)^$(step))))))
IMPL_STATS = $(foreach impl,$(IMPLS),stats^$(impl))
+IMPL_STATS_LISP = $(foreach impl,$(IMPLS),stats-lisp^$(impl))
#
# Build rules
echo "Stats for $(impl):"; \
$(MAKE) --no-print-directory -C $(impl) stats)
+.SECONDEXPANSION:
+$(IMPL_STATS_LISP):
+ @echo "----------------------------------------------"; \
+ $(foreach impl,$(word 2,$(subst ^, ,$(@))),\
+ echo "Stats (lisp only) for $(impl):"; \
+ $(MAKE) --no-print-directory -C $(impl) stats-lisp)
+
stats: $(IMPL_STATS)
+stats-lisp: $(IMPL_STATS_LISP)
TESTS = tests/types.sh tests/reader.sh
-SOURCES = types.sh reader.sh printer.sh env.sh core.sh stepA_more.sh
+SOURCES_BASE = types.sh reader.sh printer.sh
+SOURCES_LISP = env.sh core.sh stepA_more.sh
+SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
all: mal.sh
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)
TESTS =
-SOURCES = readline.h readline.c types.h types.c \
- reader.h reader.c printer.h printer.c \
- env.c core.h core.c interop.h interop.c \
- stepA_more.c
+SOURCES_BASE = readline.h readline.c types.h types.c \
+ reader.h reader.c printer.h printer.c \
+ interop.h interop.c
+SOURCES_LISP = env.c core.h core.c stepA_more.c
+SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
+
#####################
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)
TESTS =
-SOURCES = src/readline.clj src/reader.clj src/printer.clj \
- src/env.clj src/core.clj src/stepA_more.clj
+SOURCES_BASE = src/readline.clj src/reader.clj src/printer.clj
+SOURCES_LISP = src/env.clj src/core.clj src/stepA_more.clj
+SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
all:
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)
TESTS =
-SOURCES = readline.cs types.cs reader.cs printer.cs env.cs core.cs \
- stepA_more.cs
+SOURCES_BASE = readline.cs types.cs reader.cs printer.cs
+SOURCES_LISP = env.cs core.cs stepA_more.cs
+SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
OTHER_SOURCES = getline.cs
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)
-
-TESTS =
-
-
-SOURCES = src/main/java/mal/readline.java src/main/java/mal/types.java \
- src/main/java/mal/reader.java src/main/java/mal/printer.java \
- src/main/java/mal/env.java src/main/java/mal/core.java \
- src/main/java/mal/stepA_more.java
-
-#.PHONY: stats tests $(TESTS)
-.PHONY: stats
-
-stats: $(SOURCES)
- @wc $^
-
-#tests: $(TESTS)
-#
-#$(TESTS):
-# @echo "Running $@"; \
-# python $@ || exit 1; \
+
+TESTS =
+
+
+SOURCES_BASE = src/main/java/mal/readline.java src/main/java/mal/types.java \
+ src/main/java/mal/reader.java src/main/java/mal/printer.java
+SOURCES_LISP = src/main/java/mal/env.java src/main/java/mal/core.java \
+ src/main/java/mal/stepA_more.java
+SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
+
+#.PHONY: stats tests $(TESTS)
+.PHONY: stats
+
+stats: $(SOURCES)
+ @wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
TESTS = tests/types.js tests/reader.js tests/step5_tco.js
-SOURCES = node_readline.js types.js reader.js printer.js \
- env.js core.js stepA_more.js
+SOURCES_BASE = node_readline.js types.js reader.js printer.js
+SOURCES_LISP = env.js core.js stepA_more.js
+SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
WEB_SOURCES = $(SOURCES:node_readline.js=josh_readline.js)
all: mal.js mal_web.js
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)
TESTS = tests/types.mk tests/reader.mk tests/step9_interop.mk
-SOURCES = util.mk readline.mk gmsl.mk types.mk reader.mk printer.mk \
- env.mk core.mk stepA_more.mk
+SOURCES_BASE = util.mk readline.mk gmsl.mk types.mk reader.mk printer.mk
+SOURCES_LISP = env.mk core.mk stepA_more.mk
+SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
mal.mk: $(SOURCES)
echo "#!/usr/bin/make -f" > $@
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)
TESTS =
-
-SOURCES = env.mal core.mal stepA_more.mal
+SOURCES_BASE =
+SOURCES_LISP = env.mal core.mal stepA_more.mal
+SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
#.PHONY: stats tests $(TESTS)
.PHONY: stats
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
#tests: $(TESTS)
#
TESTS =
-SOURCES = readline.php types.php reader.php printer.php \
- env.php core.php stepA_more.php
+SOURCES_BASE = readline.php types.php reader.php printer.php
+SOURCES_LISP = env.php core.php stepA_more.php
+SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
.PHONY: stats tests $(TESTS)
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)
TESTS =
-SOURCES = types.ps reader.ps printer.ps env.ps core.ps stepA_more.ps
+SOURCES_BASE = types.ps reader.ps printer.ps
+SOURCES_LISP = env.ps core.ps stepA_more.ps
+SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
.PHONY: stats tests $(TESTS)
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)
TESTS =
-SOURCES = mal_readline.py mal_types.py reader.py printer.py \
- env.py core.py stepA_more.py
+SOURCES_BASE = mal_readline.py mal_types.py reader.py printer.py
+SOURCES_LISP = env.py core.py stepA_more.py
+SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
+
#all: mal.sh
#
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)