Commit Graph

15 Commits

Author SHA1 Message Date
Enji Cooper
532979fa28 Don't require ${DESTDIR}${_gcno_dir} until install 2017-10-23 16:50:33 +00:00
Enji Cooper
b28b665cbe Need to make all of the variables immediate, or the last value for _gcno_dir wins
This is particularly fun when relative paths are embedded in SRCS, like
lib/libclang_rt does (which I argue is ripe for corruption via parallel
builds).
2017-10-23 00:56:59 +00:00
Enji Cooper
48c54cbc90 Create GCNOS directories at install time if needed
Add GCNOS{GRP,MODE,OWN} for parity with FILES{GRP,MODE,OWN}. The defaults are
based on BIN{GRP,MODE,OWN}.

GCNOSDIRMODE is added, strictly for configurability, if need be.
2017-10-22 21:00:59 +00:00
Enji Cooper
051c9c6839 It _was_ .gcno's, not .gcda's that get produced with cc --coverage
Try to install them instead of the .gcda's, since the .gcda's likely won't exist.

TODO: verify that installworld does indeed do the right thing.

Ref: gcc(1) -ftest-coverage description; --coverage (option in use) is an alias
     for -fprofile-arcs -ftest-coverage
2017-10-22 07:12:55 +00:00
Enji Cooper
e31df75228 Fix .gcda to .pico (bsd.lib.mk) and .o (bsd.prog.mk) dependency mapping
The logic wasn't using a filtered version of SRCS -- it was using the
unfiltered version. This was causing some hilarity with unnecessary
dependencies, like headers and the like in lib/libc/... .

Also use .pico with bsd.lib.mk, not .o -- .o doesn't use SHARED_C*FLAGS,
which doesn't contain _COV_FLAG, which means that the .gcda's would have
relied on objects that didn't build them as a side-effect.
2017-10-05 07:10:28 +00:00
Enji Cooper
25311a8015 Use a simpler pattern than what I used in r324150 2017-10-01 05:16:19 +00:00
Enji Cooper
d1335b630e Make the dependency relationship between .gcda and .o files explicit 2017-10-01 02:39:07 +00:00
Enji Cooper
95a55bd8cd Fix logic errors and simplify installation process
.gcda files should be installed, not .gcno files. It's easier to
formulate which .gcda's to install based on the SRCS and their
extension in bsd.{lib,prog}.mk .
2017-09-17 03:08:00 +00:00
Enji Cooper
9efc32ad99 Only populate GCNOS if running clean or install targets 2017-08-23 03:54:34 +00:00
Enji Cooper
1a2361e50e Need to account for SRCS that don't get compiled with --coverage, e.g., .S files 2017-08-20 07:06:13 +00:00
Enji Cooper
de9c083936 Apparently SOBJS, etc, can have duplicates 2017-08-19 18:57:43 +00:00
Enji Cooper
1ed13d2ea8 Use proper spelling for the directory variable
It's GCNOSDIR_foo:T, not GCNOS_foo:TDIR.
2017-08-19 18:52:13 +00:00
Enji Cooper
66e5cab5c0 Complete bsd.cov.mk integration
Pass through appropriate objects via COV_OBJS in bsd.lib.mk (based on
SOBJS), and appropriate objects via bsd.prog.mk (OBJS).

While here, do more intelligent things in terms of iterating over COV_OBJS,
building lists of items to install with the GCNOS variable/adding GCNOS to
FILESGROUPS, etc. This reduces the 2 unrolled .for loops into 1.
2017-08-19 18:31:00 +00:00
Enji Cooper
d242cb99ec This Makefile snippet needs more work -- it tries to install .gcno files
for .asm, .s files and it shouldn't
2017-07-31 09:50:47 +00:00
Enji Cooper
dc5068b507 Add bsd.cov.mk
It's a Makefile snippet that currently handles cleanup/installation of
.gcno files
2017-07-31 08:02:25 +00:00