[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.19, Sun Aug 10 05:56:36 2014 UTC (9 years, 8 months ago) by matt
Branch: MAIN
CVS Tags: tls-maxphys-base, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, HEAD
Changes since 1.18: +9 -3 lines

Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only.  While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.

#	$NetBSD: Makefile.makedev,v 1.19 2014/08/10 05:56:36 matt Exp $
#
# Makefile snippet to add ${MAKEDEVTARGETS} devices to the mtree list
# (if set), otherwise copy .OBJDIR-of-etc/MAKEDEV to ./dev
#
# If this is to be used with Makefile.image, then this file should be
# .include-d first.
#
# 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 .OBJDIR-of-etc/MAKEDEV
#
# Variables modified by this:
#	MAKEDEVSCRIPT	path to .OBJDIR-of-etc/MAKEDEV
#	MTREECONF	may get "devices.spec" added
#	LISTS		may get "list.makedev" added
#	IMAGEDEPENDS	may get ${MAKEDEVSCRIPT} added
#	PARSELISTENV	may get MAKEDEVSCRIPT=... added
#

.if !defined(_MAKEFILE_MAKEDEV_)
_MAKEFILE_MAKEDEV_=1


MAKEDEVSPEC?=	devices.spec

_MAKEDEVOBJDIR!=cd ${NETBSDSRCDIR}/etc && ${PRINTOBJDIR}
MAKEDEVSCRIPT=	${_MAKEDEVOBJDIR}/MAKEDEV

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
#
MTREECONF+=	${MAKEDEVSPEC}

.if exists(${NETBSDSRCDIR}/etc/etc.${MACHINE_CPU}/MAKEDEV.conf)
MAKEDEV_MACHINE=${MACHINE_CPU}
.else
MAKEDEV_MACHINE=${MACHINE}
.endif

${MAKEDEVSPEC}:	${MAKEDEVSCRIPT} Makefile \
		${NETBSDSRCDIR}/etc/etc.${MAKEDEV_MACHINE}/MAKEDEV.conf
		
	${_MKTARGET_CREATE}
	rm -f ${.TARGET} ${.TARGET}.tmp
	MACHINE=${MAKEDEV_MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
	    ${HOST_SH} ${MAKEDEVSCRIPT} -s ${MAKEDEVTARGETS} \
	    > ${.TARGET}.tmp
	${TOOL_SED} -e '/^\. type=dir/d' -e 's,^\.,./dev,' ${.TARGET}.tmp \
	    | sort -o ${.TARGET}

.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+=	${MAKEDEVSCRIPT}
PARSELISTENV+=	MAKEDEVSCRIPT=${MAKEDEVSCRIPT:Q}

${MAKEDEVSPEC}:	.PHONY

.endif	# ! MAKEDEVTARGETS


.endif	# _MAKEFILE_MAKEDEV_