minix/tools/Makefile.nbincludes
Lionel Sambuc 9152e1c5a7 Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
 * tools
 * distribution
 * sets
 * release

The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.

For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.

Regarding new or modifications of Makefiles a few things:
 * Read share/mk/bsd.README
 * If you add a subdirectory, add a Makefile in it, and have it called
   by the parent through the SUBDIR variable.
 * Do not add arbitrary inclusion which crosses to another branch of
   the hierarchy; If you can't do without it, put a comment on why.
   If possible, do not use inclusion at all.
 * Use as much as possible the infrastructure, it is here to make
   life easier, do not fight it.

Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-11-15 16:07:29 +01:00

54 lines
1.8 KiB
Makefile

# $NetBSD: Makefile.nbincludes,v 1.3 2012/08/05 06:20:14 christos Exp $
# 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>
_ARCHDIR= ${.CURDIR}/../../sys/arch
_INCDIR= ${.CURDIR}/../../include
_SYSDIR= ${.CURDIR}/../../sys/sys
_UFSDIR= ${.CURDIR}/../../sys/ufs
_SUBDIR!= cd ${_ARCHDIR} && ${MAKE} -V SUBDIR
.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.
_UFS_INCS!= cd ${_UFSDIR} && find ffs ufs -name '*.h'
_ARCH_INCS!= ${TOOL_SED} -e 's/^\#.*//' ${.CURDIR}/../headerlist
.endif
_ARCH_INCS+= ews4800mips/include/pdinfo.h ews4800mips/include/vtoc.h
_INCS= disktab.h
_SYSINCS= bootblock.h \
disklabel.h disklabel_acorn.h disklabel_gpt.h disklabel_rdb.h \
dkbad.h \
exec_elf.h
HOST_CPPFLAGS+= -I${TOOLDIR}/include -I${TOOLDIR}/include/nbinclude
beforedepend:
${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude
${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/sys
${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/ufs
.if !defined(__MINIX)
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 ${_UFSDIR} && \
${TOOL_PAX} -rw ${_UFS_INCS} ${TOOLDIR}/include/nbinclude/ufs
.endif
cd ${TOOLDIR}/include/nbinclude && rm -f machine && \
${HOST_INSTALL_SYMLINK} ${MACHINE} machine