2013-12-06 12:04:52 +01:00
|
|
|
# $NetBSD: Makefile,v 1.24 2013/10/16 14:50:43 christos Exp $
|
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-09-12 09:37:05 +02:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
.if ${MKX11} != "no"
|
|
|
|
. if ${X11FLAVOUR} == "Xorg"
|
|
|
|
EXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist.Xorg
|
|
|
|
. else
|
|
|
|
EXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist.XFree86
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2013-04-24 18:57:59 +02:00
|
|
|
.if defined(__MINIX)
|
|
|
|
.if ${MKGCCCMDS} == "yes"
|
|
|
|
EXTRA_DIST_FILES+= ${.CURDIR}/Minix.gcccmds
|
|
|
|
.endif
|
|
|
|
.endif # defined(__MINIX)
|
|
|
|
|
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-09-12 09:37:05 +02:00
|
|
|
# XXX these are only used by compat currently, but they could be used
|
|
|
|
# by something else; this may need to be fixed properly in the future.
|
2013-08-26 04:07:42 +02:00
|
|
|
.if ${MKCOMPAT} != "no" || defined(__MINIX)
|
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-09-12 09:37:05 +02:00
|
|
|
.if exists(NetBSD.dist.${MACHINE_ARCH})
|
|
|
|
EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.${MACHINE_ARCH}
|
2013-12-06 12:04:52 +01:00
|
|
|
.elif !empty(MACHINE_ARCH:Mearm*)
|
|
|
|
EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.earm
|
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-09-12 09:37:05 +02:00
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${MKATF} != "no"
|
|
|
|
EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.tests
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${MKEXTSRC} != "no"
|
|
|
|
EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.extsrc
|
|
|
|
.endif
|
|
|
|
|
|
|
|
NetBSD.dist: NetBSD.dist.tmp
|
|
|
|
cmp -s NetBSD.dist.tmp NetBSD.dist || { \
|
|
|
|
echo "Updating NetBSD.dist"; \
|
|
|
|
mv NetBSD.dist.tmp NetBSD.dist; \
|
|
|
|
}
|
|
|
|
NetBSD.dist.tmp::
|
|
|
|
${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} > \
|
|
|
|
${.TARGET}
|
|
|
|
|
|
|
|
CONFIGFILES= NetBSD.dist special
|
|
|
|
FILESDIR= /etc/mtree
|
|
|
|
|
|
|
|
# distrib-dirs --
|
|
|
|
# Populate $DESTDIR with directories needed by NetBSD
|
|
|
|
#
|
|
|
|
.if ${MKUNPRIVED} == "no"
|
|
|
|
TOOL_MTREE.unpriv=
|
|
|
|
.else
|
|
|
|
TOOL_MTREE.unpriv= -W
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# postinstall(8) invokes this target to produce the right
|
|
|
|
# /etc/mtree/NetBSD.dist content without duplicating logic from
|
|
|
|
# the Makefile.
|
|
|
|
#
|
|
|
|
emit_dist_file:
|
2013-12-06 12:04:52 +01:00
|
|
|
@cat ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES}
|
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-09-12 09:37:05 +02:00
|
|
|
|
|
|
|
distrib-dirs: .PHONY check_DESTDIR NetBSD.dist
|
|
|
|
.if !defined(DISTRIBUTION_DONE) # {
|
|
|
|
# Create DESTDIR using HOST_INSTALL_DIR, not INSTALL_DIR, because
|
|
|
|
# INSTALL_DIR would want to write to the metalog, and it can't do that
|
|
|
|
# if the metalog is inside DESTDIR but DESTDIR doesn't yet exist.
|
|
|
|
${HOST_INSTALL_DIR} -m 755 ${DESTDIR}
|
|
|
|
# Invoke mtree to create the directories listed in NetBSD.dist;
|
|
|
|
# then invoke mtree again to register those directories in the metalog.
|
|
|
|
${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \
|
|
|
|
-p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv}
|
|
|
|
.if ${MKUNPRIVED} != "no" # {
|
|
|
|
${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \
|
|
|
|
-p ${DESTDIR}/ -C -k all | \
|
|
|
|
${TOOL_AWK} '/ optional/ {next} // {print}' | ${METALOG.add}
|
|
|
|
.endif # MKUNPRIVED # }
|
|
|
|
.endif # DISTRIBUTION_DONE # }
|
|
|
|
|
|
|
|
CLEANFILES+= NetBSD.dist NetBSD.dist.tmp
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|