Makefile.nbincludes revision 1.1
11.1Sriz#	$NetBSD: Makefile.nbincludes,v 1.1 2010/06/19 23:11:10 riz Exp $
21.1Sriz
31.1Sriz# NOxxx definitions are copied from Makefile.host, and are
41.1Sriz# required before .include <bsd.own.mk>.   The include of bsd.own.mk
51.1Sriz# itself is required to get definitions of TOOL_* variables used in
61.1Sriz# "!=" variable assignments (which are performed early).
71.1Sriz#
81.1SrizNOINFO=		# defined
91.1SrizNOLINT=		# defined
101.1SrizNOMAN=		# defined
111.1Sriz
121.1Sriz.include <bsd.own.mk>
131.1Sriz
141.1Sriz_ARCHDIR=	${.CURDIR}/../../sys/arch
151.1Sriz_INCDIR=	${.CURDIR}/../../include
161.1Sriz_SYSDIR=	${.CURDIR}/../../sys/sys
171.1Sriz_UFSDIR=	${.CURDIR}/../../sys/ufs
181.1Sriz_SUBDIR!=	cd ${_ARCHDIR} && ${MAKE} -V SUBDIR
191.1Sriz
201.1Sriz.if make(depend) || make(all) || make(dependall) || make(install)
211.1Sriz# There's no need to run these commands for "make cleandir" or "make obj",
221.1Sriz# and TOOL_SED will not yet have been built.
231.1Sriz_UFS_INCS!=	cd ${_UFSDIR} && find ffs ufs -name '*.h'
241.1Sriz_ARCH_INCS!=	${TOOL_SED} -e 's/^\#.*//' ${.CURDIR}/../headerlist
251.1Sriz.endif
261.1Sriz
271.1Sriz_ARCH_INCS+=	ews4800mips/include/pdinfo.h ews4800mips/include/vtoc.h
281.1Sriz
291.1Sriz_INCS=		disktab.h
301.1Sriz_SYSINCS=	bootblock.h \
311.1Sriz		ctype_bits.h \
321.1Sriz		disklabel.h disklabel_acorn.h disklabel_gpt.h disklabel_rdb.h \
331.1Sriz		dkbad.h \
341.1Sriz		exec_elf.h
351.1Sriz
361.1SrizHOST_CPPFLAGS+=	-I${TOOLDIR}/include
371.1Sriz
381.1Srizbeforedepend: 
391.1Sriz	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude
401.1Sriz	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/sys
411.1Sriz	${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/ufs
421.1Sriz	cd ${_ARCHDIR} && \
431.1Sriz	    ${TOOL_PAX} -s /include\\/// -rw ${_ARCH_INCS} \
441.1Sriz	    ${TOOLDIR}/include/nbinclude
451.1Sriz	cd ${_INCDIR} && \
461.1Sriz	    ${TOOL_PAX} -rw ${_INCS} ${TOOLDIR}/include/nbinclude
471.1Sriz	cd ${_SYSDIR} && \
481.1Sriz	    ${TOOL_PAX} -rw ${_SYSINCS} ${TOOLDIR}/include/nbinclude/sys
491.1Sriz	cd ${_UFSDIR} && \
501.1Sriz	    ${TOOL_PAX} -rw ${_UFS_INCS} ${TOOLDIR}/include/nbinclude/ufs
511.1Sriz	cd ${TOOLDIR}/include/nbinclude && rm -f machine && \
521.1Sriz	    ${HOST_INSTALL_SYMLINK} ${MACHINE} machine
53