Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/mk Provide the MKPICLIB value in bsd.own.mk, rather th...



details:   https://anonhg.NetBSD.org/src/rev/7941998934a5
branches:  trunk
changeset: 545611:7941998934a5
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Apr 11 22:40:31 2003 +0000

description:
Provide the MKPICLIB value in bsd.own.mk, rather than bsd.lib.mk.  It
is sometimes necessary for non-library Makefiles to determine if _pic
libraries are being built.

Problem pointed out by Havard Eidnes.

diffstat:

 share/mk/bsd.README |   9 ++++++++-
 share/mk/bsd.lib.mk |  15 +--------------
 share/mk/bsd.own.mk |  20 ++++++++++++++++++--
 3 files changed, 27 insertions(+), 17 deletions(-)

diffs (113 lines):

diff -r 8e8e14cfa420 -r 7941998934a5 share/mk/bsd.README
--- a/share/mk/bsd.README       Fri Apr 11 22:02:28 2003 +0000
+++ b/share/mk/bsd.README       Fri Apr 11 22:40:31 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.README,v 1.110 2003/01/24 02:06:37 thorpej Exp $
+#      $NetBSD: bsd.README,v 1.111 2003/04/11 22:40:31 thorpej Exp $
 #      @(#)bsd.README  8.2 (Berkeley) 4/2/94
 
 This is the README file for the new make "include" files for the BSD
@@ -291,6 +291,13 @@
 process (default values are in brackets along with comments, if set by
 bsd.own.mk):
 
+MKPICLIB       bsd.own.mk provides a default for this variable, which is
+               used by bsd.lib.mk.  The default value is provided by
+               bsd.own.mk since non-library Makefiles may need to check
+               its value in order to generate proper dependencies against
+               libraries used only during the build process (which would
+               not be installed into the destination directory).
+
 MKCRYPTO       If set to "no", no cryptography support will be built
                into the system.  Defaults to "yes".
 
diff -r 8e8e14cfa420 -r 7941998934a5 share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk       Fri Apr 11 22:02:28 2003 +0000
+++ b/share/mk/bsd.lib.mk       Fri Apr 11 22:40:31 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.lib.mk,v 1.213 2003/03/30 00:35:07 thorpej Exp $
+#      $NetBSD: bsd.lib.mk,v 1.214 2003/04/11 22:40:31 thorpej Exp $
 #      @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94
 
 .include <bsd.init.mk>
@@ -103,17 +103,6 @@
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
 APICFLAGS ?=
 
-.elif ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
-
-# On MIPS, all libs are compiled with ABIcalls (and are thus PIC),
-# not just sharedlibs.
-MKPICLIB= no
-
-.elif ${MACHINE_ARCH} == "vax" && ${OBJECT_FMT} == "ELF"
-
-# On the VAX, all object are PIC by default, not just sharedlibs.
-MKPICLIB= no
-
 .elif (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64") && \
        ${OBJECT_FMT} == "ELF"
 
@@ -149,8 +138,6 @@
 
 .endif
 
-MKPICLIB?= yes
-
 .if ${MKPICLIB} != "no"
 CSHLIBFLAGS+= ${CPICFLAGS}
 .endif
diff -r 8e8e14cfa420 -r 7941998934a5 share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk       Fri Apr 11 22:02:28 2003 +0000
+++ b/share/mk/bsd.own.mk       Fri Apr 11 22:40:31 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.own.mk,v 1.326 2003/03/25 23:35:48 pooka Exp $
+#      $NetBSD: bsd.own.mk,v 1.327 2003/04/11 22:40:31 thorpej Exp $
 
 .if !defined(_BSD_OWN_MK_)
 _BSD_OWN_MK_=1
@@ -370,12 +370,24 @@
 NOPROFILE=     # defined
 .endif
 
+# On the MIPS, all libs are compiled with ABIcalls (and are thus PIC),
+# not just shared libraries, so don't build the _pic version.
+.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
+MKPICLIB:=     no
+.endif
+
 # If the ns32k port is using an external toolchain, shared libraries
 # are not yet supported.
 .if ${MACHINE_ARCH} == "ns32k" && defined(EXTERNAL_TOOLCHAIN)
 NOPIC=         # defined
 .endif
 
+# On VAX using ELF, all objects are PIC, not just shared libraries,
+# so don't build the _pic version.
+.if ${MACHINE_ARCH} == "vax" && ${OBJECT_FMT} == "ELF"
+MKPICLIB:=     no
+.endif
+
 # Location of the file that contains the major and minor numbers of the
 # version of a shared library.  If this file exists a shared library
 # will be built by <bsd.lib.mk>.
@@ -457,7 +469,7 @@
 
 # MK* options which default to "yes".
 .for var in BFD CATPAGES CRYPTO DOC GCC GDB HESIOD IEEEFP INFO KERBEROS \
-       LINKLIB LINT MAN NLS OBJ PIC PICINSTALL PROFILE SHARE SKEY YP
+       LINKLIB LINT MAN NLS OBJ PIC PICINSTALL PICLIB PROFILE SHARE SKEY YP
 MK${var}?=     yes
 .endfor
 
@@ -476,6 +488,10 @@
 MKPROFILE:=    no
 .endif
 
+.if ${MKPIC} == "no"
+MKPICLIB:=     no
+.endif
+
 .if ${MKMAN} == "no"
 MKCATPAGES:=   no
 .endif



Home | Main Index | Thread Index | Old Index