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

Annotation of src/Makefile, Revision 1.318

1.318   ! christos    1: #      $NetBSD: Makefile,v 1.317 2016/01/14 02:51:25 christos Exp $
1.95      cjs         2:
1.193     lukem       3: #
1.95      cjs         4: # This is the top-level makefile for building NetBSD. For an outline of
                      5: # how to build a snapshot or release, as well as other release engineering
1.221     salo        6: # information, see http://www.NetBSD.org/developers/releng/index.html
1.95      cjs         7: #
                      8: # Not everything you can set or do is documented in this makefile. In
                      9: # particular, you should review the files in /usr/share/mk (especially
                     10: # bsd.README) for general information on building programs and writing
                     11: # Makefiles within this structure, and see the comments in src/etc/Makefile
                     12: # for further information on installation and release set options.
                     13: #
                     14: # Variables listed below can be set on the make command line (highest
                     15: # priority), in /etc/mk.conf (middle priority), or in the environment
                     16: # (lowest priority).
                     17: #
                     18: # Variables:
1.101     sommerfe   19: #   DESTDIR is the target directory for installation of the compiled
                     20: #      software. It defaults to /. Note that programs are built against
                     21: #      libraries installed in DESTDIR.
1.214     lukem      22: #   MKMAN, if `no', will prevent building of manual pages.
                     23: #   MKOBJDIRS, if not `no', will build object directories at
1.101     sommerfe   24: #      an appropriate point in a build.
1.214     lukem      25: #   MKSHARE, if `no', will prevent building and installing
1.95      cjs        26: #      anything in /usr/share.
1.214     lukem      27: #   MKUPDATE, if not `no', will avoid a `make cleandir' at the start of
1.178     enami      28: #      `make build', as well as having the effects listed in
                     29: #      /usr/share/mk/bsd.README.
1.125     mrg        30: #   NOCLEANDIR, if defined, will avoid a `make cleandir' at the start
1.178     enami      31: #      of the `make build'.
1.119     toddpw     32: #   NOINCLUDES will avoid the `make includes' usually done by `make build'.
1.95      cjs        33: #
1.214     lukem      34: #   See mk.conf(5) for more details.
                     35: #
                     36: #
1.95      cjs        37: # Targets:
1.137     tv         38: #   build:
1.196     lukem      39: #      Builds a full release of NetBSD in DESTDIR, except for the
                     40: #      /etc configuration files.
                     41: #      If BUILD_DONE is set, this is an empty target.
                     42: #   distribution:
                     43: #      Builds a full release of NetBSD in DESTDIR, including the /etc
                     44: #      configuration files.
                     45: #   buildworld:
                     46: #      As per `make distribution', except that it ensures that DESTDIR
                     47: #      is not the root directory.
                     48: #   installworld:
                     49: #      Install the distribution from DESTDIR to INSTALLWORLDDIR (which
                     50: #      defaults to the root directory).  Ensures that INSTALLWORLDDIR
1.291     abs        51: #      is not the root directory if cross compiling.
1.137     tv         52: #   release:
1.240     lukem      53: #      Does a `make distribution', and then tars up the DESTDIR files
1.252     lukem      54: #      into ${RELEASEDIR}/${RELEASEMACHINEDIR}, in release(7) format.
1.196     lukem      55: #      (See etc/Makefile for more information on this.)
1.137     tv         56: #   regression-tests:
                     57: #      Runs the regression tests in "regress" on this host.
1.206     lukem      58: #   sets:
1.252     lukem      59: #      Populate ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets
                     60: #      from ${DESTDIR}
1.206     lukem      61: #   sourcesets:
                     62: #      Populate ${RELEASEDIR}/source/sets from ${NETBSDSRCDIR}
1.241     apb        63: #   syspkgs:
1.252     lukem      64: #      Populate ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/syspkgs
                     65: #      from ${DESTDIR}
1.243     apb        66: #   iso-image:
1.311     snj        67: #      Create CD-ROM image in RELEASEDIR/images.
1.243     apb        68: #      RELEASEDIR must already have been populated by `make release'
                     69: #      or equivalent.
