diff options
author | tv <tv@pkgsrc.org> | 2005-03-18 18:16:34 +0000 |
---|---|---|
committer | tv <tv@pkgsrc.org> | 2005-03-18 18:16:34 +0000 |
commit | 025c70d9c3a4194d2321344486e5a36fddaeaceb (patch) | |
tree | 5147a40e92074d16fee67bfab7670e3b69d7b28a /mk | |
parent | 516aee596ea7c3ba73534fd6b36299c2414fa85c (diff) | |
download | pkgsrc-025c70d9c3a4194d2321344486e5a36fddaeaceb.tar.gz |
Fix a gleaming illustration of why using YES/NO variables everywhere
possible, just for the sake of doing so, is not a good thing to do:
The platform files define _STRIPFLAG_* to determine whether to strip things.
But since this is included in bsd.prefs.mk, ".if ..." checks cannot take
things set in the Makefile into account. So convert INSTALL_UNSTRIPPED=YES
to a defined/undefined variable check in bsd.pkg.mk, and use the :D:U idiom
in the _STRIPFLAG_* variables.
This should fix PR pkg/28772 and PR pkg/29031.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 6 | ||||
-rw-r--r-- | mk/platform/AIX.mk | 8 | ||||
-rw-r--r-- | mk/platform/BSDOS.mk | 8 | ||||
-rw-r--r-- | mk/platform/Darwin.mk | 8 | ||||
-rw-r--r-- | mk/platform/DragonFly.mk | 8 | ||||
-rw-r--r-- | mk/platform/FreeBSD.mk | 8 | ||||
-rw-r--r-- | mk/platform/IRIX.mk | 8 | ||||
-rw-r--r-- | mk/platform/Interix.mk | 8 | ||||
-rw-r--r-- | mk/platform/Linux.mk | 8 | ||||
-rw-r--r-- | mk/platform/NetBSD.mk | 8 | ||||
-rw-r--r-- | mk/platform/OSF1.mk | 4 | ||||
-rw-r--r-- | mk/platform/OpenBSD.mk | 8 | ||||
-rw-r--r-- | mk/platform/SunOS.mk | 8 | ||||
-rw-r--r-- | mk/platform/UnixWare.mk | 9 |
14 files changed, 44 insertions, 63 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index e5c28e68625..d60b4776fb3 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1599 2005/03/16 02:09:54 dmcmahill Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1600 2005/03/18 18:16:34 tv Exp $ # # This file is in the public domain. # @@ -155,6 +155,10 @@ USE_DIGEST?= YES USE_GNU_TOOLS?= # empty WRKSRC?= ${WRKDIR}/${DISTNAME} +.if (defined(INSTALL_UNSTRIPPED) && !empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) || defined(DEBUG_FLAGS) +_INSTALL_UNSTRIPPED= # set (flag used by platform/*.mk) +.endif + ##### Non-overridable constants # Latest versions of tools required for correct pkgsrc operation. diff --git a/mk/platform/AIX.mk b/mk/platform/AIX.mk index 9cc0db6b916..3fd18fe2f9e 100644 --- a/mk/platform/AIX.mk +++ b/mk/platform/AIX.mk @@ -1,4 +1,4 @@ -# $NetBSD: AIX.mk,v 1.11 2005/03/12 20:03:38 garbled Exp $ +# $NetBSD: AIX.mk,v 1.12 2005/03/18 18:16:35 tv Exp $ # # Variable definitions for the AIX operating system. @@ -169,10 +169,8 @@ _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive LINK_ALL_LIBGCC_HACK= -Wl,--whole-archive -lgcc -Wl,--no-whole-archive .endif -.if (!defined(INSTALL_UNSTRIPPED) || empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) && !defined(DEBUG_FLAGS) -_STRIPFLAG_CC?= -s # cc(1) option to strip -_STRIPFLAG_INSTALL?= -s # install(1) option to strip -.endif +_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip +_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip DEFAULT_SERIAL_DEVICE?= /dev/tty0 SERIAL_DEVICES?= /dev/tty0 \ diff --git a/mk/platform/BSDOS.mk b/mk/platform/BSDOS.mk index d19f93a49a7..c3788ce89e3 100644 --- a/mk/platform/BSDOS.mk +++ b/mk/platform/BSDOS.mk @@ -1,4 +1,4 @@ -# $NetBSD: BSDOS.mk,v 1.7 2005/01/28 21:05:59 jlam Exp $ +# $NetBSD: BSDOS.mk,v 1.8 2005/03/18 18:16:35 tv Exp $ # # Variable definitions for the BSD/OS operating system. @@ -148,10 +148,8 @@ _USE_RPATH= yes # add rpath to LDFLAGS _OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive -.if (!defined(INSTALL_UNSTRIPPED) || empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) && !defined(DEBUG_FLAGS) -_STRIPFLAG_CC?= -s # cc(1) option to strip -_STRIPFLAG_INSTALL?= -s # install(1) option to strip -.endif +_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip +_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip DEFAULT_SERIAL_DEVICE?= /dev/null SERIAL_DEVICES?= /dev/null diff --git a/mk/platform/Darwin.mk b/mk/platform/Darwin.mk index ac54de959d3..194fb7f87b5 100644 --- a/mk/platform/Darwin.mk +++ b/mk/platform/Darwin.mk @@ -1,4 +1,4 @@ -# $NetBSD: Darwin.mk,v 1.7 2005/01/28 21:05:59 jlam Exp $ +# $NetBSD: Darwin.mk,v 1.8 2005/03/18 18:16:35 tv Exp $ # # Variable definitions for the Darwin operating system. @@ -143,10 +143,8 @@ _USE_RPATH= no # don't add rpath to LDFLAGS _OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive -.if (!defined(INSTALL_UNSTRIPPED) || empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) && !defined(DEBUG_FLAGS) -_STRIPFLAG_CC?= -Wl,-x # cc(1) option to strip -_STRIPFLAG_INSTALL?= -s # install(1) option to strip -.endif +_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-Wl,-x} # cc(1) option to strip +_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip LOCALBASE?= ${DESTDIR}/usr/pkg diff --git a/mk/platform/DragonFly.mk b/mk/platform/DragonFly.mk index f361e229720..a3605884c1d 100644 --- a/mk/platform/DragonFly.mk +++ b/mk/platform/DragonFly.mk @@ -1,4 +1,4 @@ -# $NetBSD: DragonFly.mk,v 1.9 2005/01/28 21:05:59 jlam Exp $ +# $NetBSD: DragonFly.mk,v 1.10 2005/03/18 18:16:35 tv Exp $ # # Variable definitions for the DragonFly operating system. @@ -142,10 +142,8 @@ _USE_RPATH= yes # add rpath to LDFLAGS _OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive -.if (!defined(INSTALL_UNSTRIPPED) || empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) && !defined(DEBUG_FLAGS) -_STRIPFLAG_CC?= -s # cc(1) option to strip -_STRIPFLAG_INSTALL?= -s # install(1) option to strip -.endif +_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip +_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip DEFAULT_SERIAL_DEVICE?= /dev/cuaa0 SERIAL_DEVICES?= /dev/cuaa0 diff --git a/mk/platform/FreeBSD.mk b/mk/platform/FreeBSD.mk index 3757aca975f..e7d9c74364f 100644 --- a/mk/platform/FreeBSD.mk +++ b/mk/platform/FreeBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: FreeBSD.mk,v 1.7 2005/01/28 21:05:59 jlam Exp $ +# $NetBSD: FreeBSD.mk,v 1.8 2005/03/18 18:16:35 tv Exp $ # # Variable definitions for the FreeBSD operating system. @@ -141,10 +141,8 @@ _USE_RPATH= yes # add rpath to LDFLAGS _OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive -.if (!defined(INSTALL_UNSTRIPPED) || empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) && !defined(DEBUG_FLAGS) -_STRIPFLAG_CC?= -s # cc(1) option to strip -_STRIPFLAG_INSTALL?= -s # install(1) option to strip -.endif +_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip +_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip DEFAULT_SERIAL_DEVICE?= /dev/cuaa0 SERIAL_DEVICES?= /dev/cuaa0 diff --git a/mk/platform/IRIX.mk b/mk/platform/IRIX.mk index c3d5e8f9321..9a287cdb208 100644 --- a/mk/platform/IRIX.mk +++ b/mk/platform/IRIX.mk @@ -1,4 +1,4 @@ -# $NetBSD: IRIX.mk,v 1.9 2005/01/28 21:05:59 jlam Exp $ +# $NetBSD: IRIX.mk,v 1.10 2005/03/18 18:16:35 tv Exp $ # # Variable definitions for the IRIX operating system. @@ -151,10 +151,8 @@ _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,-none # incompatible. _INCOMPAT_ICONV= IRIX-*-* -.if (!defined(INSTALL_UNSTRIPPED) || empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) && !defined(DEBUG_FLAGS) -_STRIPFLAG_CC?= -s # cc(1) option to strip -_STRIPFLAG_INSTALL?= -s # install(1) option to strip -.endif +_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip +_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip LOCALBASE?= ${DESTDIR}/usr/pkg PKG_TOOLS_BIN?= ${LOCALBASE}/sbin diff --git a/mk/platform/Interix.mk b/mk/platform/Interix.mk index dfddf71a4d1..54facc62fb4 100644 --- a/mk/platform/Interix.mk +++ b/mk/platform/Interix.mk @@ -1,4 +1,4 @@ -# $NetBSD: Interix.mk,v 1.24 2005/02/04 09:19:41 jlam Exp $ +# $NetBSD: Interix.mk,v 1.25 2005/03/18 18:16:35 tv Exp $ # # Variable definitions for the Interix operating system. @@ -179,10 +179,8 @@ BUILD_DEPENDS+= ${USE_X11BASE:D${_XPKGWEDGE_DEPENDS}} _OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive -.if (!defined(INSTALL_UNSTRIPPED) || empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) && !defined(DEBUG_FLAGS) -_STRIPFLAG_CC?= -s # cc(1) option to strip -_STRIPFLAG_INSTALL?= -s # install(1) option to strip -.endif +_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip +_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip DEFAULT_SERIAL_DEVICE?= /dev/tty00 SERIAL_DEVICES?= /dev/tty00 /dev/tty01 /dev/tty02 /dev/tty03 diff --git a/mk/platform/Linux.mk b/mk/platform/Linux.mk index d8cd9668906..342cad3eb41 100644 --- a/mk/platform/Linux.mk +++ b/mk/platform/Linux.mk @@ -1,4 +1,4 @@ -# $NetBSD: Linux.mk,v 1.9 2005/02/17 20:03:26 reed Exp $ +# $NetBSD: Linux.mk,v 1.10 2005/03/18 18:16:35 tv Exp $ # # Variable definitions for the Linux operating system. @@ -188,10 +188,8 @@ _USE_RPATH= yes # add rpath to LDFLAGS _OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive -.if (!defined(INSTALL_UNSTRIPPED) || empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) && !defined(DEBUG_FLAGS) -_STRIPFLAG_CC?= -s # cc(1) option to strip -_STRIPFLAG_INSTALL?= -s # install(1) option to strip -.endif +_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip +_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip LOCALBASE?= ${DESTDIR}/usr/pkg diff --git a/mk/platform/NetBSD.mk b/mk/platform/NetBSD.mk index d75490c81ef..ad83d449c13 100644 --- a/mk/platform/NetBSD.mk +++ b/mk/platform/NetBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.mk,v 1.7 2005/01/28 21:05:59 jlam Exp $ +# $NetBSD: NetBSD.mk,v 1.8 2005/03/18 18:16:35 tv Exp $ # # Variable definitions for the NetBSD operating system. @@ -155,10 +155,8 @@ _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive LINK_ALL_LIBGCC_HACK= -Wl,--whole-archive -lgcc -Wl,--no-whole-archive .endif -.if (!defined(INSTALL_UNSTRIPPED) || empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) && !defined(DEBUG_FLAGS) -_STRIPFLAG_CC?= -s # cc(1) option to strip -_STRIPFLAG_INSTALL?= -s # install(1) option to strip -.endif +_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip +_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip .if (${MACHINE_ARCH} == alpha) DEFAULT_SERIAL_DEVICE?= /dev/ttyC0 diff --git a/mk/platform/OSF1.mk b/mk/platform/OSF1.mk index e3165636f5f..3e8ed9e5a86 100644 --- a/mk/platform/OSF1.mk +++ b/mk/platform/OSF1.mk @@ -1,4 +1,4 @@ -# $NetBSD: OSF1.mk,v 1.2 2005/01/28 21:05:59 jlam Exp $ +# $NetBSD: OSF1.mk,v 1.3 2005/03/18 18:16:35 tv Exp $ # # Variable definitions for the OSF1 operating system. @@ -143,3 +143,5 @@ SERIAL_DEVICES?= /dev/tty00 \ _INCOMPAT_ICONV= OSF1-*-* +_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U} # cc(1) option to strip +_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U} # install(1) option to strip diff --git a/mk/platform/OpenBSD.mk b/mk/platform/OpenBSD.mk index ae11afd70a3..e21fa889ffe 100644 --- a/mk/platform/OpenBSD.mk +++ b/mk/platform/OpenBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: OpenBSD.mk,v 1.11 2005/01/28 21:05:59 jlam Exp $ +# $NetBSD: OpenBSD.mk,v 1.12 2005/03/18 18:16:35 tv Exp $ # # Variable definitions for the OpenBSD operating system. @@ -138,10 +138,8 @@ _USE_RPATH= yes # add rpath to LDFLAGS _OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive -.if (!defined(INSTALL_UNSTRIPPED) || empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) && !defined(DEBUG_FLAGS) -_STRIPFLAG_CC?= -s # cc(1) option to strip -_STRIPFLAG_INSTALL?= -s # install(1) option to strip -.endif +_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip +_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip .if (${MACHINE_ARCH} == alpha) DEFAULT_SERIAL_DEVICE?= /dev/ttyC0 diff --git a/mk/platform/SunOS.mk b/mk/platform/SunOS.mk index 5cbcadce1c1..d3abde5b5aa 100644 --- a/mk/platform/SunOS.mk +++ b/mk/platform/SunOS.mk @@ -1,4 +1,4 @@ -# $NetBSD: SunOS.mk,v 1.9 2005/01/28 21:05:59 jlam Exp $ +# $NetBSD: SunOS.mk,v 1.10 2005/03/18 18:16:35 tv Exp $ # # Variable definitions for the SunOS/Solaris operating system. @@ -144,10 +144,8 @@ _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -z defaultextract # incompatible. _INCOMPAT_ICONV= SunOS-*-* -.if (!defined(INSTALL_UNSTRIPPED) || empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) && !defined(DEBUG_FLAGS) -_STRIPFLAG_CC?= -s # cc(1) option to strip -_STRIPFLAG_INSTALL?= -s # install(1) option to strip -.endif +_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip +_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip # Migration aid for old /usr/local LOCALBASE .if !defined(LOCALBASE) && exists(${DESTDIR}/usr/local/libexec/cgi-bin) && \ diff --git a/mk/platform/UnixWare.mk b/mk/platform/UnixWare.mk index ac136bc3875..667e86bc666 100644 --- a/mk/platform/UnixWare.mk +++ b/mk/platform/UnixWare.mk @@ -1,4 +1,4 @@ -# $NetBSD: UnixWare.mk,v 1.7 2005/01/28 21:05:59 jlam Exp $ +# $NetBSD: UnixWare.mk,v 1.8 2005/03/18 18:16:35 tv Exp $ # # Variable definitions for the UnixWare 7 operating system. @@ -146,11 +146,8 @@ _OPSYS_NO_WHOLE_ARCHIVE_FLAG= # incompatible. _INCOMPAT_ICONV= UnixWare-*-* -# XXX Where are those variables used? -.if (!defined(INSTALL_UNSTRIPPED) || empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) && !defined(DEBUG_FLAGS) -_STRIPFLAG_CC?= # cc(1) option to strip -_STRIPFLAG_INSTALL?= # install(1) option to strip -.endif +_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U} # cc(1) option to strip +_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U} # install(1) option to strip LOCALBASE?= ${DESTDIR}/usr/pkg |