Build gcov code only if MKCOVERAGE is yes
This commit is contained in:
parent
4dece73bf0
commit
86b061078b
6 changed files with 23 additions and 3 deletions
|
@ -13,7 +13,6 @@ SRCS= \
|
|||
env_parse.c \
|
||||
env_prefix.c \
|
||||
fkey_ctl.c \
|
||||
gcov.c \
|
||||
get_randomness.c \
|
||||
getidle.c \
|
||||
getsysinfo.c \
|
||||
|
@ -50,7 +49,6 @@ SRCS= \
|
|||
sched_start.c \
|
||||
sched_stop.c \
|
||||
sef.c \
|
||||
sef_gcov.c \
|
||||
sef_init.c \
|
||||
sef_liveupdate.c \
|
||||
sef_ping.c \
|
||||
|
@ -128,6 +126,11 @@ SRCS= \
|
|||
vm_yield_get_block.c \
|
||||
vprintf.c \
|
||||
|
||||
.if ${MKCOVERAGE} != "no"
|
||||
SRCS+= gcov.c \
|
||||
sef_gcov.c
|
||||
CPPFLAGS+= -DUSE_COVERAGE
|
||||
.endif
|
||||
|
||||
CPPFLAGS.sched_start.c+= -I${MINIXSRCDIR}
|
||||
|
||||
|
|
|
@ -24,7 +24,9 @@ FORWARD _PROTOTYPE( void sef_debug_refresh_params, (void) );
|
|||
PUBLIC _PROTOTYPE( char* sef_debug_header, (void) );
|
||||
|
||||
/* SEF Init prototypes. */
|
||||
#ifdef USE_COVERAGE
|
||||
EXTERN _PROTOTYPE( int do_sef_gcov_request, (message *m_ptr) );
|
||||
#endif
|
||||
EXTERN _PROTOTYPE( int do_sef_rs_init, (endpoint_t old_endpoint) );
|
||||
EXTERN _PROTOTYPE( int do_sef_init_request, (message *m_ptr) );
|
||||
|
||||
|
@ -155,6 +157,7 @@ PUBLIC int sef_receive_status(endpoint_t src, message *m_ptr, int *status_ptr)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_COVERAGE
|
||||
/* Intercept GCOV data requests (sent by VFS in vfs/gcov.c). */
|
||||
if(m_ptr->m_type == COMMON_REQ_GCOV_DATA &&
|
||||
m_ptr->m_source == VFS_PROC_NR) {
|
||||
|
@ -162,6 +165,7 @@ PUBLIC int sef_receive_status(endpoint_t src, message *m_ptr, int *status_ptr)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If we get this far, this is not a valid SEF request, return and
|
||||
* let the caller deal with that.
|
||||
|
|
|
@ -11,7 +11,9 @@ SRCS+= fslib.c fsversion.c
|
|||
SRCS+= dhcp_gettag.c dhcp_settag.c
|
||||
|
||||
# Gcov support.
|
||||
.if ${MKCOVERAGE} != "no"
|
||||
SRCS+= gcov.c gcov_flush.c
|
||||
.endif
|
||||
|
||||
# Various utils
|
||||
SRCS+= itoa.c u64util.c
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
# Makefile for Virtual File System (VFS)
|
||||
.include <bsd.own.mk>
|
||||
|
||||
PROG= vfs
|
||||
SRCS= main.c open.c read.c write.c pipe.c dmap.c \
|
||||
path.c device.c mount.c link.c exec.c \
|
||||
filedes.c stadir.c protect.c time.c \
|
||||
lock.c misc.c utility.c select.c table.c \
|
||||
vnode.c vmnt.c request.c fscall.c gcov.c
|
||||
vnode.c vmnt.c request.c fscall.c
|
||||
|
||||
.if ${MKCOVERAGE} != "no"
|
||||
SRCS+= gcov.c
|
||||
CPPFLAGS+= -DUSE_COVERAGE
|
||||
.endif
|
||||
|
||||
DPADD+= ${LIBSYS} ${LIBTIMERS} ${LIBEXEC}
|
||||
LDADD+= -lsys -ltimers -lexec
|
||||
|
|
|
@ -282,6 +282,9 @@ _PROTOTYPE( int do_write, (void) );
|
|||
|
||||
/* gcov.c */
|
||||
_PROTOTYPE( int do_gcov_flush, (void) );
|
||||
#if ! USE_COVERAGE
|
||||
#define do_gcov_flush no_sys
|
||||
#endif
|
||||
|
||||
/* select.c */
|
||||
_PROTOTYPE( int do_select, (void) );
|
||||
|
|
|
@ -821,6 +821,7 @@ MKWATCHDOG:= no
|
|||
MKACPI:= no
|
||||
MKAPIC:= no
|
||||
MKMCONTEXT:= no
|
||||
MKCOVERAGE:= no
|
||||
.endif
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue