pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Get rid of all occurrences of cpp-like tests for ${...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3be871e997cc
branches:  trunk
changeset: 470780:3be871e997cc
user:      agc <agc%pkgsrc.org@localhost>
date:      Thu Mar 11 22:57:22 2004 +0000

description:
Get rid of all occurrences of cpp-like tests for ${OPSYS} in
bsd.pkg.mk, and use the abstracted means of determining generic shared
lib type per operating system.

diffstat:

 mk/bsd.pkg.mk      |  12 ++++--------
 mk/defs.AIX.mk     |   3 ++-
 mk/defs.BSDOS.mk   |   3 ++-
 mk/defs.Darwin.mk  |   3 ++-
 mk/defs.FreeBSD.mk |   3 ++-
 mk/defs.IRIX.mk    |   3 ++-
 mk/defs.Interix.mk |   3 ++-
 mk/defs.Linux.mk   |   3 ++-
 mk/defs.NetBSD.mk  |   3 ++-
 mk/defs.OpenBSD.mk |   3 ++-
 mk/defs.SunOS.mk   |   3 ++-
 11 files changed, 24 insertions(+), 18 deletions(-)

diffs (203 lines):

diff -r 599e0dbb11b9 -r 3be871e997cc mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Thu Mar 11 22:35:45 2004 +0000
+++ b/mk/bsd.pkg.mk     Thu Mar 11 22:57:22 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1419 2004/03/11 21:19:00 tv Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1420 2004/03/11 22:57:22 agc Exp $
 #
 # This file is in the public domain.
 #
@@ -3073,13 +3073,7 @@
 show-shlib-type:
 .  if empty(USE_LANGUAGES)
        ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} "none"
-.  elif exists(/usr/lib/libc.dylib)
-       ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} "dylib"
-.  elif ${OPSYS} == "AIX"
-       ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} "aixlib"
-.  elif ${OPSYS} == "Interix"
-       ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} "ELF" # not really, but acts like it
-.  else
+.  elif ${_OPSYS_SHLIB_TYPE} == "ELF/a.out"
        ${_PKG_SILENT}${_PKG_DEBUG}                                     \
        cd ${WRKDIR} &&                                                 \
        sotype=none;                                                    \
@@ -3098,6 +3092,8 @@
        fi;                                                             \
        ${ECHO} "$$sotype";                                             \
        ${RM} -f a.$$$$.c a.$$$$.out
+.  else
+       ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${_OPSYS_SHLIB_TYPE}
 .  endif   # USE_LANGUAGES
 .endif
 
diff -r 599e0dbb11b9 -r 3be871e997cc mk/defs.AIX.mk
--- a/mk/defs.AIX.mk    Thu Mar 11 22:35:45 2004 +0000
+++ b/mk/defs.AIX.mk    Thu Mar 11 22:57:22 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.AIX.mk,v 1.4 2004/01/27 16:11:47 agc Exp $
+# $NetBSD: defs.AIX.mk,v 1.5 2004/03/11 22:57:22 agc Exp $
 #
 # Variable definitions for the AIX operating system.
 
@@ -153,6 +153,7 @@
 _OPSYS_PERL_REQD=              # no base version of perl required
 _OPSYS_PTHREAD_AUTO=   no      # -lpthread needed for pthreads
 _OPSYS_RPATH_NAME=     -R      # name of symbol in rpath directive to linker 
+_OPSYS_SHLIB_TYPE=     aixlib  # type of shared lib
 _PATCH_CAN_BACKUP=     yes     # native patch(1) can make backups
 _PATCH_BACKUP_ARG?=    -b -V simple -z         # switch to patch(1) for backup suffix
 _PREFORMATTED_MAN_DIR= cat     # directory where catman pages are
diff -r 599e0dbb11b9 -r 3be871e997cc mk/defs.BSDOS.mk
--- a/mk/defs.BSDOS.mk  Thu Mar 11 22:35:45 2004 +0000
+++ b/mk/defs.BSDOS.mk  Thu Mar 11 22:57:22 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.BSDOS.mk,v 1.5 2004/01/27 16:11:47 agc Exp $
+# $NetBSD: defs.BSDOS.mk,v 1.6 2004/03/11 22:57:22 agc Exp $
 #
 # Variable definitions for the BSD/OS operating system.
 
@@ -139,6 +139,7 @@
 _OPSYS_PERL_REQD=              # no base version of perl required
 _OPSYS_PTHREAD_AUTO=   no      # -lpthread needed for pthreads
 _OPSYS_RPATH_NAME=     -R      # name of symbol in rpath directive to linker 
+_OPSYS_SHLIB_TYPE=     ELF/a.out       # shared lib type
 _PATCH_CAN_BACKUP=     yes     # native patch(1) can make backups
 _PATCH_BACKUP_ARG?=    -V simple -b -z # switch to patch(1) for backup suffix
 _PREFORMATTED_MAN_DIR= cat     # directory where catman pages are
