Subject: how to enforce the use of GNU awk?
To: Discussion List NetBSD Packages Technical <tech-pkg@netbsd.org>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: tech-pkg
Date: 08/13/2006 18:38:59
With databases/mysql4-client there's the problem on IRIX 5 that IRIX
5's nawk when launched as AWK in mk/configure/configure.mk cannot
handle some lines in the configure script as they are too large for
that implementation:
===> Configuring for mysql-client-4.1.20
=> Modifying GNU configure scripts to avoid --recheck
Input record `ac_subst_vars='SHELL...' too long
Input record number 479, file configure
Source line number 1
*** Error code 2
Stop.
Now what is the appropriate way to enforce the use of GNU awk as AWK
for that package (on IRIX 5 only)?
I added the following lines to the Makefile, which seem to do the trick:
.include "../../mk/bsd.prefs.mk"
.if !empty(LOWER_OPSYS:Mirix5*)
# the configure script has some lines too long for IRIX 5's nawk
USE_TOOLS+=awk
TOOLS_PLATFORM.awk= ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}awk
TOOLS_CMD.awk= ${TOOLS_DIR}/bin/awk
BUILD_DEPENDS+= gawk>=0:../../lang/gawk
.endif
Should I better place this into a separate hacks.mk?
Is there a more appropriate solution?
--
Georg Schwarz http://home.pages.de/~schwarz/
georg.schwarz@freenet.de +49 178 8545053