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.
This commit is contained in:
jlam 2005-05-10 19:52:30 +00:00
parent f97b83c30b
commit 137ec423f9
4 changed files with 22 additions and 6 deletions

View file

@ -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)

View file

@ -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"

View file

@ -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

16
mk/tools/strip.mk Normal file
View file

@ -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