From 6b2da37d700ac979e2a4dc4413082e5a879be9b6 Mon Sep 17 00:00:00 2001 From: christos Date: Fri, 5 Apr 2024 01:15:59 +0000 Subject: [PATCH] - Create 3 new variables: MAKELINKLIB that follows MKLINKLIB but can be overwritten by Makefiles MAKESTATICLIB that follows MKSTATICLIB but can be overwritten by Makefiles LINKINSTALL that follows MAKELINKLIB but can be overwritten by Makefiles These give enough control to the module Makefiles so that they don't need to override the default library install rules which break the debug sets. - Remove /usr/libexec/named which duplicated /usr/lib/named --- distrib/sets/lists/base/mi | 5 +-- distrib/sets/lists/base/shl.mi | 4 +-- distrib/sets/lists/debug/shl.mi | 27 ++++++++++++-- etc/mtree/NetBSD.dist.base | 4 +-- etc/mtree/NetBSD.dist.compat.in | 3 +- external/mpl/bind/Makefile | 4 +-- external/mpl/bind/lib/libns/Makefile | 4 +-- external/mpl/bind/lib/plugins/Makefile | 17 ++------- external/mpl/bind/libexec/Makefile | 5 --- .../mpl/bind/libexec/filter-aaaa/Makefile | 6 ---- external/mpl/bind/libexec/plugin.mk | 36 ------------------- lib/libpam/Makefile.inc | 6 ++-- lib/libpam/libpam/Makefile | 7 ++-- lib/libpam/modules/mod.mk | 24 ++++--------- lib/npf/mod.mk | 4 +-- share/mk/bsd.README | 9 ++++- share/mk/bsd.lib.mk | 23 +++++++----- 17 files changed, 78 insertions(+), 110 deletions(-) delete mode 100644 external/mpl/bind/libexec/Makefile delete mode 100644 external/mpl/bind/libexec/filter-aaaa/Makefile delete mode 100644 external/mpl/bind/libexec/plugin.mk diff --git a/distrib/sets/lists/base/mi b/distrib/sets/lists/base/mi index a62bfa3f3a9f..b3f0a4e41377 100644 --- a/distrib/sets/lists/base/mi +++ b/distrib/sets/lists/base/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1338 2024/03/30 16:47:55 thorpej Exp $ +# $NetBSD: mi,v 1.1339 2024/04/05 01:15:59 christos Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -1267,6 +1267,7 @@ ./usr/libdata/debug/usr/lib/i18n base-i18n-root compatfile ./usr/libdata/debug/usr/lib/named base-sys-usr ./usr/libdata/debug/usr/lib/npf base-obsolete obsolete +./usr/libdata/debug/usr/lib/security base-sys-usr compatfile ./usr/libdata/debug/usr/libexec base-sys-usr ./usr/libdata/debug/usr/libexec/ching base-sys-usr ./usr/libdata/debug/usr/libexec/lpr base-sys-usr @@ -1321,7 +1322,7 @@ ./usr/libexec/mail.local base-mail-bin ./usr/libexec/makekey base-crypto-bin ./usr/libexec/makewhatis base-man-bin !makemandb -./usr/libexec/named base-bind-bin +./usr/libexec/named base-obsolete obsolete ./usr/libexec/named-xfer base-obsolete obsolete ./usr/libexec/ntalkd base-netutil-bin ./usr/libexec/pfspamd base-obsolete obsolete diff --git a/distrib/sets/lists/base/shl.mi b/distrib/sets/lists/base/shl.mi index e67c4b0063a1..60f6986dd3cc 100644 --- a/distrib/sets/lists/base/shl.mi +++ b/distrib/sets/lists/base/shl.mi @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.976 2024/02/21 22:53:47 christos Exp $ +# $NetBSD: shl.mi,v 1.977 2024/04/05 01:15:59 christos Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -1002,4 +1002,4 @@ ./usr/lib/security/pam_u2f.so.4 base-sys-shlib compatfile,pam ./usr/lib/security/pam_unix.so.4 base-sys-shlib compatfile,pam ./usr/libexec/ld.elf_so base-sys-shlib dynamicroot -./usr/libexec/named/filter-aaaa.so base-bind-bin +./usr/libexec/named/filter-aaaa.so base-obsolete obsoleteind-bin diff --git a/distrib/sets/lists/debug/shl.mi b/distrib/sets/lists/debug/shl.mi index 43583b282b1f..c50807849f6b 100644 --- a/distrib/sets/lists/debug/shl.mi +++ b/distrib/sets/lists/debug/shl.mi @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.338 2024/02/21 22:53:47 christos Exp $ +# $NetBSD: shl.mi,v 1.339 2024/04/05 01:15:59 christos Exp $ ./usr/lib/libbfd_g.a comp-c-debuglib debuglib,compatfile,binutils ./usr/lib/libgcc_eh_g.a comp-c-debuglib debuglib,compatfile,gcc ./usr/lib/libgcc_s_g.a comp-c-debuglib debuglib,compatfile,gcc @@ -314,13 +314,36 @@ ./usr/libdata/debug/usr/lib/libzfs.so.0.0.debug comp-zfs-debug debug,compatfile,zfs ./usr/libdata/debug/usr/lib/libzfs_core.so.0.0.debug comp-zfs-debug debug,compatfile,zfs ./usr/libdata/debug/usr/lib/libzpool.so.0.0.debug comp-zfs-debug debug,compatfile,zfs -#./usr/libdata/debug/usr/lib/named/filter-aaaa.so.0.debug comp-sys-debug debug,compatfile +./usr/libdata/debug/usr/lib/named/filter-aaaa.so.0.debug base-sys-debug debug ./usr/libdata/debug/usr/lib/npf/ext_log.so.0.0.debug comp-obsolete debug,compatfile,npf,obsolete ./usr/libdata/debug/usr/lib/npf/ext_normalise.so.0.0.debug comp-obsolete debug,compatfile,npf,obsolete ./usr/libdata/debug/usr/lib/npf/ext_rndblock.so.0.0.debug comp-obsolete debug,compatfile,npf,obsolete ./usr/libdata/debug/usr/lib/npf/libext_log.so.0.0.debug comp-obsolete debug,compatfile,npf,obsolete ./usr/libdata/debug/usr/lib/npf/libext_normalise.so.0.0.debug comp-obsolete debug,compatfile,npf,obsolete ./usr/libdata/debug/usr/lib/npf/libext_rndblock.so.0.0.debug comp-obsolete debug,compatfile,npf,obsolete +./usr/libdata/debug/usr/lib/security/pam_afslog.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_chroot.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_deny.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_echo.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_exec.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_ftpusers.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_group.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_guest.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_krb5.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_ksu.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_lastlog.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_login_access.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_nologin.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_permit.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_radius.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_rhosts.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_rootok.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_securetty.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_self.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_skey.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_ssh.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_u2f.so.4.debug base-sys-debug debug,compatfile,pam +./usr/libdata/debug/usr/lib/security/pam_unix.so.4.debug base-sys-debug debug,compatfile,pam ./usr/libdata/debug/usr/libexec/ld.elf_so.debug comp-sys-debug debug,dynamicroot ./usr/libdata/debug/usr/libexec/liblto_plugin.so.0.1.debug comp-sys-debug debug,gcc ./usr/libdata/debug/usr/tests/lib/csu/h_initfini3_dso.so.1.debug tests-lib-debug debug,compattestfile,atf diff --git a/etc/mtree/NetBSD.dist.base b/etc/mtree/NetBSD.dist.base index fac6fec2a119..2e4ca4e4aeaf 100644 --- a/etc/mtree/NetBSD.dist.base +++ b/etc/mtree/NetBSD.dist.base @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.256 2024/03/30 06:11:58 thorpej Exp $ +# $NetBSD: NetBSD.dist.base,v 1.257 2024/04/05 01:15:59 christos Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -375,6 +375,7 @@ ./usr/libdata/debug/usr/lib ./usr/libdata/debug/usr/lib/i18n ./usr/libdata/debug/usr/lib/named +./usr/libdata/debug/usr/lib/security ./usr/libdata/debug/usr/libexec ./usr/libdata/debug/usr/libexec/ching ./usr/libdata/debug/usr/libexec/lpr @@ -390,7 +391,6 @@ ./usr/libexec ./usr/libexec/ching ./usr/libexec/lpr -./usr/libexec/named ./usr/libexec/postfix ./usr/mdec ./usr/pkg ignore optional diff --git a/etc/mtree/NetBSD.dist.compat.in b/etc/mtree/NetBSD.dist.compat.in index 3e2df185a481..ca100118f2ce 100644 --- a/etc/mtree/NetBSD.dist.compat.in +++ b/etc/mtree/NetBSD.dist.compat.in @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.compat.in,v 1.6 2023/05/26 22:26:11 riastradh Exp $ +# $NetBSD: NetBSD.dist.compat.in,v 1.7 2024/04/05 01:15:59 christos Exp $ ./lib/@ARCH_SUBDIR@ ./lib/@ARCH_SUBDIR@/npf @@ -14,3 +14,4 @@ ./usr/libdata/debug/lib/@ARCH_SUBDIR@/npf ./usr/libdata/debug/usr/lib/@ARCH_SUBDIR@ ./usr/libdata/debug/usr/lib/@ARCH_SUBDIR@/i18n +./usr/libdata/debug/usr/lib/@ARCH_SUBDIR@/security diff --git a/external/mpl/bind/Makefile b/external/mpl/bind/Makefile index 882c65428cc5..f792db433034 100644 --- a/external/mpl/bind/Makefile +++ b/external/mpl/bind/Makefile @@ -1,5 +1,5 @@ -# $NetBSD: Makefile,v 1.2 2021/03/31 04:37:50 christos Exp $ +# $NetBSD: Makefile,v 1.3 2024/04/05 01:16:00 christos Exp $ -SUBDIR+= lib .WAIT libexec bin +SUBDIR+= lib .WAIT bin .include diff --git a/external/mpl/bind/lib/libns/Makefile b/external/mpl/bind/lib/libns/Makefile index 3090e8c380dc..bd84934484f3 100644 --- a/external/mpl/bind/lib/libns/Makefile +++ b/external/mpl/bind/lib/libns/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2024/02/21 22:52:54 christos Exp $ +# $NetBSD: Makefile,v 1.7 2024/04/05 01:16:00 christos Exp $ NOLINT=yes # XXX LIB=ns @@ -12,7 +12,7 @@ DIST= ${IDIST}/lib/ns .PATH.c: ${DIST} CPPFLAGS+= -I${BIND_SRCDIR}/include/ns -I${DIST} -CPPFLAGS+= -DNAMED_PLUGINDIR=\"/usr/libexec/named\" +CPPFLAGS+= -DNAMED_PLUGINDIR=\"/usr/lib/named\" CWARNFLAGS.clang+= -Wno-tautological-constant-out-of-range-compare diff --git a/external/mpl/bind/lib/plugins/Makefile b/external/mpl/bind/lib/plugins/Makefile index 0ffb5a15a819..c976cfe97a03 100644 --- a/external/mpl/bind/lib/plugins/Makefile +++ b/external/mpl/bind/lib/plugins/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.4 2022/03/11 16:24:22 christos Exp $ +# $NetBSD: Makefile,v 1.5 2024/04/05 01:16:01 christos Exp $ -LIBISMODULE:= yes +LIBISMODULE= yes +MAKELINKLIB= no LIB= filter-aaaa .include @@ -13,16 +14,4 @@ DIST=${IDIST}/bin/plugins .PATH: ${DIST} -.if !defined(MLIBDIR) && ${MKPIC} != "no" -.PRECIOUS: ${DESTDIR}${LIBDIR}/${LIB}.so.${SHLIB_MAJOR} -libinstall:: ${DESTDIR}${LIBDIR}/${LIB}.so.${SHLIB_MAJOR} -.else -libinstall:: -.endif - .include - -${DESTDIR}${LIBDIR}/${LIB}.so.${SHLIB_MAJOR}: ${LIB}.so.${SHLIB_FULLVERSION} - ${_MKTARGET_INSTALL} - ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${.ALLSRC} ${.TARGET} diff --git a/external/mpl/bind/libexec/Makefile b/external/mpl/bind/libexec/Makefile deleted file mode 100644 index d89fb58eddd1..000000000000 --- a/external/mpl/bind/libexec/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2021/03/31 04:37:50 christos Exp $ - -SUBDIR+= filter-aaaa - -.include diff --git a/external/mpl/bind/libexec/filter-aaaa/Makefile b/external/mpl/bind/libexec/filter-aaaa/Makefile deleted file mode 100644 index ff879a0c3736..000000000000 --- a/external/mpl/bind/libexec/filter-aaaa/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2021/03/31 04:37:50 christos Exp $ - -LIB= filter-aaaa -SRCS= filter-aaaa.c - -.include "${.CURDIR}/../plugin.mk" diff --git a/external/mpl/bind/libexec/plugin.mk b/external/mpl/bind/libexec/plugin.mk deleted file mode 100644 index 4ac7a24d870a..000000000000 --- a/external/mpl/bind/libexec/plugin.mk +++ /dev/null @@ -1,36 +0,0 @@ -# $NetBSD: plugin.mk,v 1.1 2021/03/31 04:37:50 christos Exp $ -# -# Based on src/lib/libpam/modules/mod.mk -# NetBSD: mod.mk,v 1.17 2020/05/23 00:43:33 rin Exp - -.include "${.CURDIR}/../../Makefile.inc" - -DIST= ${IDIST}/bin/plugins -.PATH.c: ${DIST} - -LIBDIR= /usr/libexec/named - -NOLINT= # don't build a lint library -NOPROFILE= # don't build a profile library -NOPICINSTALL= # don't install _pic.a library - -# Define the shared library version here, we need these variables early for -# plugin install rules. -SHLIB_MAJOR= 0 -SHLIB_MINOR= 0 - -.include - -.if ${MKPIC} != "no" -.PRECIOUS: ${DESTDIR}${LIBDIR}/${LIB}.so -libinstall:: ${DESTDIR}${LIBDIR}/${LIB}.so -.else -libinstall:: -.endif - -.include - -${DESTDIR}${LIBDIR}/${LIB}.so: lib${LIB}.so.${SHLIB_FULLVERSION} - ${_MKTARGET_INSTALL} - ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${.ALLSRC} ${.TARGET} diff --git a/lib/libpam/Makefile.inc b/lib/libpam/Makefile.inc index 8d3de2fea571..baaeb8abe994 100644 --- a/lib/libpam/Makefile.inc +++ b/lib/libpam/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.20 2020/05/23 00:43:33 rin Exp $ +# $NetBSD: Makefile.inc,v 1.21 2024/04/05 01:16:00 christos Exp $ # Copyright 1998 Juniper Networks, Inc. # All rights reserved. # @@ -50,8 +50,10 @@ CSHLIBFLAGS+= -UOPENPAM_STATIC_MODULES # Define the shared library version here. libpam and the modules share a # version, and we need these variables early for module install rules. +# Modules only have a major, the library also has a minor defined +# in the library Makefile SHLIB_MAJOR= 4 -SHLIB_MINOR= 1 +#SHLIB_MINOR= 1 # openpam requires the files to be owned by root BINOWN= root diff --git a/lib/libpam/libpam/Makefile b/lib/libpam/libpam/Makefile index 1b0ce790cee0..b930fe6de2ea 100644 --- a/lib/libpam/libpam/Makefile +++ b/lib/libpam/libpam/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.31 2023/06/03 09:09:10 lukem Exp $ +# $NetBSD: Makefile,v 1.32 2024/04/05 01:16:00 christos Exp $ #- # Copyright (c) 1998 Juniper Networks, Inc. # All rights reserved. @@ -48,9 +48,10 @@ NOPROFILE= # Don't build a profiling library MKPICLIB=yes .endif +SHLIB_MINOR= 1 + DIST= ${NETBSDSRCDIR}/external/bsd/openpam/dist LIB= pam -NOPROFILE= WARNS= 6 LINTFLAGS+= -w @@ -202,7 +203,7 @@ PAM_DIR=${.CURDIR} .endif .for MOD in ${STATIC_MODULES} MODOBJDIR!= cd ${PAM_DIR}/${MODULE_DIR}/${MOD} && ${PRINTOBJDIR} -STATIC_MODULE_LIBS:= ${STATIC_MODULE_LIBS} ${MODOBJDIR}/lib${MOD}.a +STATIC_MODULE_LIBS:= ${STATIC_MODULE_LIBS} ${MODOBJDIR}/${MOD}.a .endfor # XXX Using ${.ALLSRC} in the ld command causes openpam_static.c to be diff --git a/lib/libpam/modules/mod.mk b/lib/libpam/modules/mod.mk index 18aa6b45c679..0fcc72c59715 100644 --- a/lib/libpam/modules/mod.mk +++ b/lib/libpam/modules/mod.mk @@ -1,8 +1,10 @@ -# $NetBSD: mod.mk,v 1.17 2020/05/23 00:43:33 rin Exp $ +# $NetBSD: mod.mk,v 1.18 2024/04/05 01:16:00 christos Exp $ -NOLINT= # don't build a lint library -NOPROFILE= # don't build a profile library -NOPICINSTALL= # don't install _pic.a library +WARNS=6 +LIBISMODULE=yes +MAKESTATICLIB=yes +MAKELINKLIB=yes +LINKINSTALL=no .include @@ -13,19 +15,5 @@ LIBDIR=/usr/lib/${MLIBDIR}/security .else LIBDIR=/usr/lib/security .endif -WARNS=6 - -.if ${MKPIC} != "no" -LIBDPLIBS+= pam ${NETBSDSRCDIR}/lib/libpam/libpam -.PRECIOUS: ${DESTDIR}${LIBDIR}/${LIB}.so.${SHLIB_MAJOR} -libinstall:: ${DESTDIR}${LIBDIR}/${LIB}.so.${SHLIB_MAJOR} -.else -libinstall:: -.endif .include - -${DESTDIR}${LIBDIR}/${LIB}.so.${SHLIB_MAJOR}: lib${LIB}.so.${SHLIB_FULLVERSION} - ${_MKTARGET_INSTALL} - ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${.ALLSRC} ${.TARGET} diff --git a/lib/npf/mod.mk b/lib/npf/mod.mk index df34a81f47b8..2777849ba104 100644 --- a/lib/npf/mod.mk +++ b/lib/npf/mod.mk @@ -1,4 +1,4 @@ -# $NetBSD: mod.mk,v 1.8 2019/08/24 13:20:52 rmind Exp $ +# $NetBSD: mod.mk,v 1.9 2024/04/05 01:16:00 christos Exp $ .include @@ -9,9 +9,7 @@ USE_SHLIBDIR= yes LIBISMODULE= yes LIBROOTDIR= /lib -#.if exists(${.CURDIR}/../../Makefile.inc) .include "${.CURDIR}/../../Makefile.inc" -#.endif .if defined(MLIBDIR) LIBDIR= ${LIBROOTDIR}/${MLIBDIR}/npf diff --git a/share/mk/bsd.README b/share/mk/bsd.README index 0c21fc044aeb..4ff9d69289c1 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.446 2024/03/23 21:56:47 riastradh Exp $ +# $NetBSD: bsd.README,v 1.447 2024/04/05 01:16:00 christos Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make "include" files for the NetBSD @@ -328,6 +328,10 @@ MANINSTALL Manual installation type. Space separated list: catinstall, htmlinstall, maninstall Default value derived from MKCATPAGES and MKHTML. +MAKELINKLIB Defaults to ${MKLINKLIB} but can be overriden by Makefiles + +MAKESTATICLIB Defaults to ${MKSTATICLIB} but can be overriden by Makefiles + LDSTATIC Control program linking; if set blank, link everything dynamically. If set to "-static", link everything statically. If not set, programs link according to their makefile. @@ -342,6 +346,9 @@ LIBOWN Library owner. [${BINOWN}] LIBMODE Library mode. [${NONBINMODE}] +LINKINSTALL Install libraries used by users to link against (.a/.so) + defaults to ${MAKELINKLIB} + DOCDIR Base path for system documentation (e.g. PSD, USD, etc.) installation. [/usr/share/doc] diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index a61cf69be7b6..722fb78f1b46 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.399 2024/04/02 16:18:23 christos Exp $ +# $NetBSD: bsd.lib.mk,v 1.400 2024/04/05 01:16:00 christos Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -16,9 +16,10 @@ LIBISCXX?= no .if ${LIBISMODULE} != "no" _LIB_PREFIX?= # empty MKDEBUGLIB:= no -MKPICINSTALL:= no MKPROFILE:= no -MKSTATICLIB:= no +MKPICINSTALL:= no +MAKESTATICLIB?= no +MAKELINKLIB?= yes _LINTINSTALL?= no .else _LIB_PREFIX?= lib @@ -26,17 +27,21 @@ _LIB_PREFIX?= lib .if ${LIBISPRIVATE} != "no" MKDEBUGLIB:= no +MKPROFILE:= no MKPICINSTALL:= no . if defined(NOSTATICLIB) && ${MKPICLIB} != "no" -MKSTATICLIB:= no +MAKESTATICLIB?= no . elif ${LIBISPRIVATE} != "pic" MKPIC:= no . endif -MKPROFILE:= no +MAKELINKLIB?= no _LINTINSTALL?= no .endif _LINTINSTALL?= ${MKLINT} +LINKINSTALL?= ${MAKELINKLIB} +MAKELINKLIB?= ${MKLINKLIB} +MAKESTATICLIB?= ${MKSTATICLIB} ##### Basic targets .PHONY: checkver libinstall @@ -422,7 +427,7 @@ _DEST.ODEBUG:=${DESTDIR}${DEBUGDIR}${_LIBSODIR} .if defined(LIB) # { .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \ - || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no" + || ${MAKELINKLIB} != "no") && ${MAKESTATICLIB} != "no" _LIBS=${_LIB.a} .else _LIBS= @@ -478,7 +483,7 @@ _LIBS+=${_LIB.ln} ALLOBJS= .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \ - || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no" + || ${MAKELINKLIB} != "no") && ${MAKESTATICLIB} != "no" ALLOBJS+=${STOBJS} .endif ALLOBJS+=${POBJS} ${SOBJS} @@ -731,7 +736,7 @@ LIBCLEANFILES5+= ${_LIB.ln} ${LOBJS} # Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no libinstall:: -.if ${MKLINKLIB} != "no" && ${MKSTATICLIB} != "no" +.if ${MAKELINKLIB} != "no" && ${MAKESTATICLIB} != "no" && ${LINKINSTALL} != "no" libinstall:: ${_DEST.LIB}/${_LIB.a} .PRECIOUS: ${_DEST.LIB}/${_LIB.a} @@ -838,7 +843,7 @@ ${_DEST.OBJ}/${_LIB.so.full}: ${_LIB.so.full} ${_DEST.LIB}/${_LIB.so.major} .endif .endif -.if ${MKLINKLIB} != "no" +.if ${MAKELINKLIB} != "no" && ${LINKINSTALL} != "no" ${INSTALL_SYMLINK} ${_LIB.so.full} ${_DEST.OBJ}/${_LIB.so} .if ${_LIBSODIR} != ${LIBDIR} ${INSTALL_SYMLINK} -l r ${_DEST.OBJ}/${_LIB.so.full} \