From 403d124c727862f29d0841521e4925d214d04416 Mon Sep 17 00:00:00 2001 From: lukem Date: Sat, 13 Sep 2003 19:08:26 +0000 Subject: [PATCH] implement MKSTATICLIB, which defaults to "yes". if "no" (which NOSTATICLIB also sets, a la the other variables), prevents build and installation of the "normal" static *.a libraries. --- share/mk/bsd.README | 8 ++++++-- share/mk/bsd.lib.mk | 18 +++++++++--------- share/mk/bsd.own.mk | 6 +++--- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/share/mk/bsd.README b/share/mk/bsd.README index 50066531b16b..4370a61a3dce 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.137 2003/09/13 11:16:28 simonb Exp $ +# $NetBSD: bsd.README,v 1.138 2003/09/13 19:08:26 lukem Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the new make "include" files for the BSD @@ -198,7 +198,7 @@ MKPICLIB If "no", don't build *_pic.a libraries, and build the _pic.a library pointing to the .a library. Default: yes -MKPROFILE If "no", don't build or install the profiling libraries. +MKPROFILE If "no", don't build or install the profiling (*_p.a) libraries. Default: yes MKSHARE If "no", act as "MKCATPAGES=no MKDOC=no MKHTML=no MKINFO=no @@ -216,6 +216,10 @@ MKSOFTFLOAT If not "no", build with options to enable the compiler to point and possibly soft-float library support. Default: no +MKSTATICLIB If "no", don't build or install the normal static (*.a) + libraries. + Default: yes + MKUNPRIVED If not "no", don't set the owner/group/mode when installing files or directories, and keep a metadata log of what the owner/group/mode should be. This allows a diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index ad1085e945b3..e91f5d9f5e53 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.233 2003/09/13 03:44:20 erh Exp $ +# $NetBSD: bsd.lib.mk,v 1.234 2003/09/13 19:08:27 lukem Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -300,8 +300,8 @@ FFLAGS+= ${FOPTS} rm -f ${.TARGET}.tmp .if defined(LIB) -.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \ - || ${MKLINKLIB} != "no" +.if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \ + || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no" _LIBS=lib${LIB}.a .else _LIBS= @@ -340,12 +340,12 @@ LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} _LIBS+=llib-l${LIB}.ln .endif -.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \ - || ${MKLINKLIB} != "no" -ALLOBJS=${OBJS} ${POBJS} ${SOBJS} -.else -ALLOBJS=${POBJS} ${SOBJS} +ALLOBJS= +.if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \ + || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no" +ALLOBJS+=${OBJS} .endif +ALLOBJS+=${POBJS} ${SOBJS} .if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS) ALLOBJS+=${LOBJS} .endif @@ -442,7 +442,7 @@ afterdepend: .depend # Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no libinstall:: -.if ${MKLINKLIB} != "no" +.if ${MKLINKLIB} != "no" && ${MKSTATICLIB} != "no" libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index c30fdf7cfef8..42fb2ae8bca5 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.357 2003/09/12 07:44:10 lukem Exp $ +# $NetBSD: bsd.own.mk,v 1.358 2003/09/13 19:08:28 lukem Exp $ .if !defined(_BSD_OWN_MK_) _BSD_OWN_MK_=1 @@ -531,7 +531,7 @@ dependall: .NOTMAIN realdepend .MAKE # regardless of user's mk.conf setting). # .for var in CRYPTO DOC HTML LINKLIB LINT MAN NLS OBJ PIC PICINSTALL PROFILE \ - SHARE + SHARE STATICLIB .if defined(NO${var}) MK${var}:= no .endif @@ -551,7 +551,7 @@ MK${var}:= yes # .for var in BFD CATPAGES CRYPTO DOC GCC GDB HESIOD HTML IEEEFP INFO KERBEROS \ KERBEROS4 LINKLIB LINT MAN NLS OBJ PIC PICINSTALL PICLIB PROFILE \ - SHARE SKEY YP + SHARE STATICLIB SKEY YP MK${var}?= yes .endfor