pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/tools Merge findutils.mk into replace.mk. We now j...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1128d4058792
branches:  trunk
changeset: 493081:1128d4058792
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Apr 26 22:28:03 2005 +0000

description:
Merge findutils.mk into replace.mk.  We now just use USE_TOOLS+=find
or USE_TOOLS+=xargs, and cause FIND and XARGS to point to the correct
commands.

diffstat:

 mk/tools/bsd.tools.mk |   3 +--
 mk/tools/findutils.mk |  30 ------------------------------
 mk/tools/replace.mk   |  41 ++++++++++++++++++++++++++++++++++++++---
 3 files changed, 39 insertions(+), 35 deletions(-)

diffs (140 lines):

diff -r 5ff9680774aa -r 1128d4058792 mk/tools/bsd.tools.mk
--- a/mk/tools/bsd.tools.mk     Tue Apr 26 22:20:42 2005 +0000
+++ b/mk/tools/bsd.tools.mk     Tue Apr 26 22:28:03 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.tools.mk,v 1.6 2005/04/26 14:47:15 jlam Exp $
+# $NetBSD: bsd.tools.mk,v 1.7 2005/04/26 22:28:03 jlam Exp $
 #
 # This Makefile fragment creates tools under ${TOOLS_DIR} that are
 # found before similarly-named tools in the system path.
@@ -77,7 +77,6 @@
 .include "../../mk/tools/automake.mk"
 .include "../../mk/tools/autoconf.mk"
 .include "../../mk/tools/coreutils.mk"
-.include "../../mk/tools/findutils.mk"
 .include "../../mk/tools/texinfo.mk"
 .include "../../mk/tools/rpcgen.mk"
 .include "../../mk/tools/replace.mk"
diff -r 5ff9680774aa -r 1128d4058792 mk/tools/findutils.mk
--- a/mk/tools/findutils.mk     Tue Apr 26 22:20:42 2005 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-# $NetBSD: findutils.mk,v 1.2 2005/04/26 15:32:05 jlam Exp $
-#
-# This Makefile fragment unconditionally replaces the system-supplied
-# "find" utilities with the ones from the GNU findutils package when
-# "findutils" is added to USE_TOOLS.
-#
-# Set TOOLS_DEPENDS.findutils to "DEPENDS" to get a run-time dependency
-# on findutils.
-#
-
-.if !defined(TOOLS_IGNORE.findutils) && !empty(USE_TOOLS:Mfindutils)
-.  if !empty(PKGPATH:Msysutils/findutils)
-MAKEFLAGS+=            TOOLS_IGNORE.findutils=
-.  else
-TOOLS_DEPENDS.findutils?=      BUILD_DEPENDS
-${TOOLS_DEPENDS.findutils}+=   findutils>=4.1:../../sysutils/findutils
-
-# List of find utilities for which we'll create symlinks under  
-# ${TOOLS_DIR}.
-#
-_TOOLS_FINDUTILS+=     find xargs
-
-# Create symlinks for each of the findutils under ${TOOLS_DIR}.
-.    for _t_ in ${_TOOLS_FINDUTILS}
-TOOLS_SYMLINK+=                ${_t_}
-TOOLS_REAL_CMD.${_t_}= ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}${_t_}
-.    endfor
-.    undef _t_
-.  endif
-.endif
diff -r 5ff9680774aa -r 1128d4058792 mk/tools/replace.mk
--- a/mk/tools/replace.mk       Tue Apr 26 22:20:42 2005 +0000
+++ b/mk/tools/replace.mk       Tue Apr 26 22:28:03 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.26 2005/04/26 22:20:42 jlam Exp $
+# $NetBSD: replace.mk,v 1.27 2005/04/26 22:28:03 jlam Exp $
 #
 # This Makefile fragment handles "replacements" of system-supplied
 # tools with pkgsrc versions.  The replacements are placed under
@@ -50,14 +50,16 @@
 # This is an exhaustive list of tools for which we have pkgsrc
 # replacements.
 #
