Skip to content

Instantly share code, notes, and snippets.

@nilbus
Last active October 14, 2016 08:56
Show Gist options
  • Save nilbus/e04e31bf997174379f10 to your computer and use it in GitHub Desktop.
Save nilbus/e04e31bf997174379f10 to your computer and use it in GitHub Desktop.
GATech CS-6300 Assignment 6 Makefile
# For Linux (different sed arguments)
TEST_CLASSES := bin/edu/gatech/replace/AllTests.class bin/edu/gatech/replace/ReplaceTest.class
all: show-coverage
show-coverage: replaceCoverage/frame-summary.html
@grep % replaceCoverage/frame-summary.html | head -n 1 | sed -e 's/.*>\([0-9]\+%\).*>\([0-9]\+%\).*/\nCoverage: Line: \1, Branch: \2/'
build-tests: $(TEST_CLASSES)
run-tests: build-tests
sh run-tests.sh
clean:
rm $(TEST_CLASSES)
replaceCoverage/frame-summary.html: run-tests
bin/edu/gatech/replace/%.class: test/edu/gatech/replace/%.java
javac -cp bin:lib/junit.jar -d bin test/edu/gatech/replace/*.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment