Skip to content

Commit

Permalink
Merge pull request #20 from dwRchyngqxs/patch-2
Browse files Browse the repository at this point in the history
Update Makefile for coverage
  • Loading branch information
Fiwo735 authored Feb 28, 2024
2 parents 7cc0e2b + fa69810 commit 0d02251
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DEPENDENCIES := $(patsubst src/%.cpp,build/%.d,$(SOURCES))
OBJECTS := $(patsubst src/%.cpp,build/%.o,$(SOURCES))
OBJECTS += build/parser.tab.o build/lexer.yy.o

.PHONY: default clean with_coverage coverage
.PHONY: default clean coverage

default: bin/c_compiler

Expand All @@ -30,8 +30,6 @@ build/lexer.yy.cpp: src/lexer.flex build/parser.tab.hpp
@mkdir -p build
flex -o build/lexer.yy.cpp src/lexer.flex

with_coverage : bin/c_compiler

coverage:
@rm -rf coverage/
@mkdir -p coverage
Expand Down
2 changes: 1 addition & 1 deletion docs/coverage.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Coverage information
====================

If you want to know which part of your code is executed when running your compiler on a file you can build your compiler with `make with_coverage`, run your compiler on the file, then run `make coverage`.
If you want to know which part of your code is executed when running your compiler on a file you can run your compiler on the file, then run `make coverage`.

This will generate a webpage `coverage/index.html` with a listing of all the source files and for each source file a listing of the number of times each line has been executed.

Expand Down

0 comments on commit 0d02251

Please sign in to comment.