summaryrefslogtreecommitdiff
path: root/buildlib/staticlibrary.mak
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-04-13 21:40:35 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-04-13 22:12:01 +0200
commitcbc9ec23b0fb551f20f4fd8ca46d98f59b5666bc (patch)
tree001a279cf2a604793da3603d3c3017418b8d0d8a /buildlib/staticlibrary.mak
parent23fc5ecaa01bc41d582640dd5950be73987a8b4b (diff)
compile with absolute paths to allow lcov use
Instructing gcc (or clang) to prepare for capturing coverage data is easy: Just build with: CXXFLAGS=--coverage The hard part is that our buildsystem uses relative paths and so confuses the hell out of lcov as it assumes this way that all our *.cc files are in the same directory… by changing to absolute paths in the compile rules we solve this problem. Still not perfect as it refers to build/include files for most headers and our forking/threading code isn't properly captured, but good enough to see red reports for now: CXXFLAGS=--coverage make make test ./test/integration/run-tests -q lcov --no-external --directory . --capture --output-file apt.info genhtml --output-directory ./coverage/ apt.info Git-Dch: Ignore
Diffstat (limited to 'buildlib/staticlibrary.mak')
-rw-r--r--buildlib/staticlibrary.mak2
1 files changed, 1 insertions, 1 deletions
diff --git a/buildlib/staticlibrary.mak b/buildlib/staticlibrary.mak
index ce9259dc0..86908700f 100644
--- a/buildlib/staticlibrary.mak
+++ b/buildlib/staticlibrary.mak
@@ -50,7 +50,7 @@ endif
vpath %.cc $(SUBDIRS)
$(OBJ)/%.o: %.cc
echo Compiling $< to $@
- $(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
+ $(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXFLAGS) -o $@ $(abspath $<)
$(DoDep)
# Include the dependencies that are available