| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: replace.mk,v 1.295 2022/07/24 14:47:00 wiz Exp $ | | 1 | # $NetBSD: replace.mk,v 1.296 2022/11/16 12:12:46 jperkin Exp $ |
2 | # | | 2 | # |
3 | # Copyright (c) 2005 The NetBSD Foundation, Inc. | | 3 | # Copyright (c) 2005 The NetBSD Foundation, Inc. |
4 | # All rights reserved. | | 4 | # All rights reserved. |
5 | # | | 5 | # |
6 | # This code is derived from software contributed to The NetBSD Foundation | | 6 | # This code is derived from software contributed to The NetBSD Foundation |
7 | # by Johnny C. Lam. | | 7 | # by Johnny C. Lam. |
8 | # | | 8 | # |
9 | # Redistribution and use in source and binary forms, with or without | | 9 | # Redistribution and use in source and binary forms, with or without |
10 | # modification, are permitted provided that the following conditions | | 10 | # modification, are permitted provided that the following conditions |
11 | # are met: | | 11 | # are met: |
12 | # 1. Redistributions of source code must retain the above copyright | | 12 | # 1. Redistributions of source code must retain the above copyright |
13 | # notice, this list of conditions and the following disclaimer. | | 13 | # notice, this list of conditions and the following disclaimer. |
14 | # 2. Redistributions in binary form must reproduce the above copyright | | 14 | # 2. Redistributions in binary form must reproduce the above copyright |
| @@ -988,30 +988,33 @@ TOOLS_PATH.[= ${LOCALBASE}/bin/g[ | | | @@ -988,30 +988,33 @@ TOOLS_PATH.[= ${LOCALBASE}/bin/g[ |
988 | # These tools are all supplied by the textproc/grep package if there is | | 988 | # These tools are all supplied by the textproc/grep package if there is |
989 | # no native tool available. If explicit GNU versions are requested via | | 989 | # no native tool available. If explicit GNU versions are requested via |
990 | # "ggrep" then they are preferred. | | 990 | # "ggrep" then they are preferred. |
991 | # | | 991 | # |
992 | _TOOLS.grep= egrep fgrep grep | | 992 | _TOOLS.grep= egrep fgrep grep |
993 | | | 993 | |
994 | .if !defined(TOOLS_IGNORE.ggrep) && !empty(_USE_TOOLS:Mggrep) | | 994 | .if !defined(TOOLS_IGNORE.ggrep) && !empty(_USE_TOOLS:Mggrep) |
995 | . if !empty(PKGPATH:Mtextproc/grep) | | 995 | . if !empty(PKGPATH:Mtextproc/grep) |
996 | MAKEFLAGS+= TOOLS_IGNORE.ggrep= | | 996 | MAKEFLAGS+= TOOLS_IGNORE.ggrep= |
997 | . elif !empty(_TOOLS_USE_PKGSRC.ggrep:M[yY][eE][sS]) | | 997 | . elif !empty(_TOOLS_USE_PKGSRC.ggrep:M[yY][eE][sS]) |
998 | TOOLS_DEPENDS.ggrep?= grep>=2.5.1:../../textproc/grep | | 998 | TOOLS_DEPENDS.ggrep?= grep>=2.5.1:../../textproc/grep |
999 | . for _t_ in ${_TOOLS.grep} | | 999 | . for _t_ in ${_TOOLS.grep} |
1000 | TOOLS_CREATE+= g${_t_} | | 1000 | TOOLS_CREATE+= g${_t_} |
1001 | TOOLS_PATH.${_t_}= ${LOCALBASE}/bin/g${_t_} | | 1001 | TOOLS_PATH.${_t_}= ${LOCALBASE}/bin/ggrep |
1002 | TOOLS_PATH.g${_t_}= ${LOCALBASE}/bin/g${_t_} | | 1002 | TOOLS_PATH.g${_t_}= ${LOCALBASE}/bin/ggrep |
1003 | TOOLS_ALIASES.g${_t_}= ${_t_} | | | |
1004 | . endfor | | 1003 | . endfor |
| | | 1004 | TOOLS_ARGS.egrep= -E |
| | | 1005 | TOOLS_ARGS.gegrep= -E |
| | | 1006 | TOOLS_ARGS.fgrep= -F |
| | | 1007 | TOOLS_ARGS.gfgrep= -F |
1005 | . endif | | 1008 | . endif |
1006 | .else | | 1009 | .else |
1007 | . for _t_ in ${_TOOLS.grep} | | 1010 | . for _t_ in ${_TOOLS.grep} |
1008 | . if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_}) | | 1011 | . if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_}) |
1009 | . if !empty(PKGPATH:Mtextproc/grep) | | 1012 | . if !empty(PKGPATH:Mtextproc/grep) |
1010 | MAKEFLAGS+= TOOLS_IGNORE.${_t_}= | | 1013 | MAKEFLAGS+= TOOLS_IGNORE.${_t_}= |
1011 | . elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS]) | | 1014 | . elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS]) |
1012 | TOOLS_DEPENDS.${_t_}?= grep>=2.5.1:../../textproc/grep | | 1015 | TOOLS_DEPENDS.${_t_}?= grep>=2.5.1:../../textproc/grep |
1013 | TOOLS_CREATE+= ${_t_} | | 1016 | TOOLS_CREATE+= ${_t_} |
1014 | TOOLS_PATH.${_t_}= ${LOCALBASE}/bin/g${_t_} | | 1017 | TOOLS_PATH.${_t_}= ${LOCALBASE}/bin/g${_t_} |
1015 | . endif | | 1018 | . endif |
1016 | . endif | | 1019 | . endif |
1017 | . endfor | | 1020 | . endfor |