1.248     jnemeth    70: #   iso-image-source:
1.311     snj        71: #      Create CD-ROM image with source in RELEASEDIR/images.
1.248     jnemeth    72: #      RELEASEDIR must already have been populated by
                     73: #      `make release sourcesets' or equivalent.
1.290     tsutsui    74: #   live-image:
                     75: #      Create bootable live image for emulators or USB stick etc.
                     76: #      in RELEASEDIR/liveimage.
                     77: #      RELEASEDIR must already have been populated by `make release'
                     78: #      or equivalent.
                     79: #   install-image:
                     80: #      Create bootable installation image for USB stick etc.
                     81: #      in RELEASEDIR/installimage.
                     82: #      RELEASEDIR must already have been populated by `make release'
                     83: #      or equivalent.
1.123     mrg        84: #
1.137     tv         85: # Targets invoked by `make build,' in order:
1.155     tv         86: #   cleandir:        cleans the tree.
1.261     apb        87: #   do-top-obj:      creates the top level object directory.
1.260     apb        88: #   do-tools-obj:    creates object directories for the host toolchain.
                     89: #   do-tools:        builds host toolchain.
1.300     apb        90: #   params:          record the values of variables that might affect the
                     91: #                    build.
1.137     tv         92: #   obj:             creates object directories.
1.208     lukem      93: #   do-distrib-dirs: creates the distribution directories.
                     94: #   includes:        installs include files.
1.299     joerg      95: #   do-lib:          builds and installs prerequisites from lib
1.262     mrg        96: #                    if ${MKCOMPAT} != "no".
1.299     joerg      97: #   do-compat-lib:   builds and installs prerequisites from compat/lib
1.262     mrg        98: #                    if ${MKCOMPAT} != "no".
1.137     tv         99: #   do-build:        builds and installs the entire system.
1.263     mrg       100: #   do-x11:          builds and installs X11 if ${MKX11} != "no"; either
1.316     mrg       101: #                    X11R7 from src/external/mit/xorg
1.275     uebayasi  102: #   do-extsrc:       builds and installs extsrc if ${MKEXTSRC} != "no".
1.222     lukem     103: #   do-obsolete:     installs the obsolete sets (for the postinstall-* targets).
1.193     lukem     104: #
1.32      cgd       105:
1.146     tv        106: .if ${.MAKEFLAGS:M${.CURDIR}/share/mk} == ""
                    107: .MAKEFLAGS: -m ${.CURDIR}/share/mk
                    108: .endif
1.163     tv        109:
1.193     lukem     110: #
1.163     tv        111: # If _SRC_TOP_OBJ_ gets set here, we will end up with a directory that may
                    112: # not be the top level objdir, because "make obj" can happen in the *middle*
                    113: # of "make build" (long after <bsd.own.mk> is calculated it).  So, pre-set
                    114: # _SRC_TOP_OBJ_ here so it will not be added to ${.MAKEOVERRIDES}.
1.193     lukem     115: #
1.163     tv        116: _SRC_TOP_OBJ_=
1.148     jmc       117:
1.146     tv        118: .include <bsd.own.mk>
1.4       cgd       119:
1.193     lukem     120: #
1.137     tv        121: # Sanity check: make sure that "make build" is not invoked simultaneously
                    122: # with a standard recursive target.
1.193     lukem     123: #
1.137     tv        124:
                    125: .if make(build) || make(release) || make(snapshot)
                    126: .for targ in ${TARGETS:Nobj:Ncleandir}
                    127: .if make(${targ}) && !target(.BEGIN)
                    128: .BEGIN:
                    129:        @echo 'BUILD ABORTED: "make build" and "make ${targ}" are mutually exclusive.'
                    130:        @false
                    131: .endif
                    132: .endfor
                    133: .endif
1.58      tv        134:
1.261     apb       135: #
                    136: # _SUBDIR is used to set SUBDIR, after removing directories that have
                    137: # BUILD_${dir}=no, or that have no ${dir}/Makefile.
                    138: #
