summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-05-10 19:52:30 +0000
committerjlam <jlam@pkgsrc.org>2005-05-10 19:52:30 +0000
commit137ec423f976688b1acbf2dc3eb1f89ac1f0d188 (patch)
treeb56fa79dd2824fff13e7d029854b8e61fa2dca31
parentf97b83c30b62f73b1415b72b6f1a0a8d62cd3163 (diff)
downloadpkgsrc-137ec423f976688b1acbf2dc3eb1f89ac1f0d188.tar.gz
Split out "strip" from the USE_TOOLS processing in replace.mk. Instead,
we create a "strip" tool unconditionally, and make it either a no-op or the real thing depending on the whether we want unstripped files or not.
-rw-r--r--mk/bsd.pkg.mk6
-rw-r--r--mk/tools/bsd.tools.mk3
-rw-r--r--mk/tools/defaults.mk3
-rw-r--r--mk/tools/strip.mk16
4 files changed, 22 insertions, 6 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index dc5f97b925b..d5f9c54227e 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1633 2005/05/10 19:06:58 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1634 2005/05/10 19:52:30 jlam Exp $
#
# This file is in the public domain.
#
@@ -966,8 +966,8 @@ PKGSRC_USE_TOOLS+= \
[ awk basename cat chgrp chmod chown cmp cp cut date dirname \
echo egrep env expr false fgrep file find grep gtar gunzip \
gzcat gzip head hostname id install ldconfig ln ls m4 mkdir \
- mtree mv nice pax pwd rm rmdir sed sh shlock sort strip tail \
- tee test touch tr true tsort wc xargs
+ mtree mv nice pax pwd rm rmdir sed sh shlock sort tail tee test \
+ touch tr true tsort wc xargs
# We need a mail command to send mail to ${PKGSRC_MESSAGE_RECIPIENTS}.
.if !empty(PKGSRC_MESSAGE_RECIPIENTS)
diff --git a/mk/tools/bsd.tools.mk b/mk/tools/bsd.tools.mk
index 058677543b4..7677c3f1984 100644
--- a/mk/tools/bsd.tools.mk
+++ b/mk/tools/bsd.tools.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.tools.mk,v 1.17 2005/05/10 18:42:59 jlam Exp $
+# $NetBSD: bsd.tools.mk,v 1.18 2005/05/10 19:52:30 jlam Exp $
#
# This Makefile fragment creates tools under ${TOOLS_DIR} that are
# found before similarly-named tools in the system path.
@@ -76,6 +76,7 @@ USE_TOOLS?= # empty
.include "../../mk/tools/autoconf.mk"
.include "../../mk/tools/texinfo.mk"
.include "../../mk/tools/rpcgen.mk"
+.include "../../mk/tools/strip.mk"
.include "../../mk/tools/replace.mk"
.include "../../mk/tools/perl.mk"
.include "../../mk/tools/make.mk"
diff --git a/mk/tools/defaults.mk b/mk/tools/defaults.mk
index 5c3c69d2a98..9a0e624b4ef 100644
--- a/mk/tools/defaults.mk
+++ b/mk/tools/defaults.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defaults.mk,v 1.8 2005/05/10 19:06:59 jlam Exp $
+# $NetBSD: defaults.mk,v 1.9 2005/05/10 19:52:30 jlam Exp $
.if !defined(TOOLS_DEFAULTS_MK)
TOOLS_DEFAULTS_MK= defined
@@ -68,7 +68,6 @@ _TOOLS_VARNAME.sed= SED
_TOOLS_VARNAME.sh= SH
_TOOLS_VARNAME.shlock= SHLOCK
_TOOLS_VARNAME.sort= SORT
-_TOOLS_VARNAME.strip= STRIP
_TOOLS_VARNAME.tail= TAIL
_TOOLS_VARNAME.tbl= TBL
_TOOLS_VARNAME.tee= TEE
diff --git a/mk/tools/strip.mk b/mk/tools/strip.mk
new file mode 100644
index 00000000000..fe1f43ebc68
--- /dev/null
+++ b/mk/tools/strip.mk
@@ -0,0 +1,16 @@
+# $NetBSD: strip.mk,v 1.1 2005/05/10 19:52:30 jlam Exp $
+#
+# Depending on whether _INSTALL_UNSTRIPPED is defined, we cause
+# ${TOOLS_DIR}/bin/strip to be either the correct strip tool or a no-op.
+#
+.if defined(_INSTALL_UNSTRIPPED) || !defined(TOOLS_PLATFORM.strip)
+TOOLS_NOOP+= strip
+.else
+TOOLS_CREATE+= strip
+TOOLS_REAL_CMD.strip= ${TOOLS_PLATFORM.strip}
+.endif
+
+# Make ${STRIP} call "strip" through the PATH, which should find the one
+# under ${TOOLS_DIR}.
+#
+STRIP?= strip