Remove build system support for lint.
Differential Revision: https://reviews.freebsd.org/D13124
This commit is contained in:
parent
f295b9db79
commit
1cbb58886a
2
Makefile
2
Makefile
@ -129,7 +129,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel buildworld \
|
|||||||
everything hier hierarchy install installcheck installkernel \
|
everything hier hierarchy install installcheck installkernel \
|
||||||
installkernel.debug packagekernel packageworld \
|
installkernel.debug packagekernel packageworld \
|
||||||
reinstallkernel reinstallkernel.debug \
|
reinstallkernel reinstallkernel.debug \
|
||||||
installworld kernel-toolchain libraries lint maninstall \
|
installworld kernel-toolchain libraries maninstall \
|
||||||
obj objlink showconfig tags toolchain update \
|
obj objlink showconfig tags toolchain update \
|
||||||
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
|
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
|
||||||
_build-tools _build-metadata _cross-tools _includes _libraries \
|
_build-tools _build-metadata _cross-tools _includes _libraries \
|
||||||
|
@ -250,8 +250,6 @@ It has seven targets:
|
|||||||
beforeinstall and afterinstall may also be used to cause
|
beforeinstall and afterinstall may also be used to cause
|
||||||
actions immediately before and after the install target
|
actions immediately before and after the install target
|
||||||
is executed.
|
is executed.
|
||||||
lint:
|
|
||||||
run lint on the source files
|
|
||||||
tags:
|
tags:
|
||||||
create a tags file for the source files.
|
create a tags file for the source files.
|
||||||
|
|
||||||
@ -488,18 +486,17 @@ ${MOD}_oid.h A header which programmatically describes the MIB root and
|
|||||||
|
|
||||||
The include file <bsd.subdir.mk> contains the default targets for building
|
The include file <bsd.subdir.mk> contains the default targets for building
|
||||||
subdirectories. It has the same seven targets as <bsd.prog.mk>: all, clean,
|
subdirectories. It has the same seven targets as <bsd.prog.mk>: all, clean,
|
||||||
cleandir, depend, install, lint, and tags. For all of the directories
|
cleandir, depend, install, and tags. For all of the directories listed in the
|
||||||
listed in the variable SUBDIRS, the specified directory will be visited
|
variable SUBDIRS, the specified directory will be visited and the target made.
|
||||||
and the target made. There is also a default target which allows the
|
There is also a default target which allows the command "make subdir" where
|
||||||
command "make subdir" where subdir is any directory listed in the variable
|
subdir is any directory listed in the variable SUBDIRS.
|
||||||
SUBDIRS.
|
|
||||||
|
|
||||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||||
|
|
||||||
The include file <bsd.lib.mk> has support for building libraries. It has
|
The include file <bsd.lib.mk> has support for building libraries. It has the
|
||||||
the same seven targets as <bsd.prog.mk>: all, clean, cleandir, depend,
|
same seven targets as <bsd.prog.mk>: all, clean, cleandir, depend, install, and
|
||||||
install, lint, and tags. It has a limited number of suffixes, consistent
|
tags. It has a limited number of suffixes, consistent with the current needs of
|
||||||
with the current needs of the BSD tree.
|
the BSD tree.
|
||||||
|
|
||||||
It sets/uses the following variables:
|
It sets/uses the following variables:
|
||||||
|
|
||||||
@ -530,8 +527,6 @@ LIB_CXX The name of the library to build. It also causes
|
|||||||
will be built. NO_PIC can be set to only build a static
|
will be built. NO_PIC can be set to only build a static
|
||||||
library.
|
library.
|
||||||
|
|
||||||
LINTLIBDIR Target directory for lint libraries.
|
|
||||||
|
|
||||||
MAN The manual pages to be installed. See bsd.man.mk for more
|
MAN The manual pages to be installed. See bsd.man.mk for more
|
||||||
details.
|
details.
|
||||||
|
|
||||||
@ -588,8 +583,6 @@ It has seven targets:
|
|||||||
targets beforeinstall and afterinstall may also be used
|
targets beforeinstall and afterinstall may also be used
|
||||||
to cause actions immediately before and after the
|
to cause actions immediately before and after the
|
||||||
install target is executed.
|
install target is executed.
|
||||||
lint:
|
|
||||||
run lint on the source files.
|
|
||||||
tags:
|
tags:
|
||||||
create a tags file for the source files.
|
create a tags file for the source files.
|
||||||
|
|
||||||
|
@ -285,18 +285,6 @@ lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS}
|
|||||||
${RANLIB} ${RANLIBFLAGS} ${.TARGET}
|
${RANLIB} ${RANLIBFLAGS} ${.TARGET}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB)
|
|
||||||
LINTLIB= llib-l${LIB}.ln
|
|
||||||
_LIBS+= ${LINTLIB}
|
|
||||||
LINTOBJS+= ${SRCS:M*.c:.c=.ln}
|
|
||||||
CLEANFILES+= ${LINTOBJS}
|
|
||||||
|
|
||||||
${LINTLIB}: ${LINTOBJS}
|
|
||||||
@${ECHO} building lint library ${.TARGET}
|
|
||||||
@rm -f ${.TARGET}
|
|
||||||
${LINT} ${LINTLIBFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC}
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.endif # !defined(INTERNALLIB)
|
.endif # !defined(INTERNALLIB)
|
||||||
|
|
||||||
.if defined(_SKIP_BUILD)
|
.if defined(_SKIP_BUILD)
|
||||||
@ -403,10 +391,6 @@ _libinstall:
|
|||||||
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||||
${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/
|
${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/
|
||||||
.endif
|
.endif
|
||||||
.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB)
|
|
||||||
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
|
||||||
${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}/
|
|
||||||
.endif
|
|
||||||
.endif # !defined(INTERNALLIB)
|
.endif # !defined(INTERNALLIB)
|
||||||
|
|
||||||
.if !defined(LIBRARIES_ONLY)
|
.if !defined(LIBRARIES_ONLY)
|
||||||
@ -425,11 +409,6 @@ realinstall: maninstall
|
|||||||
|
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if !target(lint)
|
|
||||||
lint: ${SRCS:M*.c}
|
|
||||||
${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC}
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY)
|
.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY)
|
||||||
.include <bsd.man.mk>
|
.include <bsd.man.mk>
|
||||||
.endif
|
.endif
|
||||||
|
@ -32,8 +32,6 @@
|
|||||||
#
|
#
|
||||||
# LIBEXECDIR Base path for system daemons and utilities. [/usr/libexec]
|
# LIBEXECDIR Base path for system daemons and utilities. [/usr/libexec]
|
||||||
#
|
#
|
||||||
# LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint]
|
|
||||||
#
|
|
||||||
# SHLIBDIR Base path for shared libraries. [${LIBDIR}]
|
# SHLIBDIR Base path for shared libraries. [${LIBDIR}]
|
||||||
#
|
#
|
||||||
# LIBOWN Library owner. [${BINOWN}]
|
# LIBOWN Library owner. [${BINOWN}]
|
||||||
@ -162,7 +160,6 @@ LIBDIR?= ${LIBDIR_BASE}
|
|||||||
LIBCOMPATDIR?= /usr/lib/compat
|
LIBCOMPATDIR?= /usr/lib/compat
|
||||||
LIBDATADIR?= /usr/libdata
|
LIBDATADIR?= /usr/libdata
|
||||||
LIBEXECDIR?= /usr/libexec
|
LIBEXECDIR?= /usr/libexec
|
||||||
LINTLIBDIR?= /usr/libdata/lint
|
|
||||||
SHLIBDIR?= ${LIBDIR}
|
SHLIBDIR?= ${LIBDIR}
|
||||||
LIBOWN?= ${BINOWN}
|
LIBOWN?= ${BINOWN}
|
||||||
LIBGRP?= ${BINGRP}
|
LIBGRP?= ${BINGRP}
|
||||||
|
@ -294,13 +294,6 @@ realinstall: maninstall
|
|||||||
|
|
||||||
.endif # !target(install)
|
.endif # !target(install)
|
||||||
|
|
||||||
.if !target(lint)
|
|
||||||
lint: ${SRCS:M*.c}
|
|
||||||
.if defined(PROG)
|
|
||||||
${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC}
|
|
||||||
.endif
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.if ${MK_MAN} != "no"
|
.if ${MK_MAN} != "no"
|
||||||
.include <bsd.man.mk>
|
.include <bsd.man.mk>
|
||||||
.endif
|
.endif
|
||||||
|
@ -46,7 +46,7 @@ SUBDIR_TARGETS+= \
|
|||||||
all all-man analyze buildconfig buildfiles buildincludes \
|
all all-man analyze buildconfig buildfiles buildincludes \
|
||||||
checkdpadd clean cleandepend cleandir cleanilinks \
|
checkdpadd clean cleandepend cleandir cleanilinks \
|
||||||
cleanobj depend distribute files includes installconfig \
|
cleanobj depend distribute files includes installconfig \
|
||||||
installfiles installincludes print-dir realinstall lint \
|
installfiles installincludes print-dir realinstall \
|
||||||
maninstall manlint ${_obj} objlink tags \
|
maninstall manlint ${_obj} objlink tags \
|
||||||
|
|
||||||
# Described above.
|
# Described above.
|
||||||
|
@ -4,14 +4,6 @@
|
|||||||
cp -f ${.IMPSRC} ${.TARGET}
|
cp -f ${.IMPSRC} ${.TARGET}
|
||||||
chmod a+x ${.TARGET}
|
chmod a+x ${.TARGET}
|
||||||
|
|
||||||
.c.ln:
|
|
||||||
${LINT} ${LINTOBJFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} || \
|
|
||||||
touch ${.TARGET}
|
|
||||||
|
|
||||||
.cc.ln .C.ln .cpp.ln .cxx.ln:
|
|
||||||
${LINT} ${LINTOBJFLAGS} ${CXXFLAGS:M-[DIU]*} ${.IMPSRC} || \
|
|
||||||
touch ${.TARGET}
|
|
||||||
|
|
||||||
.c:
|
.c:
|
||||||
${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
|
${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
|
||||||
${CTFCONVERT_CMD}
|
${CTFCONVERT_CMD}
|
||||||
|
@ -142,7 +142,7 @@ NO_META_IGNORE_HOST_HEADERS= 1
|
|||||||
.if defined(%POSIX)
|
.if defined(%POSIX)
|
||||||
.SUFFIXES: .o .c .y .l .a .sh .f
|
.SUFFIXES: .o .c .y .l .a .sh .f
|
||||||
.else
|
.else
|
||||||
.SUFFIXES: .out .a .ln .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .asm .s .cl .p .h .sh
|
.SUFFIXES: .out .a .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .asm .s .cl .p .h .sh
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
AR ?= ar
|
AR ?= ar
|
||||||
@ -245,13 +245,6 @@ LD ?= ld
|
|||||||
LDFLAGS ?=
|
LDFLAGS ?=
|
||||||
_LDFLAGS = ${LDFLAGS:S/-Wl,//g:N-mabi=*:N-fuse-ld=*}
|
_LDFLAGS = ${LDFLAGS:S/-Wl,//g:N-mabi=*:N-fuse-ld=*}
|
||||||
|
|
||||||
LINT ?= lint
|
|
||||||
LINTFLAGS ?= -cghapbx
|
|
||||||
LINTKERNFLAGS ?= ${LINTFLAGS}
|
|
||||||
LINTOBJFLAGS ?= -cghapbxu -i
|
|
||||||
LINTOBJKERNFLAGS?= ${LINTOBJFLAGS}
|
|
||||||
LINTLIBFLAGS ?= -cghapbxu -C ${LIB}
|
|
||||||
|
|
||||||
MAKE ?= make
|
MAKE ?= make
|
||||||
|
|
||||||
.if !defined(%POSIX)
|
.if !defined(%POSIX)
|
||||||
|
@ -228,7 +228,7 @@ PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \
|
|||||||
beforelinking build build-tools buildfiles buildincludes \
|
beforelinking build build-tools buildfiles buildincludes \
|
||||||
checkdpadd clean cleandepend cleandir cleanobj configure \
|
checkdpadd clean cleandepend cleandir cleanobj configure \
|
||||||
depend distclean distribute exe \
|
depend distclean distribute exe \
|
||||||
html includes install installfiles installincludes lint \
|
html includes install installfiles installincludes \
|
||||||
obj objlink objs objwarn \
|
obj objlink objs objwarn \
|
||||||
realinstall regress \
|
realinstall regress \
|
||||||
tags whereobj
|
tags whereobj
|
||||||
|
@ -153,7 +153,6 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
|||||||
|
|
||||||
OBJS_DEPEND_GUESS+= assym.s vnode_if.h ${BEFORE_DEPEND:M*.h} \
|
OBJS_DEPEND_GUESS+= assym.s vnode_if.h ${BEFORE_DEPEND:M*.h} \
|
||||||
${MFILES:T:S/.m$/.h/}
|
${MFILES:T:S/.m$/.h/}
|
||||||
LNFILES= ${CFILES:T:S/.c$/.ln/}
|
|
||||||
|
|
||||||
.for mfile in ${MFILES}
|
.for mfile in ${MFILES}
|
||||||
# XXX the low quality .m.o rules gnerated by config are normally used
|
# XXX the low quality .m.o rules gnerated by config are normally used
|
||||||
@ -167,15 +166,11 @@ ${mfile:T:S/.m$/.h/}: ${mfile}
|
|||||||
kernel-clean:
|
kernel-clean:
|
||||||
rm -f *.o *.so *.pico *.ko *.s eddep errs \
|
rm -f *.o *.so *.pico *.ko *.s eddep errs \
|
||||||
${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.debug \
|
${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.debug \
|
||||||
linterrs tags vers.c \
|
tags vers.c \
|
||||||
vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \
|
vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \
|
||||||
${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \
|
${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \
|
||||||
${CLEAN}
|
${CLEAN}
|
||||||
|
|
||||||
lint: ${LNFILES}
|
|
||||||
${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC} 2>&1 | \
|
|
||||||
tee -a linterrs
|
|
||||||
|
|
||||||
# This is a hack. BFD "optimizes" away dynamic mode if there are no
|
# This is a hack. BFD "optimizes" away dynamic mode if there are no
|
||||||
# dynamic references. We could probably do a '-Bforcedynamic' mode like
|
# dynamic references. We could probably do a '-Bforcedynamic' mode like
|
||||||
# in the a.out ld. For now, this works.
|
# in the a.out ld. For now, this works.
|
||||||
@ -365,9 +360,6 @@ config.o env.o hints.o vers.o vnode_if.o:
|
|||||||
${NORMAL_C}
|
${NORMAL_C}
|
||||||
${NORMAL_CTFCONVERT}
|
${NORMAL_CTFCONVERT}
|
||||||
|
|
||||||
config.ln env.ln hints.ln vers.ln vnode_if.ln:
|
|
||||||
${NORMAL_LINT}
|
|
||||||
|
|
||||||
.if ${MK_REPRODUCIBLE_BUILD} != "no"
|
.if ${MK_REPRODUCIBLE_BUILD} != "no"
|
||||||
REPRO_FLAG="-r"
|
REPRO_FLAG="-r"
|
||||||
.endif
|
.endif
|
||||||
|
@ -46,7 +46,6 @@ M= ${MACHINE}
|
|||||||
|
|
||||||
AWK?= awk
|
AWK?= awk
|
||||||
CP?= cp
|
CP?= cp
|
||||||
LINT?= lint
|
|
||||||
NM?= nm
|
NM?= nm
|
||||||
OBJCOPY?= objcopy
|
OBJCOPY?= objcopy
|
||||||
SIZE?= size
|
SIZE?= size
|
||||||
@ -121,9 +120,6 @@ CFLAGS+= ${CONF_CFLAGS}
|
|||||||
LDFLAGS+= -Wl,--build-id=sha1
|
LDFLAGS+= -Wl,--build-id=sha1
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
# Optional linting. This can be overridden in /etc/make.conf.
|
|
||||||
LINTFLAGS= ${LINTOBJKERNFLAGS}
|
|
||||||
|
|
||||||
NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC}
|
NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC}
|
||||||
NORMAL_S= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}
|
NORMAL_S= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}
|
||||||
PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC}
|
PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC}
|
||||||
@ -176,8 +172,6 @@ NORMAL_CTFCONVERT=
|
|||||||
NORMAL_CTFCONVERT= @:
|
NORMAL_CTFCONVERT= @:
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC}
|
|
||||||
|
|
||||||
# Linux Kernel Programming Interface C-flags
|
# Linux Kernel Programming Interface C-flags
|
||||||
LINUXKPI_INCLUDES= -I$S/compat/linuxkpi/common/include
|
LINUXKPI_INCLUDES= -I$S/compat/linuxkpi/common/include
|
||||||
LINUXKPI_C= ${NORMAL_C} ${LINUXKPI_INCLUDES}
|
LINUXKPI_C= ${NORMAL_C} ${LINUXKPI_INCLUDES}
|
||||||
|
@ -469,9 +469,6 @@ genassym.o: ${SRCS:Mopt_*.h}
|
|||||||
${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c
|
${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
lint: ${SRCS}
|
|
||||||
${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC:M*.c}
|
|
||||||
|
|
||||||
.if defined(KERNBUILDDIR)
|
.if defined(KERNBUILDDIR)
|
||||||
${OBJS}: opt_global.h
|
${OBJS}: opt_global.h
|
||||||
.endif
|
.endif
|
||||||
|
@ -690,18 +690,11 @@ do_rules(FILE *f)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (ftp->f_depends) {
|
if (ftp->f_depends) {
|
||||||
fprintf(f, "%s%sln: $S/%s%c %s\n",
|
|
||||||
ftp->f_objprefix, tail(np), np, och,
|
|
||||||
ftp->f_depends);
|
|
||||||
fprintf(f, "\t${NORMAL_LINT}\n\n");
|
|
||||||
fprintf(f, "%s%so: $S/%s%c %s\n",
|
fprintf(f, "%s%so: $S/%s%c %s\n",
|
||||||
ftp->f_objprefix, tail(np), np, och,
|
ftp->f_objprefix, tail(np), np, och,
|
||||||
ftp->f_depends);
|
ftp->f_depends);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fprintf(f, "%s%sln: $S/%s%c\n",
|
|
||||||
ftp->f_objprefix, tail(np), np, och);
|
|
||||||
fprintf(f, "\t${NORMAL_LINT}\n\n");
|
|
||||||
fprintf(f, "%s%so: $S/%s%c\n",
|
fprintf(f, "%s%so: $S/%s%c\n",
|
||||||
ftp->f_objprefix, tail(np), np, och);
|
ftp->f_objprefix, tail(np), np, och);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user