Date: Tue, 22 Jul 2014 00:42:55 +0000 (UTC) From: "Simon J. Gerraty" <sjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268970 - head/share/mk Message-ID: <201407220042.s6M0gtmC044642@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sjg Date: Tue Jul 22 00:42:55 2014 New Revision: 268970 URL: http://svnweb.freebsd.org/changeset/base/268970 Log: bsd.lib.mk does not add OBJS etc to CLEANFILES so does not automatically get them flagged as .NOPATH. This hurts people who don't use obj dirs. Since its clean target seprate rm's for things, use NOPATH_FILES as list to collect things that need .NOPATH. bsd.obj.mk will add CLEANFILES to NOPATH_FILES and do the deed if needed. Reviewed by: sbruno Modified: head/share/mk/bsd.lib.mk head/share/mk/bsd.obj.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Jul 22 00:33:41 2014 (r268969) +++ head/share/mk/bsd.lib.mk Tue Jul 22 00:42:55 2014 (r268970) @@ -160,6 +160,7 @@ LDFLAGS+= -L${_SHLIBDIRPREFIX}${LIBPRIVA .if defined(LIB) && !empty(LIB) || defined(SHLIB_NAME) OBJS+= ${SRCS:N*.h:R:S/$/.o/} +NOPATH_FILES+= ${OBJS} .endif .if defined(LIB) && !empty(LIB) @@ -181,6 +182,7 @@ lib${LIB}.a: ${OBJS} ${STATICOBJS} .if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) _LIBS+= lib${LIB}_p.a POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o=.po} +NOPATH_FILES+= ${POBJS} lib${LIB}_p.a: ${POBJS} @${ECHO} building profiled ${LIB} library @@ -196,6 +198,7 @@ lib${LIB}_p.a: ${POBJS} .if defined(SHLIB_NAME) || \ defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) SOBJS+= ${OBJS:.o=.So} +NOPATH_FILES+= ${SOBJS} .endif .if defined(SHLIB_NAME) @@ -254,6 +257,7 @@ lib${LIB}_pic.a: ${SOBJS} LINTLIB= llib-l${LIB}.ln _LIBS+= ${LINTLIB} LINTOBJS+= ${SRCS:M*.c:.c=.ln} +NOPATH_FILES+= ${LINTOBJS} ${LINTLIB}: ${LINTOBJS} @${ECHO} building lint library ${.TARGET} @@ -454,6 +458,10 @@ clean: .endif .endif +.if !empty(_LIBS) +NOPATH_FILES+= ${_LIBS} +.endif + .include <bsd.obj.mk> .include <bsd.sys.mk> Modified: head/share/mk/bsd.obj.mk ============================================================================== --- head/share/mk/bsd.obj.mk Tue Jul 22 00:33:41 2014 (r268969) +++ head/share/mk/bsd.obj.mk Tue Jul 22 00:42:55 2014 (r268970) @@ -119,8 +119,9 @@ cleanobj: clean cleandepend @if [ -L ${.CURDIR}/obj ]; then rm -f ${.CURDIR}/obj; fi # Tell bmake not to look for generated files via .PATH -.if !empty(CLEANFILES) -.NOPATH: ${CLEANFILES} +NOPATH_FILES+= ${CLEANFILES} +.if !empty(NOPATH_FILES) +.NOPATH: ${NOPATH_FILES} .endif .if !target(clean)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407220042.s6M0gtmC044642>