pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/tools Teach replace.mk about cmp/CMP.
details: https://anonhg.NetBSD.org/pkgsrc/rev/34ffaa14ea8a
branches: trunk
changeset: 493085:34ffaa14ea8a
user: jlam <jlam%pkgsrc.org@localhost>
date: Tue Apr 26 23:20:35 2005 +0000
description:
Teach replace.mk about cmp/CMP.
diffstat:
mk/tools/replace.mk | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
diffs (57 lines):
diff -r e32deff8a6f9 -r 34ffaa14ea8a mk/tools/replace.mk
--- a/mk/tools/replace.mk Tue Apr 26 23:02:48 2005 +0000
+++ b/mk/tools/replace.mk Tue Apr 26 23:20:35 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.29 2005/04/26 22:51:00 jlam Exp $
+# $NetBSD: replace.mk,v 1.30 2005/04/26 23:20:35 jlam Exp $
#
# This Makefile fragment handles "replacements" of system-supplied
# tools with pkgsrc versions. The replacements are placed under
@@ -50,12 +50,13 @@
# This is an exhaustive list of tools for which we have pkgsrc
# replacements.
#
-_TOOLS_REPLACE_LIST= bison egrep fgrep file find gawk gm4 gmake grep \
- gsed gunzip gzcat gzip lex patch perl tbl xargs \
- yacc
+_TOOLS_REPLACE_LIST= bison cmp egrep fgrep file find gawk gm4 gmake \
+ grep gsed gunzip gzcat gzip lex patch perl tbl \
+ xargs yacc
# "TOOL" variable names associated with each of the tools
_TOOLS_VARNAME.bison= YACC
+_TOOLS_VARNAME.cmp= CMP
_TOOLS_VARNAME.egrep= EGREP
_TOOLS_VARNAME.fgrep= FGREP
_TOOLS_VARNAME.file= FILE_CMD
@@ -85,6 +86,10 @@
# files as they are ${OPSYS}-specific.
#
_TOOLS_USE_PLATFORM.bison= Linux-*-*
+_TOOLS_USE_PLATFORM.cmp= BSDOS-*-* Darwin-*-* DragonFly-*-* \
+ FreeBSD-*-* IRIX-*-* Interix-*-* \
+ Linux-*-* NetBSD-*-* OSF1-*-* \
+ OpenBSD-*-* SunOS-*-*
_TOOLS_USE_PLATFORM.egrep= ${_TOOLS_USE_PLATFORM.grep}
_TOOLS_USE_PLATFORM.fgrep= ${_TOOLS_USE_PLATFORM.grep}
_TOOLS_USE_PLATFORM.file= Darwin-*-* DragonFly-*-* FreeBSD-*-* \
@@ -168,6 +173,19 @@
TOOLS_CMD.bison= ${TOOLS_DIR}/bin/yacc
.endif
+.if !defined(TOOLS_IGNORE.cmp) && !empty(USE_TOOLS:Mcmp)
+. if !empty(PKGPATH:Mdevel/diffutils)
+MAKEFLAGS+= TOOLS_IGNORE.cmp=
+. elif !empty(_TOOLS_USE_PKGSRC.cmp:M[yY][eE][sS])
+${TOOLS_DEPENDS.cmp}+= diffutils>=2.8.1:../../devel/diffutils
+TOOLS_WRAP+= cmp
+TOOLS_REAL_CMD.cmp= ${LOCALBASE}/bin/cmp
+. if exists(${TOOLS_REAL_CMD.cmp})
+${_TOOLS_VARNAME.cmp}= ${TOOLS_REAL_CMD.cmp}
+. endif
+. endif
+.endif
+
.if (!defined(TOOLS_IGNORE.egrep) && \
!defined(TOOLS_IGNORE.fgrep) && \
!defined(TOOLS_IGNORE.grep)) && \
Home |
Main Index |
Thread Index |
Old Index