diff -r 599e0dbb11b9 -r 3be871e997cc mk/defs.Darwin.mk
--- a/mk/defs.Darwin.mk Thu Mar 11 22:35:45 2004 +0000
+++ b/mk/defs.Darwin.mk Thu Mar 11 22:57:22 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.Darwin.mk,v 1.65 2004/01/27 16:11:47 agc Exp $
+# $NetBSD: defs.Darwin.mk,v 1.66 2004/03/11 22:57:22 agc Exp $
 #
 # Variable definitions for the Darwin operating system.
 
@@ -122,6 +122,7 @@
 _OPSYS_PERL_REQD=      5.8.0   # base version of perl required
 _OPSYS_PTHREAD_AUTO=   yes     # -lpthread not needed for pthreads
 _OPSYS_RPATH_NAME=     -L      # darwin has no rpath, use -L instead
+_OPSYS_SHLIB_TYPE=     dylib   # shared lib type
 _PATCH_CAN_BACKUP=     yes     # native patch(1) can make backups
 _PATCH_BACKUP_ARG?=    -V simple -b -z # switch to patch(1) for backup suffix
 _PREFORMATTED_MAN_DIR= cat     # directory where catman pages are
diff -r 599e0dbb11b9 -r 3be871e997cc mk/defs.FreeBSD.mk
--- a/mk/defs.FreeBSD.mk        Thu Mar 11 22:35:45 2004 +0000
+++ b/mk/defs.FreeBSD.mk        Thu Mar 11 22:57:22 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.FreeBSD.mk,v 1.32 2004/03/09 10:34:31 xtraeme Exp $
+# $NetBSD: defs.FreeBSD.mk,v 1.33 2004/03/11 22:57:22 agc Exp $
 #
 # Variable definitions for the FreeBSD operating system.
 
@@ -140,6 +140,7 @@
 _OPSYS_PERL_REQD=              # no base version of perl required
 _OPSYS_PTHREAD_AUTO=   no      # -lpthread needed for pthreads
 _OPSYS_RPATH_NAME=     -R      # name of symbol in rpath directive to linker 
+_OPSYS_SHLIB_TYPE=     ELF/a.out       # shared lib type
 _PATCH_CAN_BACKUP=     yes     # native patch(1) can make backups
 _PATCH_BACKUP_ARG?=    -V simple -b    # switch to patch(1) for backup suffix
 _PREFORMATTED_MAN_DIR= cat     # directory where catman pages are
diff -r 599e0dbb11b9 -r 3be871e997cc mk/defs.IRIX.mk
--- a/mk/defs.IRIX.mk   Thu Mar 11 22:35:45 2004 +0000
+++ b/mk/defs.IRIX.mk   Thu Mar 11 22:57:22 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.IRIX.mk,v 1.40 2004/01/27 16:11:47 agc Exp $
+# $NetBSD: defs.IRIX.mk,v 1.41 2004/03/11 22:57:22 agc Exp $
 #
 # Variable definitions for the IRIX operating system.
 
@@ -132,6 +132,7 @@
 _OPSYS_PERL_REQD=                      # no base version of perl required
 _OPSYS_PTHREAD_AUTO=   no              # -lpthread needed for pthreads
 _OPSYS_RPATH_NAME=     -rpath,         # name of symbol in rpath directive to linker 
+_OPSYS_SHLIB_TYPE=     ELF/a.out       # shared lib type
 .if defined(_OPSYS_GPATCH_REQD) && ${_OPSYS_GPATCH_REQD} == "YES"
 _PATCH_CAN_BACKUP=     yes             # patch(1) can make backups
 _PATCH_BACKUP_ARG?=    -b -V simple -z # switch to patch(1) for backup suffix
diff -r 599e0dbb11b9 -r 3be871e997cc mk/defs.Interix.mk
--- a/mk/defs.Interix.mk        Thu Mar 11 22:35:45 2004 +0000
+++ b/mk/defs.Interix.mk        Thu Mar 11 22:57:22 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.Interix.mk,v 1.5 2004/03/11 21:18:32 tv Exp $
+# $NetBSD: defs.Interix.mk,v 1.6 2004/03/11 22:57:22 agc Exp $
 #
 # Variable definitions for the Interix operating system.
 
@@ -123,6 +123,7 @@
 _OPSYS_PERL_REQD=              # no base version of perl required
 _OPSYS_PTHREAD_AUTO=   no      # -lpthread needed for pthreads
 _OPSYS_RPATH_NAME=     -R      # name of symbol in rpath directive to linker 
+_OPSYS_SHLIB_TYPE=     ELF     # shared lib type - not exactly true, but near enough
 _PATCH_CAN_BACKUP=     yes     # native patch(1) can make backups
 _PATCH_BACKUP_ARG?=    -b -V simple -z # switch to patch(1) for backup suffix
 _PREFORMATTED_MAN_DIR= cat     # directory where catman pages are
