[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.5

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

CVSweb <webmaster@jp.NetBSD.org>