1.318   ! christos  139: _SUBDIR=       tools lib include external crypto/external bin games
1.271     christos  140: _SUBDIR+=      libexec sbin usr.bin
1.303     joerg     141: _SUBDIR+=      usr.sbin share sys etc tests compat
                    142: _SUBDIR+=      .WAIT rescue .WAIT distrib regress
1.105     assar     143:
1.137     tv        144: .for dir in ${_SUBDIR}
1.261     apb       145: .if "${dir}" == ".WAIT" \
                    146:        || (${BUILD_${dir}:Uyes} != "no" && exists(${dir}/Makefile))
1.137     tv        147: SUBDIR+=       ${dir}
1.36      explorer  148: .endif
1.137     tv        149: .endfor
1.21      cgd       150:
1.13      brezak    151: .if exists(regress)
1.242     dsl       152: regression-tests: .PHONY .MAKE
1.10      cgd       153:        @echo Running regression tests...
1.232     lukem     154:        ${MAKEDIRTARGET} regress regress
1.13      brezak    155: .endif
1.20      cgd       156:
1.214     lukem     157: .if ${MKUNPRIVED} != "no"
1.179     thorpej   158: NOPOSTINSTALL= # defined
                    159: .endif
                    160:
1.242     dsl       161: afterinstall: .PHONY .MAKE
1.137     tv        162: .if ${MKMAN} != "no"
1.232     lukem     163:        ${MAKEDIRTARGET} share/man makedb
1.137     tv        164: .endif
1.214     lukem     165: .if (${MKUNPRIVED} != "no" && ${MKINFO} != "no")
1.317     christos  166:        ${MAKEDIRTARGET} external/gpl2/texinfo/bin/install-info infodir-meta
1.176     lukem     167: .endif
1.179     thorpej   168: .if !defined(NOPOSTINSTALL)
1.232     lukem     169:        ${MAKEDIRTARGET} . postinstall-check
1.159     perry     170: .endif
1.170     lukem     171:
1.308     apb       172: _POSTINSTALL=  ${.CURDIR}/usr.sbin/postinstall/postinstall \
                    173:                -m ${MACHINE} -a ${MACHINE_ARCH}
1.295     apb       174: _POSTINSTALL_ENV= \
                    175:        AWK=${TOOL_AWK:Q}               \
                    176:        DB=${TOOL_DB:Q}                 \
1.298     apb       177:        HOST_SH=${HOST_SH:Q}            \
1.295     apb       178:        MAKE=${MAKE:Q}                  \
1.297     apb       179:        PWD_MKDB=${TOOL_PWD_MKDB:Q}     \
1.307     apb       180:        SED=${TOOL_SED:Q}               \
1.297     apb       181:        STAT=${TOOL_STAT:Q}
1.239     lukem     182:
1.313     martin    183: .if ${MKX11} != "no"
                    184: _POSTINSTALL_X11=-x ${X11SRCDIR:Q}
                    185: .endif
                    186:
1.228     lukem     187: postinstall-check: .PHONY
1.169     lukem     188:        @echo "   === Post installation checks ==="
1.313     martin    189:        ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ check; if [ $$? -gt 1 ]; then exit 1; fi
1.171     lukem     190:        @echo "   ================================"
                    191:
1.228     lukem     192: postinstall-fix: .NOTMAIN .PHONY
1.171     lukem     193:        @echo "   === Post installation fixes ==="
1.313     martin    194:        ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix
1.212     lukem     195:        @echo "   ==============================="
                    196:
1.228     lukem     197: postinstall-fix-obsolete: .NOTMAIN .PHONY
1.212     lukem     198:        @echo "   === Removing obsolete files ==="
1.313     martin    199:        ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix obsolete
1.212     lukem     200:        @echo "   ==============================="
1.169     lukem     201:
1.309     apb       202: postinstall-fix-obsolete_stand: .NOTMAIN .PHONY
                    203:        @echo "   === Removing obsolete files ==="
1.313     martin    204:        ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix obsolete_stand
1.309     apb       205:        @echo "   ==============================="
                    206:
1.108     erh       207:
1.193     lukem     208: #
1.137     tv        209: # Targets (in order!) called by "make build".
1.193     lukem     210: #
1.156     tv        211: BUILDTARGETS+= check-tools
1.214     lukem     212: .if ${MKUPDATE} == "no" && !defined(NOCLEANDIR)
1.155     tv        213: BUILDTARGETS+= cleandir
                    214: .endif
