Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/share/mk/bsd.prog.mk,v retrieving revision 1.224 retrieving revision 1.225 diff -u -p -r1.224 -r1.225 --- src/share/mk/bsd.prog.mk 2007/11/13 13:57:53 1.224 +++ src/share/mk/bsd.prog.mk 2007/12/26 22:52:10 1.225 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prog.mk,v 1.224 2007/11/13 13:57:53 jmmv Exp $ +# $NetBSD: bsd.prog.mk,v 1.225 2007/12/26 22:52:10 jmmv Exp $ # @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94 .ifndef HOSTPROG @@ -377,6 +377,13 @@ lint-${_P}: ${LOBJS.${_P}} .endfor # _P in ${PROGS} ${PROGS_CXX} # } +.if defined(OBJS) && !empty(OBJS) && \ + (empty(PROGS) && empty(PROGS_CXX)) +cleanobjs: cleanobjs-plain +cleanobjs-plain: + rm -f ${OBJS} ${LOBJS} +.endif + .if !target(proginstall) proginstall:: ${_PROG_INSTALL} .endif