diff -r 599e0dbb11b9 -r 3be871e997cc mk/defs.Linux.mk
--- a/mk/defs.Linux.mk  Thu Mar 11 22:35:45 2004 +0000
+++ b/mk/defs.Linux.mk  Thu Mar 11 22:57:22 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.Linux.mk,v 1.65 2004/01/31 16:52:16 xtraeme Exp $
+# $NetBSD: defs.Linux.mk,v 1.66 2004/03/11 22:57:22 agc Exp $
 #
 # Variable definitions for the Linux operating system.
 
@@ -175,6 +175,7 @@
 _OPSYS_PERL_REQD=              # no base version of perl required
 _OPSYS_PTHREAD_AUTO=   no      # -lpthread needed for pthreads
 _OPSYS_RPATH_NAME=     -R      # name of symbol in rpath directive to linker 
+_OPSYS_SHLIB_TYPE=     ELF/a.out       # shared lib type
 _PATCH_CAN_BACKUP=     yes     # native patch(1) can make backups
 _PATCH_BACKUP_ARG?=    -b -V simple -z # switch to patch(1) for backup suffix
 _PREFORMATTED_MAN_DIR= cat     # directory where catman pages are
diff -r 599e0dbb11b9 -r 3be871e997cc mk/defs.NetBSD.mk
--- a/mk/defs.NetBSD.mk Thu Mar 11 22:35:45 2004 +0000
+++ b/mk/defs.NetBSD.mk Thu Mar 11 22:57:22 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.NetBSD.mk,v 1.60 2004/01/31 16:52:16 xtraeme Exp $
+# $NetBSD: defs.NetBSD.mk,v 1.61 2004/03/11 22:57:22 agc Exp $
 #
 # Variable definitions for the NetBSD operating system.
 
@@ -139,6 +139,7 @@
 _OPSYS_PERL_REQD=              # no base version of perl required
 _OPSYS_PTHREAD_AUTO=   no      # -lpthread needed for pthreads
 _OPSYS_RPATH_NAME=     -R      # name of symbol in rpath directive to linker 
+_OPSYS_SHLIB_TYPE=     ELF/a.out       # shared lib type
 _PATCH_CAN_BACKUP=     yes     # native patch(1) can make backups
 _PATCH_BACKUP_ARG?=    -V simple -b    # switch to patch(1) for backup suffix
 _PREFORMATTED_MAN_DIR= cat     # directory where catman pages are
diff -r 599e0dbb11b9 -r 3be871e997cc mk/defs.OpenBSD.mk
--- a/mk/defs.OpenBSD.mk        Thu Mar 11 22:35:45 2004 +0000
+++ b/mk/defs.OpenBSD.mk        Thu Mar 11 22:57:22 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.OpenBSD.mk,v 1.28 2004/01/27 16:11:47 agc Exp $
+# $NetBSD: defs.OpenBSD.mk,v 1.29 2004/03/11 22:57:22 agc Exp $
 #
 # Variable definitions for the OpenBSD operating system.
 
@@ -127,6 +127,7 @@
 _OPSYS_PERL_REQD=              # no base version of perl required
 _OPSYS_PTHREAD_AUTO=   no      # -lpthread needed for pthreads
 _OPSYS_RPATH_NAME=     -R      # name of symbol in rpath directive to linker 
+_OPSYS_SHLIB_TYPE=     ELF/a.out       # shared lib type
 _PATCH_CAN_BACKUP=     yes     # native patch(1) can make backups
 .if ${OS_VERSION} >= 3.4
 _PATCH_BACKUP_ARG?=    -V simple -z    # switch to patch(1) for backup suffix
diff -r 599e0dbb11b9 -r 3be871e997cc mk/defs.SunOS.mk
--- a/mk/defs.SunOS.mk  Thu Mar 11 22:35:45 2004 +0000
+++ b/mk/defs.SunOS.mk  Thu Mar 11 22:57:22 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.SunOS.mk,v 1.80 2004/02/14 03:26:09 grant Exp $
+# $NetBSD: defs.SunOS.mk,v 1.81 2004/03/11 22:57:22 agc Exp $
 #
 # Variable definitions for the SunOS/Solaris operating system.
 
@@ -126,6 +126,7 @@
 _OPSYS_PERL_REQD=              # no base version of perl required
 _OPSYS_PTHREAD_AUTO=   no              # -lpthread needed for pthreads
 _OPSYS_RPATH_NAME=     -R              # name of symbol in rpath directive to linker 
+_OPSYS_SHLIB_TYPE=     ELF/a.out       # shared lib type
 _PATCH_CAN_BACKUP=     yes             # native patch(1) can make backups
 _PATCH_BACKUP_ARG?=    -b -V simple -z # switch to patch(1) for backup suffix
 _PREFORMATTED_MAN_DIR= man             # directory where catman pages are



Home | Main Index | Thread Index | Old Index