1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-10 12:47:45 +03:00
mal/java/Makefile
Joel Martin 46e2568944 Makefile/runtest/tests: deferable/optional options
- tests/*: marked with deferable and optional runtest flags. Some
  moving around of tests within different sections to more closely
  align with the guide.
- runtest.py has --deferable/--no-deferable and
  --optional/--no-optional to control whether tests marked as
  deferable and optional are tested.
- Makefile: DEFERABLE and OPTIONAL top level flags to be passed to
  runtest when running tests.
- Also, fix problems in java quoting revealed by step7 test changes.
2016-05-09 21:14:15 -05:00

44 lines
1.0 KiB
Makefile

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_mal.java
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
all:
mvn install
dist: mal.jar mal
mal.jar: target/classes/mal/stepA_mal.class
mvn assembly:assembly
cp target/mal-0.0.1.jar $@
SHELL := bash
mal: mal.jar
cat <(echo -e '#!/bin/sh\nexec java -jar "$$0" "$$@"') mal.jar > $@
chmod +x mal
src/main/mal/%.java:
mvn install
target/classes/mal/step%.class: src/main/java/mal/step%.java ${SOURCES}
mvn install
clean:
mvn clean
rm -f mal.jar mal
#.PHONY: stats tests $(TESTS)
.PHONY: stats
stats: $(SOURCES)
@wc $^
@printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*//|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
stats-lisp: $(SOURCES_LISP)
@wc $^
@printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*//|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"