1.261     apb       215: .if ${MKOBJDIRS} != "no"
                    216: BUILDTARGETS+= do-top-obj
                    217: .endif
                    218: .if ${USETOOLS} == "yes"       # {
1.149     tv        219: .if ${MKOBJDIRS} != "no"
1.260     apb       220: BUILDTARGETS+= do-tools-obj
1.123     mrg       221: .endif
1.152     tv        222: BUILDTARGETS+= do-tools
1.261     apb       223: .endif # USETOOLS              # }
1.300     apb       224: BUILDTARGETS+= params
1.260     apb       225: .if ${MKOBJDIRS} != "no"
                    226: BUILDTARGETS+= obj
                    227: .endif
1.270     apb       228: BUILDTARGETS+= clean_METALOG
1.137     tv        229: .if !defined(NODISTRIBDIRS)
                    230: BUILDTARGETS+= do-distrib-dirs
1.131     tv        231: .endif
1.137     tv        232: .if !defined(NOINCLUDES)
                    233: BUILDTARGETS+= includes
1.131     tv        234: .endif
1.281     plunky    235: BUILDTARGETS+= do-lib
1.299     joerg     236: BUILDTARGETS+= do-compat-lib
1.263     mrg       237: .if ${MKX11} != "no"
1.227     lukem     238: BUILDTARGETS+= do-x11
                    239: .endif
1.312     joerg     240: BUILDTARGETS+= do-build
1.275     uebayasi  241: .if ${MKEXTSRC} != "no"
                    242: BUILDTARGETS+= do-extsrc
                    243: .endif
1.200     lukem     244: BUILDTARGETS+= do-obsolete
1.131     tv        245:
1.193     lukem     246: #
1.137     tv        247: # Enforce proper ordering of some rules.
1.193     lukem     248: #
1.123     mrg       249:
1.137     tv        250: .ORDER:                ${BUILDTARGETS}
1.228     lukem     251: includes-lib:  .PHONY includes-include includes-sys
1.123     mrg       252:
1.193     lukem     253: #
1.300     apb       254: # Record the values of variables that might affect the build.
                    255: # If no values have changed, avoid updating the timestamp
                    256: # of the params file.
                    257: #
                    258: # This is referenced by _NETBSD_VERSION_DEPENDS in <bsd.own.mk>.
                    259: #
1.302     apb       260: .include "${NETBSDSRCDIR}/etc/Makefile.params"
1.300     apb       261: CLEANDIRFILES+= params
                    262: params: .EXEC
                    263:        ${_MKMSG_CREATE} params
1.302     apb       264:        @${PRINT_PARAMS} >${.TARGET}.new
1.300     apb       265:        @if cmp -s ${.TARGET}.new ${.TARGET} > /dev/null 2>&1; then \
                    266:                : "params is unchanged" ; \
                    267:                rm ${.TARGET}.new ; \
                    268:        else \
                    269:                : "params has changed or is new" ; \
                    270:                mv ${.TARGET}.new ${.TARGET} ; \
                    271:        fi
                    272:
                    273: #
1.302     apb       274: # Display current make(1) parameters
                    275: #
                    276: show-params: .PHONY .MAKE
                    277:        @${PRINT_PARAMS}
                    278:
                    279: #
1.137     tv        280: # Build the system and install into DESTDIR.
1.193     lukem     281: #
1.123     mrg       282:
1.191     lukem     283: START_TIME!=   date
                    284:
1.242     dsl       285: build: .PHONY .MAKE
1.137     tv        286: .if defined(BUILD_DONE)
                    287:        @echo "Build already installed into ${DESTDIR}"
                    288: .else
