[BACK]Return to Makefile.makedev CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / distrib / common

File: [cvs.NetBSD.org] / src / distrib / common / Makefile.makedev (download)

Revision 1.2.2.1, Sun Jun 2 01:21:59 2002 UTC (17 years, 4 months ago) by tv
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.2: +3 -2 lines

Pull up revision 1.3 (requested by lukem in ticket #126):
correct a comment

#	$NetBSD: Makefile.makedev,v 1.2.2.1 2002/06/02 01:21:59 tv Exp $
#
# Makefile snippet to add ${MAKEDEVTARGETS} devices to the mtree list
# (if set), otherwise copy etc.${MACHINE}/MAKEDEV to ./dev
#

#
# Required variables:
#	NETBSDSRCDIR	top level of src tree (set by <bsd.own.mk>)
#	MACHINE		machine name (set externally by build framework)
#
# Optional variables:
#	MAKEDEVTARGETS	targets to create with etc/etc.${MACHINE}/MAKEDEV
#
# Variables modified by this:
#	MTREECONF	may get "devices.spec" added to it
#

MAKEDEVSPEC?=	devices.spec

CLEANFILES+=	${MAKEDEVSPEC} ${MAKEDEVSPEC}.tmp


.if defined(MAKEDEVTARGETS)

#
#	MAKEDEVTARGETS is set; add those devices to the mtree spec that's
#	used to build the file system
#
_MAKEDEVSCRIPT=	${NETBSDSRCDIR}/etc/etc.${MACHINE}/MAKEDEV
_MAKEDEVWRAP=	${DISTRIBDIR}/common/MAKEDEV.wrapper
_MAKEDEV2SPEC=	${DISTRIBDIR}/common/makedev2spec.awk

MTREECONF+=	${MAKEDEVSPEC}

${MAKEDEVSPEC}:	${_MAKEDEVSCRIPT} ${_MAKEDEVWRAP} ${_MAKEDEV2SPEC}
	-rm -f ${.TARGET} ${.TARGET}.tmp
	MAKEDEVSCRIPT=${_MAKEDEVSCRIPT:Q} \
	    sh ${_MAKEDEVWRAP} ${MAKEDEVTARGETS} | \
	    awk -f ${_MAKEDEV2SPEC} > ${.TARGET}.tmp \
	&& sort -o ${.TARGET} ${.TARGET}.tmp

.else	# ! MAKEDEVTARGETS

#
#	MAKEDEVTARGETS isn't set; copy in /dev/MAKEDEV and rely upon
#	init(8) to mount an mfs /dev and recreate the devices by
#	(effectively) running "cd /dev ; ./MAKEDEV all"
#
LISTS+=		${DISTRIBDIR}/common/list.makedev
IMAGEDEPENDS+=	${NETBSDSRCDIR}/etc/etc.${MACHINE}/MAKEDEV

${MAKEDEVSPEC}:	.PHONY

.endif	# ! MAKEDEVTARGETS