xref: /netbsd/tools/Makefile.gnuwrap (revision d2809fcf)
1*d2809fcfSthorpej#	$NetBSD: Makefile.gnuwrap,v 1.9 2003/03/14 05:22:51 thorpej Exp $
2b5cd2489Stv#
3b5cd2489Stv# Wrapper for GNU Makefiles.
4b5cd2489Stv
56937675dStv.ifndef _WRAPPER_INCLUDED
66937675dStv_WRAPPER_INCLUDED=1
706be8101Stv
88753b7b6Stv.ifndef _NOWRAPPER
9b5cd2489Stv.include "${.CURDIR}/Makefile"
108753b7b6Stv.endif
11b5cd2489Stv
12b5cd2489Stv# Prevent targets in source directories from being rebuilt.
13b5cd2489Stv
14b5cd2489Stv_srcdir:=	${srcdir}
15c1cbb7c3Stv.MADE:		${.ALLTARGETS:M${_srcdir}/*} Makefile
16c1cbb7c3Stv
17b5cd2489Stv# Don't rebuild .gmo files, or lex/yacc (which GNU puts in the source tree).
1806be8101Stv.po.gmo .l.c .y.c .y.h .x.1:
199a35e17eSjmc	@true
20aab33a26Stv
21aab33a26Stv# Make sure this file gets re-loaded recursively.
228753b7b6Stv.ifndef _NOWRAPPER
23*d2809fcfSthorpej# Some systems have a small ARG_MAX.  On such systems, prevent Make
24*d2809fcfSthorpej# variables set on the command line from being exported in the
25*d2809fcfSthorpej# environment (they will still be set in MAKEOVERRIDES).
26*d2809fcfSthorpejBUILD_OSTYPE!=  uname -s
27*d2809fcfSthorpej.if ${BUILD_OSTYPE} == "Darwin" || ${BUILD_OSTYPE} == "FreeBSD"
28*d2809fcfSthorpej__noenvexport=  -X
29*d2809fcfSthorpej.endif
30aab33a26Stv_GNUWRAPPER:=	${.PARSEDIR}/${.PARSEFILE}
31*d2809fcfSthorpejMAKE:=		${MAKE} ${__noenvexport} -f ${_GNUWRAPPER}
328753b7b6Stv.endif
336937675dStv.endif
34