summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2016-03-09 22:27:29 +0000
committertnn <tnn@pkgsrc.org>2016-03-09 22:27:29 +0000
commit40a6421ee340d0d46a8145ac8cd6cb7f9295f1cc (patch)
tree80e0524b68da8cb882b014a3f0ac81e8b9887891 /mk
parente82e1778c9e46b48634d58c67084114124a9cbc3 (diff)
downloadpkgsrc-40a6421ee340d0d46a8145ac8cd6cb7f9295f1cc.tar.gz
Add special handling for Debian derived systems as they do not have GNU awk
in /usr/bin/awk but mawk. Use /usr/bin/gawk if it exists, otherwise depend on gawk from pkgsrc when required.
Diffstat (limited to 'mk')
-rw-r--r--mk/tools/tools.Linux.mk16
1 files changed, 13 insertions, 3 deletions
diff --git a/mk/tools/tools.Linux.mk b/mk/tools/tools.Linux.mk
index c0c42fa59a6..3018cad4ca0 100644
--- a/mk/tools/tools.Linux.mk
+++ b/mk/tools/tools.Linux.mk
@@ -1,9 +1,13 @@
-# $NetBSD: tools.Linux.mk,v 1.59 2015/02/16 11:01:40 jperkin Exp $
+# $NetBSD: tools.Linux.mk,v 1.60 2016/03/09 22:27:29 tnn Exp $
#
# System-supplied tools for the Linux operating system.
TOOLS_PLATFORM.[?= [ # shell builtin
+.if exists(/etc/debian_version)
+TOOLS_PLATFORM.awk?= /usr/bin/awk
+.else
TOOLS_PLATFORM.awk?= ${TOOLS_PLATFORM.gawk}
+.endif
.if exists(/usr/bin/autopoint)
TOOLS_PLATFORM.autopoint?= /usr/bin/autopoint
.endif
@@ -90,10 +94,16 @@ TOOLS_PLATFORM.fgrep?= /usr/bin/fgrep
.endif
TOOLS_PLATFORM.file?= /usr/bin/file
TOOLS_PLATFORM.find?= /usr/bin/find
-.if exists(/bin/awk)
-TOOLS_PLATFORM.gawk?= /bin/awk
+.if exists(/etc/debian_version)
+. if exists(/usr/bin/gawk)
+TOOLS_PLATFORM.gawk?= /usr/bin/gawk
+. endif
.else
+. if exists(/bin/awk)
+TOOLS_PLATFORM.gawk?= /bin/awk
+. else
TOOLS_PLATFORM.gawk?= /usr/bin/awk
+. endif
.endif
.if exists(/usr/bin/gettext)
TOOLS_PLATFORM.gettext?= /usr/bin/gettext