1.191     lukem     289:        @echo "Build started at: ${START_TIME}"
1.145     tv        290: .for tgt in ${BUILDTARGETS}
1.232     lukem     291:        ${MAKEDIRTARGET} . ${tgt}
1.145     tv        292: .endfor
1.232     lukem     293:        ${MAKEDIRTARGET} etc install-etc-release
1.191     lukem     294:        @echo   "Build started at:  ${START_TIME}"
1.172     bjh21     295:        @printf "Build finished at: " && date
1.71      mycroft   296: .endif
1.160     thorpej   297:
1.193     lukem     298: #
1.160     thorpej   299: # Build a full distribution, but not a release (i.e. no sets into
1.193     lukem     300: # ${RELEASEDIR}).  "buildworld" enforces a build to ${DESTDIR} != /
                    301: #
1.160     thorpej   302:
1.242     dsl       303: distribution buildworld: .PHONY .MAKE
1.194     lukem     304: .if make(buildworld) && \
                    305:     (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
1.193     lukem     306:        @echo "Won't make ${.TARGET} with DESTDIR=/"
                    307:        @false
                    308: .endif
1.232     lukem     309:        ${MAKEDIRTARGET} . build NOPOSTINSTALL=1
                    310:        ${MAKEDIRTARGET} etc distribution INSTALL_DONE=1
1.181     thorpej   311: .if defined(DESTDIR) && ${DESTDIR} != "" && ${DESTDIR} != "/"
1.232     lukem     312:        ${MAKEDIRTARGET} . postinstall-fix-obsolete
1.309     apb       313:        ${MAKEDIRTARGET} . postinstall-fix-obsolete_stand
1.232     lukem     314:        ${MAKEDIRTARGET} distrib/sets checkflist
1.181     thorpej   315: .endif
1.192     lukem     316:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
1.185     lukem     317:        @printf "make ${.TARGET} finished at: " && date
1.123     mrg       318:
1.193     lukem     319: #
                    320: # Install the distribution from $DESTDIR to $INSTALLWORLDDIR (defaults to `/')
                    321: # If installing to /, ensures that the host's operating system is NetBSD and
                    322: # the host's `uname -m` == ${MACHINE}.
                    323: #
                    324:
                    325: HOST_UNAME_S!= uname -s
                    326: HOST_UNAME_M!= uname -m
                    327:
1.242     dsl       328: installworld: .PHONY .MAKE
1.194     lukem     329: .if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
1.193     lukem     330:        @echo "Can't make ${.TARGET} to DESTDIR=/"
                    331:        @false
                    332: .endif
                    333: .if !defined(INSTALLWORLDDIR) || \
                    334:     ${INSTALLWORLDDIR} == "" || ${INSTALLWORLDDIR} == "/"
                    335: .if (${HOST_UNAME_S} != "NetBSD")
                    336:        @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLWORLDDIR=/"
                    337:        @false
                    338: .endif
                    339: .if (${HOST_UNAME_M} != ${MACHINE})
                    340:        @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLWORLDDIR=/"
                    341:        @false
                    342: .endif
                    343: .endif
1.232     lukem     344:        ${MAKEDIRTARGET} distrib/sets installsets \
1.282     jym       345:                INSTALLDIR=${INSTALLWORLDDIR:U/} INSTALLSETS=${INSTALLSETS:Q}
1.232     lukem     346:        ${MAKEDIRTARGET} . postinstall-check DESTDIR=${INSTALLWORLDDIR}
1.193     lukem     347:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    348:        @printf "make ${.TARGET} finished at: " && date
1.199     lukem     349:
                    350: #
1.287     jmcneill  351: # Install modules from $DESTDIR to $INSTALLMODULESDIR
                    352: #
                    353: installmodules: .PHONY .MAKE
                    354: .if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
                    355:        @echo "Can't make ${.TARGET} to DESTDIR=/"
                    356:        @false
                    357: .endif
                    358: .if !defined(INSTALLMODULESDIR) || \
                    359:     ${INSTALLMODULESDIR} == "" || ${INSTALLMODULESDIR} == "/"
                    360: .if (${HOST_UNAME_S} != "NetBSD")
                    361:        @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLMODULESDIR=/"
                    362:        @false
                    363: .endif
                    364: .if (${HOST_UNAME_M} != ${MACHINE})
                    365:        @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLMODULESDIR=/"
                    366:        @false
                    367: .endif
                    368: .endif
1.288     jmcneill  369:        ${MAKEDIRTARGET} sys/modules install DESTDIR=${INSTALLMODULESDIR:U/}
1.287     jmcneill  370:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    371:        @printf "make ${.TARGET} finished at: " && date
                    372:
                    373: #
1.206     lukem     374: # Create sets from $DESTDIR or $NETBSDSRCDIR into $RELEASEDIR
1.199     lukem     375: #
                    376:
1.241     apb       377: .for tgt in sets sourcesets syspkgs
1.242     dsl       378: ${tgt}: .PHONY .MAKE
1.232     lukem     379:        ${MAKEDIRTARGET} distrib/sets ${tgt}
1.206     lukem     380: .endfor
1.193     lukem     381:
                    382: #
1.240     lukem     383: # Build a release or snapshot (implies "make distribution").  Note that
1.181     thorpej   384: # in this case, the set lists will be checked before the tar files
                    385: # are made.
1.193     lukem     386: #
1.123     mrg       387:
1.242     dsl       388: release snapshot: .PHONY .MAKE
1.240     lukem     389:        ${MAKEDIRTARGET} . distribution
                    390:        ${MAKEDIRTARGET} etc release DISTRIBUTION_DONE=1
1.192     lukem     391:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
1.185     lukem     392:        @printf "make ${.TARGET} finished at: " && date
1.123     mrg       393:
1.193     lukem     394: #
1.243     apb       395: # Create a CD-ROM image.
                    396: #
                    397:
                    398: iso-image: .PHONY
1.247     bouyer    399:        ${MAKEDIRTARGET} distrib iso_image
1.243     apb       400:        ${MAKEDIRTARGET} etc iso-image
                    401:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    402:        @printf "make ${.TARGET} finished at: " && date
                    403:
1.248     jnemeth   404: iso-image-source: .PHONY
                    405:        ${MAKEDIRTARGET} distrib iso_image CDSOURCE=true
                    406:        ${MAKEDIRTARGET} etc iso-image
                    407:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    408:        @printf "make ${.TARGET} finished at: " && date
                    409:
1.243     apb       410: #
1.290     tsutsui   411: # Create bootable live images.
                    412: #
                    413:
                    414: live-image: .PHONY
                    415:        ${MAKEDIRTARGET} etc live-image
                    416:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    417:        @printf "make ${.TARGET} finished at: " && date
                    418:
                    419: #
                    420: # Create bootable installation images.
                    421: #
                    422:
                    423: install-image: .PHONY
                    424:        ${MAKEDIRTARGET} etc install-image
                    425:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    426:        @printf "make ${.TARGET} finished at: " && date
                    427:
                    428: #
1.137     tv        429: # Special components of the "make build" process.
1.193     lukem     430: #
1.156     tv        431:
1.228     lukem     432: check-tools: .PHONY
1.223     lukem     433: .if ${TOOLCHAIN_MISSING} != "no" && !defined(EXTERNAL_TOOLCHAIN)
1.187     thorpej   434:        @echo '*** WARNING:  Building on MACHINE=${MACHINE} with missing toolchain.'
                    435:        @echo '*** May result in a failed build or corrupt binaries!'
                    436: .elif defined(EXTERNAL_TOOLCHAIN)
                    437:        @echo '*** Using external toolchain rooted at ${EXTERNAL_TOOLCHAIN}.'
1.156     tv        438: .endif
1.173     sommerfe  439: .if defined(NBUILDJOBS)
                    440:        @echo '*** WARNING: NBUILDJOBS is obsolete; use -j directly instead!'
                    441: .endif
1.123     mrg       442:
1.270     apb       443: # Delete or sanitise a leftover METALOG from a previous build.
                    444: clean_METALOG: .PHONY .MAKE
                    445: .if ${MKUPDATE} != "no"
                    446:        ${MAKEDIRTARGET} distrib/sets clean_METALOG
                    447: .endif
                    448:
1.242     dsl       449: do-distrib-dirs: .PHONY .MAKE
1.147     jmc       450: .if !defined(DESTDIR) || ${DESTDIR} == ""
1.232     lukem     451:        ${MAKEDIRTARGET} etc distrib-dirs DESTDIR=/
1.147     jmc       452: .else
1.232     lukem     453:        ${MAKEDIRTARGET} etc distrib-dirs DESTDIR=${DESTDIR}
1.147     jmc       454: .endif
1.190     lukem     455:
                    456: .for targ in cleandir obj includes
1.228     lukem     457: do-${targ}: .PHONY ${targ}
1.190     lukem     458:        @true
                    459: .endfor
1.123     mrg       460:
1.301     joerg     461: do-tools: .PHONY .MAKE
                    462:        ${MAKEDIRTARGET} tools build_install
1.184     lukem     463:
1.299     joerg     464: do-lib: .PHONY .MAKE
                    465:        ${MAKEDIRTARGET} lib build_install
                    466:
                    467: do-compat-lib: .PHONY .MAKE
                    468:        ${MAKEDIRTARGET} compat build_install BOOTSTRAP_SUBDIRS="../../../lib"
1.276     mrg       469:
1.261     apb       470: do-top-obj: .PHONY .MAKE
                    471:        ${MAKEDIRTARGET} . obj NOSUBDIR=
                    472:
1.260     apb       473: do-tools-obj: .PHONY .MAKE
                    474:        ${MAKEDIRTARGET} tools obj
                    475:
1.242     dsl       476: do-build: .PHONY .MAKE
1.154     tv        477: .for targ in dependall install
1.232     lukem     478:        ${MAKEDIRTARGET} . ${targ} BUILD_tools=no BUILD_lib=no
1.154     tv        479: .endfor
1.200     lukem     480:
1.242     dsl       481: do-x11: .PHONY .MAKE
1.263     mrg       482: .if ${MKX11} != "no"
1.312     joerg     483:        ${MAKEDIRTARGET} external/mit/xorg/tools all
                    484:        ${MAKEDIRTARGET} external/mit/xorg/lib build_install
1.315     matt      485: .if ${MKCOMPATX11} != "no"
1.314     matt      486:        ${MAKEDIRTARGET} compat build_install BOOTSTRAP_SUBDIRS="../../../external/mit/xorg/lib"
                    487: .endif
1.263     mrg       488: .else
                    489:        @echo "MKX11 is not enabled"
1.257     lukem     490:        @false
1.254     mrg       491: .endif
1.227     lukem     492:
1.275     uebayasi  493: do-extsrc: .PHONY .MAKE
                    494: .if ${MKEXTSRC} != "no"
                    495:        ${MAKEDIRTARGET} extsrc build
                    496: .else
                    497:        @echo "MKEXTSRC is not enabled"
                    498:        @false
                    499: .endif
                    500:
1.242     dsl       501: do-obsolete: .PHONY .MAKE
1.232     lukem     502:        ${MAKEDIRTARGET} etc install-obsolete-lists
1.87      cjs       503:
1.193     lukem     504: #
1.137     tv        505: # Speedup stubs for some subtrees that don't need to run these rules.
                    506: # (Tells <bsd.subdir.mk> not to recurse for them.)
1.193     lukem     507: #
1.129     tv        508:
1.292     veego     509: .for dir in bin etc distrib games libexec regress sbin usr.bin usr.sbin tools
1.228     lukem     510: includes-${dir}: .PHONY
1.152     tv        511:        @true
                    512: .endfor
                    513: .for dir in etc distrib regress
1.228     lukem     514: install-${dir}: .PHONY
1.152     tv        515:        @true
                    516: .endfor
                    517:
1.193     lukem     518: #
1.152     tv        519: # XXX this needs to change when distrib Makefiles are recursion compliant
1.193     lukem     520: # XXX many distrib subdirs need "cd etc && make snap_pre snap_kern" first...
                    521: #
1.228     lukem     522: dependall-distrib depend-distrib all-distrib: .PHONY
1.136     nathanw   523:        @true
1.130     tv        524:
1.151     tv        525: .include <bsd.obj.mk>
1.209     lukem     526: .include <bsd.kernobj.mk>
1.146     tv        527: .include <bsd.subdir.mk>

CVSweb <webmaster@jp.NetBSD.org>