From 2434ed6f8586356e8496666855b598a968bb578f Mon Sep 17 00:00:00 2001 From: brooks Date: Thu, 17 Jan 2013 17:27:10 +0000 Subject: 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 --- Makefile.inc1 | 1 + cddl/lib/libdtrace/Makefile | 2 +- share/mk/bsd.README | 2 ++ share/mk/bsd.lib.mk | 5 ++++- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 5e9b9b1..63f74ce 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -336,6 +336,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 3a79e87..17f0be6 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -103,7 +103,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 f09142e..a9adc1f 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 1335964..e39c7a5 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -331,9 +331,12 @@ _libinstall: .endif .endif # !defined(INTERNALLIB) +.if !defined(LIBRARIES_ONLY) .include .include .include +.endif + .include .if ${MK_MAN} != "no" @@ -348,7 +351,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 -- cgit v1.1