NetBSD/tools/Makefile.disklabel
he 0ec45ddeab Fix the toolification of disklabel by using the nbinclude namespace
under HAVE_NBTOOL_CONFIG_H for disktab.h as well.  This means
disktab.h has to be installed in the nbinclude include directory.

(Failure mode: with TOOLDIR as a subdirectory of /usr, the host's disktab.h
got picked up, and not the in-tree copy.)

Reviewed by dyoung.
2005-06-22 21:35:28 +00:00

28 lines
906 B
Makefile

# $NetBSD: Makefile.disklabel,v 1.2 2005/06/22 21:35:28 he Exp $
_ARCHDIR= ${.CURDIR}/../../sys/arch
_INCDIR= ${.CURDIR}/../../include
_SYSDIR= ${.CURDIR}/../../sys/sys
_SUBDIR!= cd ${_ARCHDIR} && ${MAKE} -V SUBDIR
_ARCH_INCS!= cd ${_ARCHDIR} && find . -name disklabel.h
_INCS= disktab.h
_SYSINCS= bootblock.h \
disklabel.h disklabel_acorn.h disklabel_gpt.h dkbad.h
HOST_CPPFLAGS+= -I${TOOLDIR}/include
beforedepend:
${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude
${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/sys
cd ${_ARCHDIR} && \
${TOOL_PAX} -s /include\\/// -rw ${_ARCH_INCS} \
${TOOLDIR}/include/nbinclude
cd ${_INCDIR} && \
${TOOL_PAX} -rw ${_INCS} ${TOOLDIR}/include/nbinclude
cd ${_SYSDIR} && \
${TOOL_PAX} -rw ${_SYSINCS} ${TOOLDIR}/include/nbinclude/sys
cd ${TOOLDIR}/include/nbinclude && rm -f machine && \
${HOST_INSTALL_SYMLINK} ${MACHINE} machine