Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Makefile #20

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading