2009-12-21 21:21:17 +03:00
|
|
|
# $NetBSD: Makefile.disklabel,v 1.14 2009/12/21 18:21:17 thorpej Exp $
|
2008-10-26 02:15:28 +04:00
|
|
|
|
|
|
|
# NOxxx definitions are copied from Makefile.host, and are
|
|
|
|
# required before .include <bsd.own.mk>. The include of bsd.own.mk
|
|
|
|
# itself is required to get definitions of TOOL_* variables used in
|
|
|
|
# "!=" variable assignments (which are performed early).
|
|
|
|
#
|
|
|
|
NOINFO= # defined
|
|
|
|
NOLINT= # defined
|
|
|
|
NOMAN= # defined
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.
To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
2005-06-12 23:46:15 +04:00
|
|
|
|
|
|
|
_ARCHDIR= ${.CURDIR}/../../sys/arch
|
2005-06-23 01:35:28 +04:00
|
|
|
_INCDIR= ${.CURDIR}/../../include
|
Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.
To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
2005-06-12 23:46:15 +04:00
|
|
|
_SYSDIR= ${.CURDIR}/../../sys/sys
|
2006-02-14 07:59:33 +03:00
|
|
|
_UFSDIR= ${.CURDIR}/../../sys/ufs
|
Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.
To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
2005-06-12 23:46:15 +04:00
|
|
|
_SUBDIR!= cd ${_ARCHDIR} && ${MAKE} -V SUBDIR
|
|
|
|
|
2008-10-26 02:15:28 +04:00
|
|
|
.if make(depend) || make(all) || make(dependall) || make(install)
|
|
|
|
# There's no need to run these commands for "make cleandir" or "make obj",
|
|
|
|
# and TOOL_SED will not yet have been built.
|
2006-02-14 07:59:33 +03:00
|
|
|
_UFS_INCS!= cd ${_UFSDIR} && find ffs ufs -name '*.h'
|
2008-10-26 02:15:28 +04:00
|
|
|
_ARCH_INCS!= ${TOOL_SED} -e 's/^\#.*//' ${.CURDIR}/../headerlist
|
|
|
|
.endif
|
Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.
To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
2005-06-12 23:46:15 +04:00
|
|
|
|
2005-12-29 18:35:19 +03:00
|
|
|
_ARCH_INCS+= ews4800mips/include/pdinfo.h ews4800mips/include/vtoc.h
|
|
|
|
|
2005-06-23 01:35:28 +04:00
|
|
|
_INCS= disktab.h
|
|
|
|
_SYSINCS= bootblock.h \
|
2009-09-14 17:44:05 +04:00
|
|
|
disklabel.h disklabel_acorn.h disklabel_gpt.h disklabel_rdb.h \
|
2009-12-21 21:21:17 +03:00
|
|
|
dkbad.h \
|
|
|
|
exec_elf.h
|
Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.
To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
2005-06-12 23:46:15 +04:00
|
|
|
|
|
|
|
HOST_CPPFLAGS+= -I${TOOLDIR}/include
|
|
|
|
|
2005-10-04 08:56:19 +04:00
|
|
|
beforedepend:
|
Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.
To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
2005-06-12 23:46:15 +04:00
|
|
|
${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude
|
|
|
|
${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/sys
|
2006-02-14 07:59:33 +03:00
|
|
|
${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/ufs
|
Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.
To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
2005-06-12 23:46:15 +04:00
|
|
|
cd ${_ARCHDIR} && \
|
|
|
|
${TOOL_PAX} -s /include\\/// -rw ${_ARCH_INCS} \
|
|
|
|
${TOOLDIR}/include/nbinclude
|
2005-06-23 01:35:28 +04:00
|
|
|
cd ${_INCDIR} && \
|
|
|
|
${TOOL_PAX} -rw ${_INCS} ${TOOLDIR}/include/nbinclude
|
Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.
To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
2005-06-12 23:46:15 +04:00
|
|
|
cd ${_SYSDIR} && \
|
2005-06-23 01:35:28 +04:00
|
|
|
${TOOL_PAX} -rw ${_SYSINCS} ${TOOLDIR}/include/nbinclude/sys
|
2006-02-14 07:59:33 +03:00
|
|
|
cd ${_UFSDIR} && \
|
|
|
|
${TOOL_PAX} -rw ${_UFS_INCS} ${TOOLDIR}/include/nbinclude/ufs
|
Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.
To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
2005-06-12 23:46:15 +04:00
|
|
|
cd ${TOOLDIR}/include/nbinclude && rm -f machine && \
|
|
|
|
${HOST_INSTALL_SYMLINK} ${MACHINE} machine
|