Add stats-lisp target (only env, core, stepA)
authorJoel Martin <github@martintribe.org>
Fri, 11 Apr 2014 00:27:42 +0000 (19:27 -0500)
committerJoel Martin <github@martintribe.org>
Fri, 11 Apr 2014 00:27:42 +0000 (19:27 -0500)
12 files changed:
Makefile
bash/Makefile
c/Makefile
clojure/Makefile
cs/Makefile
java/Makefile
js/Makefile
make/Makefile
mal/Makefile
php/Makefile
ps/Makefile
python/Makefile

index 8ea60de..b7feb01 100644 (file)
--- 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)
index 65694ee..d5a0867 100644 (file)
@@ -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)
 
index fab4447..b8d3130 100644 (file)
@@ -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)
 
index 4bc289e..376d107 100644 (file)
@@ -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)
 
index 8d05ec0..f8aefcc 100644 (file)
@@ -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)
 
dissimilarity index 80%
index e6312a3..2e168c4 100644 (file)
@@ -1,20 +1,17 @@
-
-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 $^
index 2b7aa88..36b9caa 100644 (file)
@@ -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)
 
index 2bb1e1e..52a7a7d 100644 (file)
@@ -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)
 
index 799b691..7e45ad4 100644 (file)
@@ -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)
 #
index e7ea51d..9b91421 100644 (file)
@@ -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)
 
index fd5ca70..43b5b70 100644 (file)
@@ -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)
 
index 3985d14..b461db3 100644 (file)
@@ -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)