Skip to content

Commit 4af3dda

Browse files
committed
Preserve intermediate .c files in coverage mode
The introduction of the .y -> .c pattern rule causes some .c files such as bootparse.c to be considered intermediate files in the .y -> .c -> .o rule chain, which make would automatically delete. But in coverage mode, the processing tools such as genhtml need those files, so mark them as "precious" so that make preserves them.
1 parent 6868ed7 commit 4af3dda

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Makefile.global.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ GENHTML = @GENHTML@
329329
ifeq ($(enable_coverage),yes)
330330
# ccache loses .gcno files
331331
export CCACHE_DISABLE = 1
332+
# preserve intermediate .c files for genhtml
333+
.PRECIOUS: %.c
332334
endif
333335

334336
# Feature settings

0 commit comments

Comments
 (0)