Add the program's CPPFLAGS to HOST_CPPFLAGS using make(1)'s normal

lazy evaluation semantics, not the "assign it now" semantics.  This
allows variables used in the program's CPPFLAGS to get the correct
values of e.g. MACHINE, MACHINE_ARCH, MACHINE_CPU, etc.

Problem was notices when propagating MACHINE and MACHINE_ARCH via
MAKEFLAGS (i.e. from the command line, rather than the environment).

For this to work, make sure you <bsd.hostprog.mk> is at least rev 1.15.
This commit is contained in:
thorpej 2001-10-25 01:25:02 +00:00
parent 4cd6ce7ea8
commit e39fae1aff

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.host,v 1.4 2001/10/25 00:36:26 thorpej Exp $
# $NetBSD: Makefile.host,v 1.5 2001/10/25 01:25:02 thorpej Exp $
# Preload <bsd.obj.mk> to set up obj rules (with proper ${.CURDIR}).
.include <bsd.obj.mk>
@ -24,7 +24,8 @@ HOSTPROG?= ${PROG}
HOSTPROGNAME?= ${HOSTPROG}
HOST_BINDIR?= ${TOOLDIR}/bin
HOST_CPPFLAGS:= -include ${_CURDIR}/../compat/compat_netbsd.h -Wall \
${HOST_CPPFLAGS} ${CPPFLAGS}
${HOST_CPPFLAGS}
HOST_CPPFLAGS+= ${CPPFLAGS}
MKMAN= no
SRCS?= ${PROG}.c
SRCS+= ${HOST_SRCS} nb_progname.c