-_TOOLS_REPLACE_LIST=   bison egrep fgrep file gawk gm4 gmake grep gsed \
-                       gunzip gzcat gzip lex patch perl tbl yacc
+_TOOLS_REPLACE_LIST=   bison 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.egrep=  EGREP
 _TOOLS_VARNAME.fgrep=  FGREP
 _TOOLS_VARNAME.file=   FILE_CMD
+_TOOLS_VARNAME.find=   FIND
 _TOOLS_VARNAME.gawk=   AWK
 _TOOLS_VARNAME.gm4=    M4
 _TOOLS_VARNAME.gmake=  GMAKE
@@ -70,6 +72,7 @@
 _TOOLS_VARNAME.patch=  PATCH
 _TOOLS_VARNAME.perl=   PERL5
 _TOOLS_VARNAME.tbl=    TBL
+_TOOLS_VARNAME.xargs=  XARGS
 _TOOLS_VARNAME.yacc=   YACC
 
 ######################################################################
@@ -87,6 +90,7 @@
 _TOOLS_USE_PLATFORM.file=      Darwin-*-* DragonFly-*-* FreeBSD-*-*    \
                                Linux-*-* NetBSD-*-* OpenBSD-*-*        \
                                SunOS-*-*
+_TOOLS_USE_PLATFORM.find=      Linux-*-*
 _TOOLS_USE_PLATFORM.gawk=      DragonFly-*-* FreeBSD-*-* Interix-*-*   \
                                Linux-*-* NetBSD-1.[0-6]*-* OpenBSD-*-* \
                                SunOS-*-*
@@ -110,6 +114,7 @@
 _TOOLS_USE_PLATFORM.perl=      # This should always be empty.
 _TOOLS_USE_PLATFORM.tbl=       DragonFly-*-* FreeBSD-*-* NetBSD-*-*    \
                                OpenBSD-*-*
+_TOOLS_USE_PLATFORM.xargs=     ${_TOOLS_USE_PLATFORM.find}
 _TOOLS_USE_PLATFORM.yacc=      DragonFly-*-* FreeBSD-*-* NetBSD-*-*    \
                                OpenBSD-*-*
 
@@ -209,6 +214,36 @@
 .  endif
 .endif
 
+.if (!defined(TOOLS_IGNORE.find) && \
+     !defined(TOOLS_IGNORE.xargs)) && \
+    (!empty(USE_TOOLS:Mfind) || \
+     !empty(USE_TOOLS:Mxargs))
+_TOOLS_FINDUTILS=              find xargs
+.  if !empty(PKGPATH:Msysutils/findutils)
+.    for _t_ in ${_TOOLS_FINDUTILS}
+MAKEFLAGS+=                    TOOLS_IGNORE.${_t_}=
+.    endfor
+.  else
+.    for _t_ in ${_TOOLS_FINDUTILS}
+.      if empty(USE_TOOLS:M${_t_})
+USE_TOOLS+=    ${_t_}
+.      endif
+.    endfor
+.    if !empty(_TOOLS_USE_PKGSRC.find:M[yY][eE][sS]) || \
+        !empty(_TOOLS_USE_PKGSRC.xargs:M[yY][eE][sS])
+${TOOLS_DEPENDS.find}+=                findutils>=4.1:../../sysutils/findutils
+.      for _t_ in ${_TOOLS_FINDUTILS}
+_TOOLS_USE_PKGSRC.${_t_}=      yes
+TOOLS_SYMLINK+=                        ${_t_}
+TOOLS_REAL_CMD.${_t_}=         ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}${_t_}
+.        if exists(${TOOLS_REAL_CMD.${_t_}})
+${_TOOLS_VARNAME.${_t_}}=      ${TOOLS_REAL_CMD.${_t_}}
+.        endif
+.      endfor
+.    endif
+.  endif
+.endif
+
 .if !defined(TOOLS_IGNORE.gawk) && !empty(USE_TOOLS:Mgawk)
 .  if !empty(PKGPATH:Mlang/gawk)
 MAKEFLAGS+=                    TOOLS_IGNORE.gawk=



Home | Main Index | Thread Index | Old Index