From 1dae72c930f68af111a156fc39ff878d18b2a619 Mon Sep 17 00:00:00 2001 From: brooks Date: Fri, 15 Mar 2013 20:34:10 +0000 Subject: [PATCH] MFC r245561,245885: Add a new LIBRARIES_ONLY make variable to disable the build and install of files other than the actual libraries. Use LIBRARIES_ONLY to supress the inclusion of files in the lib32 distribution that are duplicates of files in base. Sponsored by: DARPA, AFRL Reviewed by: emaste git-svn-id: svn://svn.freebsd.org/base/stable/9@248350 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- Makefile.inc1 | 1 + cddl/lib/libdtrace/Makefile | 2 +- share/mk/bsd.README | 2 ++ share/mk/bsd.lib.mk | 7 +++++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index b535174bd..10a626169 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -330,6 +330,7 @@ LIB32WMAKEFLAGS+= \ CXX="${CXX} ${LIB32FLAGS}" \ DESTDIR=${LIB32TMP} \ -DCOMPAT_32BIT \ + -DLIBRARIES_ONLY \ -DNO_CPU_CFLAGS \ -DNO_CTF \ -DNO_LINT diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index 2db3709ce..72f020145 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -95,7 +95,7 @@ dt_names.c: beforedepend: dt_errtags.c dt_names.c beforeinstall: -.if exists(${DESTDIR}/usr/lib/dtrace) +.if !defined(LIBRARIES_ONLY) && exists(${DESTDIR}/usr/lib/dtrace) .for file in ${DSRCS} ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} ${.CURDIR}/${file} ${DESTDIR}/usr/lib/dtrace .endfor diff --git a/share/mk/bsd.README b/share/mk/bsd.README index e91a2313c..83f416bf6 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -356,6 +356,8 @@ SHLIB_LDSCRIPT Template file to generate shared library linker script. Unless used, a simple symlink is created to the real shared object. +LIBRARIES_ONLY Do not build or install files other than the library. + The include file includes the file named "../Makefile.inc" if it exists, as well as the include file . diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index efaf9dcae..916010f33 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -313,12 +313,15 @@ _libinstall: .endif .endif # !defined(INTERNALLIB) +.if !defined(LIBRARIES_ONLY) .include .include .include +.endif + .include -.if ${MK_MAN} != "no" +.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) realinstall: _maninstall .ORDER: beforeinstall _maninstall .endif @@ -330,7 +333,7 @@ lint: ${SRCS:M*.c} ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} .endif -.if ${MK_MAN} != "no" +.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) .include .endif -- 2.45.0