Skip to content

Instantly share code, notes, and snippets.

@alinakhay
Forked from nilbus/Makefile
Created October 14, 2016 08:56
Show Gist options
  • Save alinakhay/ecd19c102088ca4d50e07f278384375d to your computer and use it in GitHub Desktop.
Save alinakhay/ecd19c102088ca4d50e07f278384375d 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