[BACK]Return to hacks.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / lang / gforth

File: [cvs.NetBSD.org] / pkgsrc / lang / gforth / hacks.mk (download)

Revision 1.1, Thu Jun 28 07:44:39 2012 UTC (7 years, 10 months ago) by dholland
Branch: MAIN
CVS Tags: pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2, HEAD

Fail the build if on NetBSD and /usr/bin/m4 is one of the buggy
versions that loops chewing memory.

# $NetBSD: hacks.mk,v 1.1 2012/06/28 07:44:39 dholland Exp $

.include "../../mk/bsd.prefs.mk"

#
# A bug in the offending versions (listed below) in main.c of NetBSD's
# m4 causes the build to loop forever allocating memory, and thus
# exhaust swap. Note that these versions were never in a release, but
# their existence did span most of the 5.99.x period and early
# netbsd-6 prereleases. Therefore, updating the broken system binary
# is the best course of action. Note that because TOOLS_PATH.m4 does
# not get defined early enough it does not seem to be possible to set
# PKG_FAIL_REASON.
#

.if ${OPSYS} == "NetBSD"
pre-configure:
	@${ECHO} '=> Checking ${TOOLS_PATH.m4}'
	@set -e;							\
	m4_main_ver=`ident ${TOOLS_PATH.m4} |				\
			grep 'NetBSD: main.c' |				\
			awk '{print $$3}'`;				\
	case "$$m4_main_ver" in						\
		1.38|1.39]|1.40|1.41)					\
			${ECHO} "${TOOLS_PATH.m4} contains main.c"	\
				"$$m4_main_ver.";			\
			${ECHO} "Building this package using"		\
				"${TOOLS_PATH.m4} will run out of swap.";\
			${ECHO} "Please update ${TOOLS_PATH.m4} from CVS.";\
			exit 1;						\
		;;							\
	esac
.endif