pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/tools Consolidate blocks for tools that were suppli...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/700dd6f2165b
branches:  trunk
changeset: 502730:700dd6f2165b
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Nov 08 17:38:52 2005 +0000

description:
Consolidate blocks for tools that were supplied by the same package into
a loop so that it's easier to maintain and add new tools.

diffstat:

 mk/tools/replace.mk |  592 +++++++++------------------------------------------
 1 files changed, 109 insertions(+), 483 deletions(-)

diffs (truncated from 718 to 300 lines):

diff -r e36737be058d -r 700dd6f2165b mk/tools/replace.mk
--- a/mk/tools/replace.mk       Tue Nov 08 17:32:51 2005 +0000
+++ b/mk/tools/replace.mk       Tue Nov 08 17:38:52 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.132 2005/11/08 03:36:13 tv Exp $
+# $NetBSD: replace.mk,v 1.133 2005/11/08 17:38:52 jlam Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -198,17 +198,6 @@
 # command, e.g., TOOLS_TBL, TOOLS_YACC, etc., provided that "TOOL" has
 # been associated with <tool>.
 #
-.if !defined(TOOLS_IGNORE.[) && !empty(_USE_TOOLS:M\[)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.[=
-.  elif !empty(_TOOLS_USE_PKGSRC.[:M[yY][eE][sS])
-TOOLS_DEPENDS.[?=              coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 [
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.[=coreutils
-TOOLS_PATH.[=                  ${TOOLS_PREFIX.[}/bin/${GNU_PROGRAM_PREFIX}[
-.  endif
-.endif
-
 .if !defined(TOOLS_IGNORE.awk) && !empty(_USE_TOOLS:Mawk)
 .  if !empty(PKGPATH:Mlang/nawk)
 MAKEFLAGS+=                    TOOLS_IGNORE.awk=
@@ -220,17 +209,6 @@
 .  endif
 .endif
 
-.if !defined(TOOLS_IGNORE.basename) && !empty(_USE_TOOLS:Mbasename)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.basename=
-.  elif !empty(_TOOLS_USE_PKGSRC.basename:M[yY][eE][sS])
-TOOLS_DEPENDS.basename?=       coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 basename
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.basename=coreutils
-TOOLS_PATH.basename=           ${TOOLS_PREFIX.basename}/bin/${GNU_PROGRAM_PREFIX}basename
-.  endif
-.endif
-
 .if !defined(TOOLS_IGNORE.bash) && !empty(_USE_TOOLS:Mbash)
 .  if !empty(PKGPATH:Mshells/bash)
 MAKEFLAGS+=                    TOOLS_IGNORE.bash=
@@ -242,25 +220,6 @@
 .  endif
 .endif
 
-.if !defined(TOOLS_IGNORE.bdftopcf) && !empty(_USE_TOOLS:Mbdftopcf)
-.  if !empty(PKGPATH:Mx11/XFree86-clients) || !empty(PKGPATH:Mx11/xorg-clients)
-MAKEFLAGS+=                    TOOLS_IGNORE.bdftopcf=
-.  elif !empty(_TOOLS_USE_PKGSRC.bdftopcf:M[yY][eE][sS])
-TOOLS_CREATE+=                 bdftopcf
-.    if defined(X11_TYPE) && !empty(X11_TYPE:MXFree86)
-TOOLS_DEPENDS.bdftopcf?=       XFree86-clients>=4.4.0:../../x11/XFree86-clients
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.bdftopcf=imake
-TOOLS_PATH.bdftopcf=           ${TOOLS_PREFIX.bdftopcf}/${X11ROOT_PREFIX}/bin/bdftopcf
-.    elif defined(X11_TYPE) && !empty(X11_TYPE:Mxorg)
-TOOLS_DEPENDS.bdftopcf?=       xorg-clients>=6.8:../../x11/xorg-clients
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.bdftopcf=xorg-clients
-TOOLS_PATH.bdftopcf=           ${TOOLS_PREFIX.bdftopcf}/${X11ROOT_PREFIX}/bin/bdftopcf
-.    else # !empty(X11_TYPE:Mnative)
-TOOLS_PATH.bdftopcf=           ${X11BASE}/bin/bdftopcf
-.    endif
-.  endif
-.endif
-
 .if !defined(TOOLS_IGNORE.bison) && !empty(_USE_TOOLS:Mbison)
 .  if !empty(PKGPATH:Mdevel/bison)
 MAKEFLAGS+=                    TOOLS_IGNORE.bison=
@@ -315,72 +274,6 @@
 .  endif
 .endif
 
-.if !defined(TOOLS_IGNORE.cat) && !empty(_USE_TOOLS:Mcat)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.cat=
-.  elif !empty(_TOOLS_USE_PKGSRC.cat:M[yY][eE][sS])
-TOOLS_DEPENDS.cat?=            coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 cat
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.cat=coreutils
-TOOLS_PATH.cat=                        ${TOOLS_PREFIX.cat}/bin/${GNU_PROGRAM_PREFIX}cat
-.  endif
-.endif
-
-.if !defined(TOOLS_IGNORE.chgrp) && !empty(_USE_TOOLS:Mchgrp)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.chgrp=
-.  elif !empty(_TOOLS_USE_PKGSRC.chgrp:M[yY][eE][sS])
-TOOLS_DEPENDS.chgrp?=          coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 chgrp
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.chgrp=coreutils
-TOOLS_PATH.chgrp=              ${TOOLS_PREFIX.chgrp}/bin/${GNU_PROGRAM_PREFIX}chgrp
-.  endif
-.endif
-
-.if !defined(TOOLS_IGNORE.chmod) && !empty(_USE_TOOLS:Mchmod)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.chmod=
-.  elif !empty(_TOOLS_USE_PKGSRC.chmod:M[yY][eE][sS])
-TOOLS_DEPENDS.chmod?=          coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 chmod
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.chmod=coreutils
-TOOLS_PATH.chmod=              ${TOOLS_PREFIX.chmod}/bin/${GNU_PROGRAM_PREFIX}chmod
-.  endif
-.endif
-
-.if !defined(TOOLS_IGNORE.chown) && !empty(_USE_TOOLS:Mchown)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.chown=
-.  elif !empty(_TOOLS_USE_PKGSRC.chown:M[yY][eE][sS])
-TOOLS_DEPENDS.chown?=          coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 chown
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.chown=coreutils
-TOOLS_PATH.chown=              ${TOOLS_PREFIX.chown}/bin/${GNU_PROGRAM_PREFIX}chown
-.  endif
-.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_CREATE+=                 cmp
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.cmp=diffutils
-TOOLS_PATH.cmp=                        ${TOOLS_PREFIX.cmp}/bin/${GNU_PROGRAM_PREFIX}cmp
-.  endif
-.endif
-
-.if !defined(TOOLS_IGNORE.cp) && !empty(_USE_TOOLS:Mcp)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.cp=
-.  elif !empty(_TOOLS_USE_PKGSRC.cp:M[yY][eE][sS])
-TOOLS_DEPENDS.cp?=             coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 cp
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.cp=coreutils
-TOOLS_PATH.cp=                 ${TOOLS_PREFIX.cp}/bin/${GNU_PROGRAM_PREFIX}cp
-.  endif
-.endif
-
 .if !defined(TOOLS_IGNORE.csh) && !empty(_USE_TOOLS:Mcsh)
 .  if !empty(PKGPATH:Mshells/tcsh)
 MAKEFLAGS+=                    TOOLS_IGNORE.csh=
@@ -392,116 +285,6 @@
 .  endif
 .endif
 
-.if !defined(TOOLS_IGNORE.cut) && !empty(_USE_TOOLS:Mcut)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.cut=
-.  elif !empty(_TOOLS_USE_PKGSRC.cut:M[yY][eE][sS])
-TOOLS_DEPENDS.cut?=            coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 cut
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.cut=coreutils
-TOOLS_PATH.cut=                        ${TOOLS_PREFIX.cut}/bin/${GNU_PROGRAM_PREFIX}cut
-.  endif
-.endif
-
-.if !defined(TOOLS_IGNORE.date) && !empty(_USE_TOOLS:Mdate)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.date=
-.  elif !empty(_TOOLS_USE_PKGSRC.date:M[yY][eE][sS])
-TOOLS_DEPENDS.date?=           coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 date
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.date=coreutils
-TOOLS_PATH.date=               ${TOOLS_PREFIX.date}/bin/${GNU_PROGRAM_PREFIX}date
-.  endif
-.endif
-
-.if !defined(TOOLS_IGNORE.diff) && !empty(_USE_TOOLS:Mdiff)
-.  if !empty(PKGPATH:Mdevel/diffutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.diff=
-.  elif !empty(_TOOLS_USE_PKGSRC.diff:M[yY][eE][sS])
-TOOLS_DEPENDS.diff?=           diffutils>=2.8.1:../../devel/diffutils
-TOOLS_CREATE+=                 diff
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.diff=diffutils
-TOOLS_PATH.diff=               ${TOOLS_PREFIX.diff}/bin/${GNU_PROGRAM_PREFIX}diff
-.  endif
-.endif
-
-.if !defined(TOOLS_IGNORE.dirname) && !empty(_USE_TOOLS:Mdirname)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.dirname=
-.  elif !empty(_TOOLS_USE_PKGSRC.dirname:M[yY][eE][sS])
-TOOLS_DEPENDS.dirname?=                coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 dirname
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.dirname=coreutils
-TOOLS_PATH.dirname=            ${TOOLS_PREFIX.dirname}/bin/${GNU_PROGRAM_PREFIX}dirname
-.  endif
-.endif
-
-.if !defined(TOOLS_IGNORE.echo) && !empty(_USE_TOOLS:Mecho)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.echo=
-.  elif !empty(_TOOLS_USE_PKGSRC.echo:M[yY][eE][sS])
-TOOLS_DEPENDS.echo?=           coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 echo
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.echo=coreutils
-TOOLS_PATH.echo=               ${TOOLS_PREFIX.echo}/bin/${GNU_PROGRAM_PREFIX}echo
-.  endif
-.endif
-
-.if !defined(TOOLS_IGNORE.egrep) && !empty(_USE_TOOLS:Megrep)
-.  if !empty(PKGPATH:Mtextproc/grep)
-MAKEFLAGS+=                    TOOLS_IGNORE.egrep=
-.  elif !empty(_TOOLS_USE_PKGSRC.egrep:M[yY][eE][sS])
-TOOLS_DEPENDS.egrep?=          grep>=2.5.1:../../textproc/grep
-TOOLS_CREATE+=                 egrep
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.egrep=grep
-TOOLS_PATH.egrep=              ${TOOLS_PREFIX.egrep}/bin/${GNU_PROGRAM_PREFIX}egrep
-.  endif
-.endif
-
-.if !defined(TOOLS_IGNORE.env) && !empty(_USE_TOOLS:Menv)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.env=
-.  elif !empty(_TOOLS_USE_PKGSRC.env:M[yY][eE][sS])
-TOOLS_DEPENDS.env?=            coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 env
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.env=coreutilsj
-TOOLS_PATH.env=                        ${TOOLS_PREFIX.env}/bin/${GNU_PROGRAM_PREFIX}env
-.  endif
-.endif
-
-.if !defined(TOOLS_IGNORE.expr) && !empty(_USE_TOOLS:Mexpr)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.expr=
-.  elif !empty(_TOOLS_USE_PKGSRC.expr:M[yY][eE][sS])
-TOOLS_DEPENDS.expr?=           coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 expr
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.expr=coreutils
-TOOLS_PATH.expr=               ${TOOLS_PREFIX.expr}/bin/${GNU_PROGRAM_PREFIX}expr
-.  endif
-.endif
-
-.if !defined(TOOLS_IGNORE.false) && !empty(_USE_TOOLS:Mfalse)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.false=
-.  elif !empty(_TOOLS_USE_PKGSRC.false:M[yY][eE][sS])
-TOOLS_DEPENDS.false?=          coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 false
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.false=coreutils
-TOOLS_PATH.false=              ${TOOLS_PREFIX.false}/bin/${GNU_PROGRAM_PREFIX}false
-.  endif
-.endif
-
-.if !defined(TOOLS_IGNORE.fgrep) && !empty(_USE_TOOLS:Mfgrep)
-.  if !empty(PKGPATH:Mtextproc/grep)
-MAKEFLAGS+=                    TOOLS_IGNORE.fgrep=
-.  elif !empty(_TOOLS_USE_PKGSRC.fgrep:M[yY][eE][sS])
-TOOLS_DEPENDS.fgrep?=          grep>=2.5.1:../../textproc/grep
-TOOLS_CREATE+=                 fgrep
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.fgrep=grep
-TOOLS_PATH.fgrep=              ${TOOLS_PREFIX.fgrep}/bin/${GNU_PROGRAM_PREFIX}fgrep
-.  endif
-.endif
-
 .if !defined(TOOLS_IGNORE.file) && !empty(_USE_TOOLS:Mfile)
 .  if !empty(PKGPATH:Msysutils/file)
 MAKEFLAGS+=                    TOOLS_IGNORE.file=
@@ -576,17 +359,6 @@
 .  endif
 .endif
 
-.if !defined(TOOLS_IGNORE.grep) && !empty(_USE_TOOLS:Mgrep)
-.  if !empty(PKGPATH:Mtextproc/grep)
-MAKEFLAGS+=                    TOOLS_IGNORE.grep=
-.  elif !empty(_TOOLS_USE_PKGSRC.grep:M[yY][eE][sS])
-TOOLS_DEPENDS.grep?=           grep>=2.5.1:../../textproc/grep
-TOOLS_CREATE+=                 grep
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.grep=grep
-TOOLS_PATH.grep=               ${TOOLS_PREFIX.grep}/bin/${GNU_PROGRAM_PREFIX}grep
-.  endif
-.endif
-
 .if !defined(TOOLS_IGNORE.gsed) && !empty(_USE_TOOLS:Mgsed)
 .  if !empty(PKGPATH:Mtextproc/gsed)
 MAKEFLAGS+=                    TOOLS_IGNORE.gsed=
@@ -645,39 +417,6 @@
 .  endif
 .endif
 
-.if !defined(TOOLS_IGNORE.head) && !empty(_USE_TOOLS:Mhead)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.head=
-.  elif !empty(_TOOLS_USE_PKGSRC.head:M[yY][eE][sS])
-TOOLS_DEPENDS.head?=           coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 head
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.head=coreutils
-TOOLS_PATH.head=               ${TOOLS_PREFIX.head}/bin/${GNU_PROGRAM_PREFIX}head
-.  endif
-.endif
-
-.if !defined(TOOLS_IGNORE.hostname) && !empty(_USE_TOOLS:Mhostname)
-.  if !empty(PKGPATH:Msysutils/coreutils)
-MAKEFLAGS+=                    TOOLS_IGNORE.hostname=
-.  elif !empty(_TOOLS_USE_PKGSRC.hostname:M[yY][eE][sS])
-TOOLS_DEPENDS.hostname?=       coreutils>=5.2.1:../../sysutils/coreutils
-TOOLS_CREATE+=                 hostname



Home | Main Index | Thread Index | Old Index