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

Annotation of src/distrib/common/Makefile.makedev, Revision 1.4

1.4     ! lukem       1: #      $NetBSD: Makefile.makedev,v 1.3 2002/06/01 16:22:54 lukem Exp $
1.1       lukem       2: #
                      3: # Makefile snippet to add ${MAKEDEVTARGETS} devices to the mtree list
                      4: # (if set), otherwise copy etc.${MACHINE}/MAKEDEV to ./dev
1.4     ! lukem       5: #
        !             6: # If this is to be used with Makefile.image, then this file should be
        !             7: # .include-d first.
1.1       lukem       8: #
                      9:
                     10: #
                     11: # Required variables:
1.2       lukem      12: #      NETBSDSRCDIR    top level of src tree (set by <bsd.own.mk>)
1.1       lukem      13: #      MACHINE         machine name (set externally by build framework)
                     14: #
                     15: # Optional variables:
                     16: #      MAKEDEVTARGETS  targets to create with etc/etc.${MACHINE}/MAKEDEV
                     17: #
                     18: # Variables modified by this:
                     19: #      MTREECONF       may get "devices.spec" added to it
                     20: #
                     21:
                     22: MAKEDEVSPEC?=  devices.spec
                     23:
                     24: CLEANFILES+=   ${MAKEDEVSPEC} ${MAKEDEVSPEC}.tmp
                     25:
                     26:
                     27: .if defined(MAKEDEVTARGETS)
                     28:
                     29: #
                     30: #      MAKEDEVTARGETS is set; add those devices to the mtree spec that's
                     31: #      used to build the file system
                     32: #
1.2       lukem      33: _MAKEDEVSCRIPT=        ${NETBSDSRCDIR}/etc/etc.${MACHINE}/MAKEDEV
1.1       lukem      34: _MAKEDEVWRAP=  ${DISTRIBDIR}/common/MAKEDEV.wrapper
                     35: _MAKEDEV2SPEC= ${DISTRIBDIR}/common/makedev2spec.awk
                     36:
                     37: MTREECONF+=    ${MAKEDEVSPEC}
                     38:
                     39: ${MAKEDEVSPEC}:        ${_MAKEDEVSCRIPT} ${_MAKEDEVWRAP} ${_MAKEDEV2SPEC}
                     40:        -rm -f ${.TARGET} ${.TARGET}.tmp
                     41:        MAKEDEVSCRIPT=${_MAKEDEVSCRIPT:Q} \
                     42:            sh ${_MAKEDEVWRAP} ${MAKEDEVTARGETS} | \
                     43:            awk -f ${_MAKEDEV2SPEC} > ${.TARGET}.tmp \
                     44:        && sort -o ${.TARGET} ${.TARGET}.tmp
                     45:
                     46: .else  # ! MAKEDEVTARGETS
                     47:
                     48: #
                     49: #      MAKEDEVTARGETS isn't set; copy in /dev/MAKEDEV and rely upon
1.3       lukem      50: #      init(8) to mount an mfs /dev and recreate the devices by
                     51: #      (effectively) running "cd /dev ; ./MAKEDEV all"
1.1       lukem      52: #
                     53: LISTS+=                ${DISTRIBDIR}/common/list.makedev
1.2       lukem      54: IMAGEDEPENDS+= ${NETBSDSRCDIR}/etc/etc.${MACHINE}/MAKEDEV
1.1       lukem      55:
                     56: ${MAKEDEVSPEC}:        .PHONY
                     57:
                     58: .endif # ! MAKEDEVTARGETS

CVSweb <webmaster@jp.NetBSD.org>