pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk move the libstdc++ fake libtool archive stuff out of



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a4994aed9a9e
branches:  trunk
changeset: 462879:a4994aed9a9e
user:      grant <grant%pkgsrc.org@localhost>
date:      Sat Oct 18 09:14:47 2003 +0000

description:
move the libstdc++ fake libtool archive stuff out of
!defined(COMPILER_MK) for now.

some packages include bsd.prefs.mk before defining USE_BUILDLINK2,
which resulted in the libstdc++ fake-la target being missed.

XXX the real fix is to include compiler.mk from both bsd.prefs.mk and
XXX bsd.pkg.mk, and have compiler.mk make the right decisions based on
XXX where it was included from.

diffstat:

 mk/compiler.mk |  34 ++++++++++++++++++++--------------
 1 files changed, 20 insertions(+), 14 deletions(-)

diffs (52 lines):

diff -r ce28bef0893b -r a4994aed9a9e mk/compiler.mk
--- a/mk/compiler.mk    Sat Oct 18 08:58:51 2003 +0000
+++ b/mk/compiler.mk    Sat Oct 18 09:14:47 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: compiler.mk,v 1.20 2003/10/12 03:05:37 grant Exp $
+# $NetBSD: compiler.mk,v 1.21 2003/10/18 09:14:47 grant Exp $
 
 # This Makefile fragment implements handling for supported
 # C/C++/fortran compilers.
@@ -216,19 +216,6 @@
 LDFLAGS+=              ${_GCC_LDFLAGS}
 .endif
 
-# create a fake libstdc++.la if one exists in /usr/lib.
-.if empty(USE_BUILDLINK2:M[nN][oO])
-.  if defined(_CC_IS_GCC) && exists(/usr/lib/libstdc++.la)
-BUILDLINK_TARGETS+=            libstdc++-buildlink-la
-
-libstdc++-buildlink-la:
-       ${_PKG_SILENT}${_PKG_DEBUG}                                     \
-       lafile="${BUILDLINK_DIR}/lib/libstdc++.la";                     \
-       libpattern="/usr/lib/libstdc++.*";                              \
-       ${BUILDLINK_FAKE_LA}
-.  endif
-.endif
-
 # CC_VERSION can be tested by package Makefiles to tweak things based
 # on the compiler being used.
 #
@@ -263,3 +250,22 @@
 .endif
 
 .endif # COMPILER_MK
+
+# XXX this test is outside if !defined(COMPILER_MK) because some
+# XXX packages include bsd.prefs.mk before defining USE_BUILDLINK2.
+#
+# create a fake libstdc++.la if one exists in /usr/lib.
+.if empty(USE_BUILDLINK2:M[nN][oO])
+.  if defined(_CC_IS_GCC) && exists(/usr/lib/libstdc++.la)
+.    if (!defined(BUILDLINK_TARGETS) || \
+     defined(BUILDLINK_TARGETS) && empty(BUILDLINK_TARGETS:Mlibstdc++-buildlink-la))
+BUILDLINK_TARGETS+=            libstdc++-buildlink-la
+
+libstdc++-buildlink-la:
+       ${_PKG_SILENT}${_PKG_DEBUG}                                     \
+       lafile="${BUILDLINK_DIR}/lib/libstdc++.la";                     \
+       libpattern="/usr/lib/libstdc++.*";                              \
+       ${BUILDLINK_FAKE_LA}
+.    endif
+.  endif
+.endif



Home | Main Index | Thread Index | Old Index