aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-10 19:27:42 -0500
committerJoel Martin <github@martintribe.org>2014-04-10 19:27:42 -0500
commit712af9efbe15a9a65c25ab92ee2a49c8e749ed3d (patch)
tree52cac897ae1834cf812ff41b602885142e7a0b5a
parenta34b02006527d28db5df5c6553be804770b81f79 (diff)
downloadmal-712af9efbe15a9a65c25ab92ee2a49c8e749ed3d.tar.gz
mal-712af9efbe15a9a65c25ab92ee2a49c8e749ed3d.zip
Add stats-lisp target (only env, core, stepA)
-rw-r--r--Makefile9
-rw-r--r--bash/Makefile6
-rw-r--r--c/Makefile12
-rw-r--r--clojure/Makefile7
-rw-r--r--cs/Makefile7
-rw-r--r--java/Makefile17
-rw-r--r--js/Makefile7
-rw-r--r--make/Makefile7
-rw-r--r--mal/Makefile7
-rw-r--r--php/Makefile7
-rw-r--r--ps/Makefile6
-rw-r--r--python/Makefile8
12 files changed, 70 insertions, 30 deletions
diff --git a/Makefile b/Makefile
index 8ea60de..b7feb01 100644
--- a/Makefile
+++ b/Makefile
@@ -67,6 +67,7 @@ ALL_TESTS = $(filter-out $(EXCLUDE_TESTS),\
$(foreach step,$(STEPS),test^$(impl)^$(step))))))
IMPL_STATS = $(foreach impl,$(IMPLS),stats^$(impl))
+IMPL_STATS_LISP = $(foreach impl,$(IMPLS),stats-lisp^$(impl))
#
# Build rules
@@ -107,4 +108,12 @@ $(IMPL_STATS):
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)
diff --git a/bash/Makefile b/bash/Makefile
index 65694ee..d5a0867 100644
--- a/bash/Makefile
+++ b/bash/Makefile
@@ -1,6 +1,8 @@
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
@@ -17,6 +19,8 @@ clean:
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)
diff --git a/c/Makefile b/c/Makefile
index fab4447..b8d3130 100644
--- a/c/Makefile
+++ b/c/Makefile
@@ -6,10 +6,12 @@ LDFLAGS += -g
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)
+
#####################
@@ -55,6 +57,8 @@ clean:
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)
diff --git a/clojure/Makefile b/clojure/Makefile
index 4bc289e..376d107 100644
--- a/clojure/Makefile
+++ b/clojure/Makefile
@@ -1,8 +1,9 @@
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:
@@ -10,6 +11,8 @@ all:
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)
diff --git a/cs/Makefile b/cs/Makefile
index 8d05ec0..f8aefcc 100644
--- a/cs/Makefile
+++ b/cs/Makefile
@@ -4,8 +4,9 @@ DEBUG =
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
@@ -39,6 +40,8 @@ clean:
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)
diff --git a/java/Makefile b/java/Makefile
index e6312a3..2e168c4 100644
--- a/java/Makefile
+++ b/java/Makefile
@@ -2,19 +2,16 @@
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
+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 $^
-
-#tests: $(TESTS)
-#
-#$(TESTS):
-# @echo "Running $@"; \
-# python $@ || exit 1; \
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
diff --git a/js/Makefile b/js/Makefile
index 2b7aa88..36b9caa 100644
--- a/js/Makefile
+++ b/js/Makefile
@@ -1,8 +1,9 @@
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
@@ -22,6 +23,8 @@ clean:
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)
diff --git a/make/Makefile b/make/Makefile
index 2bb1e1e..52a7a7d 100644
--- a/make/Makefile
+++ b/make/Makefile
@@ -1,8 +1,9 @@
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" > $@
@@ -16,6 +17,8 @@ clean:
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)
diff --git a/mal/Makefile b/mal/Makefile
index 799b691..7e45ad4 100644
--- a/mal/Makefile
+++ b/mal/Makefile
@@ -1,14 +1,17 @@
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)
#
diff --git a/php/Makefile b/php/Makefile
index e7ea51d..9b91421 100644
--- a/php/Makefile
+++ b/php/Makefile
@@ -1,13 +1,16 @@
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)
diff --git a/ps/Makefile b/ps/Makefile
index fd5ca70..43b5b70 100644
--- a/ps/Makefile
+++ b/ps/Makefile
@@ -1,12 +1,16 @@
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)
diff --git a/python/Makefile b/python/Makefile
index 3985d14..b461db3 100644
--- a/python/Makefile
+++ b/python/Makefile
@@ -2,8 +2,10 @@
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
#
@@ -20,6 +22,8 @@ SOURCES = mal_readline.py mal_types.py reader.py printer.py \
stats: $(SOURCES)
@wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^
tests: $(TESTS)