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
This commit is contained in:
parent
b177c333d4
commit
49217bc51e
@ -160,6 +160,7 @@ LDFLAGS+= -L${_SHLIBDIRPREFIX}${LIBPRIVATEDIR} -rpath ${LIBPRIVATEDIR}
|
||||
|
||||
.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>
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user