Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/distrib/common/Makefile.makedev,v rcsdiff: /ftp/cvs/cvsroot/src/distrib/common/Makefile.makedev,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.2.2.1 retrieving revision 1.12 diff -u -p -r1.2.2.1 -r1.12 --- src/distrib/common/Makefile.makedev 2002/06/02 01:21:59 1.2.2.1 +++ src/distrib/common/Makefile.makedev 2007/03/01 09:20:59 1.12 @@ -1,23 +1,37 @@ -# $NetBSD: Makefile.makedev,v 1.2.2.1 2002/06/02 01:21:59 tv Exp $ +# $NetBSD: Makefile.makedev,v 1.12 2007/03/01 09:20:59 apb Exp $ # # Makefile snippet to add ${MAKEDEVTARGETS} devices to the mtree list -# (if set), otherwise copy etc.${MACHINE}/MAKEDEV to ./dev +# (if set), otherwise copy .OJBDIR-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 ) # MACHINE machine name (set externally by build framework) # # Optional variables: -# MAKEDEVTARGETS targets to create with etc/etc.${MACHINE}/MAKEDEV +# MAKEDEVTARGETS targets to create with .OBJDIR-of-etc/MAKEDEV # # Variables modified by this: -# MTREECONF may get "devices.spec" added to it +# MAKEDEVSCRIPT path to .OBJDIR-of-etc/MAKEDEV +# MAKEDEVSUBR path to .OBJDIR-of-etc/MAKEDEV.subr +# MTREECONF may get "devices.spec" added +# LISTS may get "list.makedev" added +# IMAGEDEPENDS may get ${MAKEDEVSCRIPT} and ${MAKEDEVSUBR} added +# PARSELISTENV may get MAKEDEVSCRIPT=... and MAKEDEVSUBR=... added # +.if !defined(_MAKEFILE_MAKEDEV_) +_MAKEFILE_MAKEDEV_=1 + + MAKEDEVSPEC?= devices.spec +_MAKEDEVOBJDIR!=cd ${NETBSDSRCDIR}/etc && ${PRINTOBJDIR} +MAKEDEVSCRIPT= ${_MAKEDEVOBJDIR}/MAKEDEV +MAKEDEVSUBR= ${_MAKEDEVOBJDIR}/MAKEDEV.subr + CLEANFILES+= ${MAKEDEVSPEC} ${MAKEDEVSPEC}.tmp @@ -27,17 +41,14 @@ CLEANFILES+= ${MAKEDEVSPEC} ${MAKEDEVSPE # 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} +${MAKEDEVSPEC}: ${MAKEDEVSCRIPT} ${MAKEDEVSUBR} + ${_MKTARGET_CREATE} -rm -f ${.TARGET} ${.TARGET}.tmp - MAKEDEVSCRIPT=${_MAKEDEVSCRIPT:Q} \ - sh ${_MAKEDEVWRAP} ${MAKEDEVTARGETS} | \ - awk -f ${_MAKEDEV2SPEC} > ${.TARGET}.tmp \ + MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \ + ${HOST_SH} ${MAKEDEVSCRIPT} -s ${MAKEDEVTARGETS} \ + | sed -e '/^\. type=dir/d' -e 's,^\.,./dev,' > ${.TARGET}.tmp \ && sort -o ${.TARGET} ${.TARGET}.tmp .else # ! MAKEDEVTARGETS @@ -48,8 +59,13 @@ ${MAKEDEVSPEC}: ${_MAKEDEVSCRIPT} ${_MAK # (effectively) running "cd /dev ; ./MAKEDEV all" # LISTS+= ${DISTRIBDIR}/common/list.makedev -IMAGEDEPENDS+= ${NETBSDSRCDIR}/etc/etc.${MACHINE}/MAKEDEV +IMAGEDEPENDS+= ${MAKEDEVSCRIPT} ${MAKEDEVSUBR} +PARSELISTENV+= MAKEDEVSCRIPT=${MAKEDEVSCRIPT:Q} +PARSELISTENV+= MAKEDEVSUBR=${MAKEDEVSUBR:Q} ${MAKEDEVSPEC}: .PHONY .endif # ! MAKEDEVTARGETS + + +.endif # _MAKEFILE_MAKEDEV_