Normally, when a header file is removed from the build (as i4b headers
were recently), a simple 'make cleandepend; make depend' is sufficient to keep the tree buildable after a cvs update when doing incremental builds. However, kdump and truss use a script which searches for header files that define ioctls, and generates C code that includes them. This script will usually not need updating when a header file is removed, so the normal dependency mechanism will not realize that it needs to be re-run. One is therefore left with code that references dead files but will only be removed by a full 'make clean', which defeats the purpose of incremental builds. To work around this, modify the cleandepend target in bsd.dep.mk to also remove any files listed in a new variable named CLEANDEPFILES, and modify kdump's and truss's Makefiles accordingly. MFC after: 2 weeks
This commit is contained in:
parent
72d1e737b5
commit
0d7cc1d0eb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175937
@ -5,6 +5,8 @@
|
||||
#
|
||||
# +++ variables +++
|
||||
#
|
||||
# CLEANDEPFILES Additional files to clean when doing cleandepend
|
||||
#
|
||||
# CTAGS A tags file generation program [gtags]
|
||||
#
|
||||
# CTAGSFLAGS Options for ctags(1) [not set]
|
||||
@ -182,6 +184,9 @@ cleandepend:
|
||||
.if defined(HTML)
|
||||
rm -rf HTML
|
||||
.endif
|
||||
.if defined(CLEANDEPFILES)
|
||||
rm -f ${CLEANDEPFILES}
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
@ -7,7 +7,8 @@ PROG= kdump
|
||||
SRCS= kdump.c ioctl.c kdump_subr.c subr.c
|
||||
CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../..
|
||||
|
||||
CLEANFILES= ioctl.c kdump_subr.c
|
||||
CLEANDEPFILES= ioctl.c kdump_subr.c
|
||||
CLEANFILES= ${CLEANDEPFILES}
|
||||
|
||||
ioctl.c: mkioctls
|
||||
sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
|
||||
|
@ -1,6 +1,6 @@
|
||||
# $FreeBSD$
|
||||
|
||||
WARNS?= 6
|
||||
WARNS?= 6
|
||||
NO_WERROR=
|
||||
PROG= truss
|
||||
SRCS= main.c setup.c syscalls.c syscalls.h ioctl.c ${MACHINE_ARCH}-fbsd.c
|
||||
@ -9,8 +9,9 @@ SRCS+= i386-linux.c linux_syscalls.h
|
||||
.endif
|
||||
|
||||
CFLAGS+= -I${.CURDIR} -I.
|
||||
CLEANFILES+=i386l-syscalls.master syscalls.master linux_syscalls.h \
|
||||
CLEANDEPFILES=i386l-syscalls.master syscalls.master linux_syscalls.h \
|
||||
syscalls.h ioctl.c
|
||||
CLEANFILES+=${CLEANDEPFILES}
|
||||
|
||||
.SUFFIXES: .master
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user