From owner-svn-src-head@freebsd.org Tue Sep 22 05:05:54 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABDD3A027B7; Tue, 22 Sep 2015 05:05:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C2891BF1; Tue, 22 Sep 2015 05:05:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8M55sGl041915; Tue, 22 Sep 2015 05:05:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8M55sAJ041914; Tue, 22 Sep 2015 05:05:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509220505.t8M55sAJ041914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 22 Sep 2015 05:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288093 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 05:05:54 -0000 Author: bdrewery Date: Tue Sep 22 05:05:53 2015 New Revision: 288093 URL: https://svnweb.freebsd.org/changeset/base/288093 Log: bsd.lib.mk: Simplify CLEANFILES handling. This limits CLEANFILES removal to just bsd.obj.mk now and removes the need for NOPATH_FILES. This reverts r96529 which was done due to the command line being too long for libc. Since then all architectures now use 256k for ARG_MAX (r170102). Regardless of that, the libc CLEANFILES is only 72k now. Others may be larger but not likely to hit the limit. If needed, we can improve the bsd.obj.mk clean: target to split up the list via bmake features. This also removes some workarounds that are no longer needed. - a.out removal - OBJS.tmp, which has not been needed since r117080. - *.so, which has not been needed since a .so->.So rename in r42450. This also fixes STATICOBJS and SHLIB_LINK not being in the .NOPATH list. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.lib.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Sep 22 04:55:28 2015 (r288092) +++ head/share/mk/bsd.lib.mk Tue Sep 22 05:05:53 2015 (r288093) @@ -162,7 +162,7 @@ LDFLAGS+= -Wl,--version-script=${VERSION .if defined(LIB) && !empty(LIB) || defined(SHLIB_NAME) OBJS+= ${SRCS:N*.h:R:S/$/.o/} -NOPATH_FILES+= ${OBJS} +CLEANFILES+= ${OBJS} ${STATICOBJS} .endif .if defined(LIB) && !empty(LIB) @@ -180,7 +180,7 @@ lib${LIB_PRIVATE}${LIB}.a: ${OBJS} ${STA .if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) _LIBS+= lib${LIB_PRIVATE}${LIB}_p.a POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o=.po} -NOPATH_FILES+= ${POBJS} +CLEANFILES+= ${POBJS} lib${LIB_PRIVATE}${LIB}_p.a: ${POBJS} @${ECHO} building profiled ${LIB} library @@ -192,7 +192,7 @@ lib${LIB_PRIVATE}${LIB}_p.a: ${POBJS} .if defined(SHLIB_NAME) || \ defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) SOBJS+= ${OBJS:.o=.So} -NOPATH_FILES+= ${SOBJS} +CLEANFILES+= ${SOBJS} .endif .if defined(SHLIB_NAME) @@ -238,7 +238,9 @@ ${SHLIB_LINK:R}.ld: ${.CURDIR}/${SHLIB_L ${.ALLSRC} > ${.TARGET} ${SHLIB_NAME_FULL}: ${SHLIB_LINK:R}.ld +CLEANFILES+= ${SHLIB_LINK:R}.ld .endif +CLEANFILES+= ${SHLIB_LINK} .endif ${SHLIB_NAME_FULL}: ${SOBJS} @@ -279,7 +281,7 @@ lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS} LINTLIB= llib-l${LIB}.ln _LIBS+= ${LINTLIB} LINTOBJS+= ${SRCS:M*.c:.c=.ln} -NOPATH_FILES+= ${LINTOBJS} +CLEANFILES+= ${LINTOBJS} ${LINTLIB}: ${LINTOBJS} @${ECHO} building lint library ${.TARGET} @@ -292,7 +294,10 @@ ${LINTLIB}: ${LINTOBJS} .if defined(_SKIP_BUILD) all: .else +.if defined(_LIBS) && !empty(_LIBS) all: ${_LIBS} +CLEANFILES+= ${_LIBS} +.endif .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) all: _manpages @@ -423,49 +428,6 @@ ${_S:R}.So: ${_S} .endif .endif -.if !target(clean) -clean: -.if defined(CLEANFILES) && !empty(CLEANFILES) - rm -f ${CLEANFILES} -.endif -.if defined(LIB) && !empty(LIB) - rm -f a.out ${OBJS} ${OBJS:S/$/.tmp/} ${STATICOBJS} -.endif -.if !defined(INTERNALLIB) -.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) - rm -f ${POBJS} ${POBJS:S/$/.tmp/} -.endif -.if defined(SHLIB_NAME) || \ - defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) - rm -f ${SOBJS} ${SOBJS:.So=.so} ${SOBJS:S/$/.tmp/} -.endif -.if defined(SHLIB_NAME) -.if defined(SHLIB_LINK) -.if defined(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT}) - rm -f lib${LIB}.ld -.endif - rm -f ${SHLIB_LINK} -.endif -.endif # defined(SHLIB_NAME) -.if defined(WANT_LINT) && defined(LIB) && !empty(LIB) - rm -f ${LINTOBJS} -.endif -.endif # !defined(INTERNALLIB) -.if defined(_LIBS) && !empty(_LIBS) - rm -f ${_LIBS} -.endif -.if defined(CLEANDIRS) && !empty(CLEANDIRS) - rm -rf ${CLEANDIRS} -.endif -.if !empty(VERSION_DEF) && !empty(SYMBOL_MAPS) - rm -f ${VERSION_MAP} -.endif -.endif - -.if !empty(_LIBS) -NOPATH_FILES+= ${_LIBS} -.endif - .include .include