xref: /minix3/tools/Makefile.gnuwrap (revision c8a0e2f4c688362b79ef1474cea604c8ebd6045d)
1*c8a0e2f4SThomas Veerman#	$NetBSD: Makefile.gnuwrap,v 1.9 2003/03/14 05:22:51 thorpej Exp $
2*c8a0e2f4SThomas Veerman#
3*c8a0e2f4SThomas Veerman# Wrapper for GNU Makefiles.
4*c8a0e2f4SThomas Veerman
5*c8a0e2f4SThomas Veerman.ifndef _WRAPPER_INCLUDED
6*c8a0e2f4SThomas Veerman_WRAPPER_INCLUDED=1
7*c8a0e2f4SThomas Veerman
8*c8a0e2f4SThomas Veerman.ifndef _NOWRAPPER
9*c8a0e2f4SThomas Veerman.include "${.CURDIR}/Makefile"
10*c8a0e2f4SThomas Veerman.endif
11*c8a0e2f4SThomas Veerman
12*c8a0e2f4SThomas Veerman# Prevent targets in source directories from being rebuilt.
13*c8a0e2f4SThomas Veerman
14*c8a0e2f4SThomas Veerman_srcdir:=	${srcdir}
15*c8a0e2f4SThomas Veerman.MADE:		${.ALLTARGETS:M${_srcdir}/*} Makefile
16*c8a0e2f4SThomas Veerman
17*c8a0e2f4SThomas Veerman# Don't rebuild .gmo files, or lex/yacc (which GNU puts in the source tree).
18*c8a0e2f4SThomas Veerman.po.gmo .l.c .y.c .y.h .x.1:
19*c8a0e2f4SThomas Veerman	@true
20*c8a0e2f4SThomas Veerman
21*c8a0e2f4SThomas Veerman# Make sure this file gets re-loaded recursively.
22*c8a0e2f4SThomas Veerman.ifndef _NOWRAPPER
23*c8a0e2f4SThomas Veerman# Some systems have a small ARG_MAX.  On such systems, prevent Make
24*c8a0e2f4SThomas Veerman# variables set on the command line from being exported in the
25*c8a0e2f4SThomas Veerman# environment (they will still be set in MAKEOVERRIDES).
26*c8a0e2f4SThomas VeermanBUILD_OSTYPE!=  uname -s
27*c8a0e2f4SThomas Veerman.if ${BUILD_OSTYPE} == "Darwin" || ${BUILD_OSTYPE} == "FreeBSD"
28*c8a0e2f4SThomas Veerman__noenvexport=  -X
29*c8a0e2f4SThomas Veerman.endif
30*c8a0e2f4SThomas Veerman_GNUWRAPPER:=	${.PARSEDIR}/${.PARSEFILE}
31*c8a0e2f4SThomas VeermanMAKE:=		${MAKE} ${__noenvexport} -f ${_GNUWRAPPER}
32*c8a0e2f4SThomas Veerman.endif
33*c8a0e2f4SThomas Veerman.endif
34