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

Annotation of src/Makefile, Revision 1.319

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

CVSweb <webmaster@jp.NetBSD.org>