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

Annotation of src/Makefile, Revision 1.299.2.1

1.299.2.1! tls         1: #      $NetBSD: Makefile,v 1.301 2012/11/15 23:51:53 joerg 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.248     jnemeth    67: #      Create CD-ROM image in RELEASEDIR/iso.
1.243     apb        68: #      RELEASEDIR must already have been populated by `make release'
                     69: #      or equivalent.
1.248     jnemeth    70: #   iso-image-source:
                     71: #      Create CD-ROM image with source in RELEASEDIR/iso.
                     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.299.2.1! tls        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
                    101: #                    X11R7 from src/external/mit/xorg if ${X11FLAVOUR} == "Xorg"
                    102: #                    or X11R6 from src/x11
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.271     christos  140: _SUBDIR=       tools lib include gnu external crypto/external bin games
                    141: _SUBDIR+=      libexec sbin usr.bin
1.262     mrg       142: _SUBDIR+=      usr.sbin share rescue sys etc tests compat .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.232     lukem     166:        ${MAKEDIRTARGET} gnu/usr.bin/texinfo/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.239     lukem     172: _POSTINSTALL=  ${.CURDIR}/usr.sbin/postinstall/postinstall
1.295     apb       173: _POSTINSTALL_ENV= \
                    174:        AWK=${TOOL_AWK:Q}               \
                    175:        DB=${TOOL_DB:Q}                 \
1.298     apb       176:        HOST_SH=${HOST_SH:Q}            \
1.295     apb       177:        MAKE=${MAKE:Q}                  \
1.297     apb       178:        PWD_MKDB=${TOOL_PWD_MKDB:Q}     \
                    179:        STAT=${TOOL_STAT:Q}
1.239     lukem     180:
1.228     lukem     181: postinstall-check: .PHONY
1.169     lukem     182:        @echo "   === Post installation checks ==="
1.295     apb       183:        ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ check; if [ $$? -gt 1 ]; then exit 1; fi
1.171     lukem     184:        @echo "   ================================"
                    185:
1.228     lukem     186: postinstall-fix: .NOTMAIN .PHONY
1.171     lukem     187:        @echo "   === Post installation fixes ==="
1.295     apb       188:        ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ fix
1.212     lukem     189:        @echo "   ==============================="
                    190:
1.228     lukem     191: postinstall-fix-obsolete: .NOTMAIN .PHONY
1.212     lukem     192:        @echo "   === Removing obsolete files ==="
1.295     apb       193:        ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ fix obsolete
1.212     lukem     194:        @echo "   ==============================="
1.169     lukem     195:
1.108     erh       196:
1.193     lukem     197: #
1.137     tv        198: # Targets (in order!) called by "make build".
1.193     lukem     199: #
1.256     gmcgarry  200: .if defined(HAVE_GCC)
1.284     mrg       201: .if ${HAVE_GCC} == "4"
                    202: LIBGCC_EXT=4
1.285     mrg       203: BUILD_CC_LIB_BASEDIR= gnu/lib
                    204: BUILD_CC_LIB_BASETARGET= gnu-lib
1.245     mrg       205: .else
1.285     mrg       206: LIBGCC_EXT=
                    207: BUILD_CC_LIB_BASEDIR= external/gpl3/gcc/lib
                    208: BUILD_CC_LIB_BASETARGET= external-gpl3-gcc-lib
1.220     mrg       209: .endif
1.256     gmcgarry  210: .endif
1.123     mrg       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.299.2.1! tls       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.224     lukem     238: BUILDTARGETS+= do-build
1.263     mrg       239: .if ${MKX11} != "no"
1.227     lukem     240: BUILDTARGETS+= do-x11
                    241: .endif
1.275     uebayasi  242: .if ${MKEXTSRC} != "no"
                    243: BUILDTARGETS+= do-extsrc
                    244: .endif
1.200     lukem     245: BUILDTARGETS+= do-obsolete
1.131     tv        246:
1.193     lukem     247: #
1.137     tv        248: # Enforce proper ordering of some rules.
1.193     lukem     249: #
1.123     mrg       250:
1.137     tv        251: .ORDER:                ${BUILDTARGETS}
1.228     lukem     252: includes-lib:  .PHONY includes-include includes-sys
                    253: includes-gnu:  .PHONY includes-lib
1.123     mrg       254:
1.193     lukem     255: #
1.299.2.1! tls       256: # Record the values of variables that might affect the build.
        !           257: # If no values have changed, avoid updating the timestamp
        !           258: # of the params file.
        !           259: #
        !           260: # This is referenced by _NETBSD_VERSION_DEPENDS in <bsd.own.mk>.
        !           261: #
        !           262:
        !           263: CLEANDIRFILES+= params
        !           264: params: .EXEC
        !           265:        ${_MKMSG_CREATE} params
        !           266:        @(${MAKEDIRTARGET:S/^@//} etc params) >${.TARGET}.new
        !           267:        @if cmp -s ${.TARGET}.new ${.TARGET} > /dev/null 2>&1; then \
        !           268:                : "params is unchanged" ; \
        !           269:                rm ${.TARGET}.new ; \
        !           270:        else \
        !           271:                : "params has changed or is new" ; \
        !           272:                mv ${.TARGET}.new ${.TARGET} ; \
        !           273:        fi
        !           274:
        !           275: #
1.137     tv        276: # Build the system and install into DESTDIR.
1.193     lukem     277: #
1.123     mrg       278:
1.191     lukem     279: START_TIME!=   date
                    280:
1.242     dsl       281: build: .PHONY .MAKE
1.137     tv        282: .if defined(BUILD_DONE)
                    283:        @echo "Build already installed into ${DESTDIR}"
                    284: .else
1.191     lukem     285:        @echo "Build started at: ${START_TIME}"
1.145     tv        286: .for tgt in ${BUILDTARGETS}
1.232     lukem     287:        ${MAKEDIRTARGET} . ${tgt}
1.145     tv        288: .endfor
1.232     lukem     289:        ${MAKEDIRTARGET} etc install-etc-release
1.191     lukem     290:        @echo   "Build started at:  ${START_TIME}"
1.172     bjh21     291:        @printf "Build finished at: " && date
1.71      mycroft   292: .endif
1.160     thorpej   293:
1.193     lukem     294: #
1.160     thorpej   295: # Build a full distribution, but not a release (i.e. no sets into
1.193     lukem     296: # ${RELEASEDIR}).  "buildworld" enforces a build to ${DESTDIR} != /
                    297: #
1.160     thorpej   298:
1.242     dsl       299: distribution buildworld: .PHONY .MAKE
1.194     lukem     300: .if make(buildworld) && \
                    301:     (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
1.193     lukem     302:        @echo "Won't make ${.TARGET} with DESTDIR=/"
                    303:        @false
                    304: .endif
1.232     lukem     305:        ${MAKEDIRTARGET} . build NOPOSTINSTALL=1
                    306:        ${MAKEDIRTARGET} etc distribution INSTALL_DONE=1
1.181     thorpej   307: .if defined(DESTDIR) && ${DESTDIR} != "" && ${DESTDIR} != "/"
1.232     lukem     308:        ${MAKEDIRTARGET} . postinstall-fix-obsolete
                    309:        ${MAKEDIRTARGET} distrib/sets checkflist
1.181     thorpej   310: .endif
1.192     lukem     311:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
1.185     lukem     312:        @printf "make ${.TARGET} finished at: " && date
1.123     mrg       313:
1.193     lukem     314: #
                    315: # Install the distribution from $DESTDIR to $INSTALLWORLDDIR (defaults to `/')
                    316: # If installing to /, ensures that the host's operating system is NetBSD and
                    317: # the host's `uname -m` == ${MACHINE}.
                    318: #
                    319:
                    320: HOST_UNAME_S!= uname -s
                    321: HOST_UNAME_M!= uname -m
                    322:
1.242     dsl       323: installworld: .PHONY .MAKE
1.194     lukem     324: .if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
1.193     lukem     325:        @echo "Can't make ${.TARGET} to DESTDIR=/"
                    326:        @false
                    327: .endif
                    328: .if !defined(INSTALLWORLDDIR) || \
                    329:     ${INSTALLWORLDDIR} == "" || ${INSTALLWORLDDIR} == "/"
                    330: .if (${HOST_UNAME_S} != "NetBSD")
                    331:        @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLWORLDDIR=/"
                    332:        @false
                    333: .endif
                    334: .if (${HOST_UNAME_M} != ${MACHINE})
                    335:        @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLWORLDDIR=/"
                    336:        @false
                    337: .endif
                    338: .endif
1.232     lukem     339:        ${MAKEDIRTARGET} distrib/sets installsets \
1.282     jym       340:                INSTALLDIR=${INSTALLWORLDDIR:U/} INSTALLSETS=${INSTALLSETS:Q}
1.232     lukem     341:        ${MAKEDIRTARGET} . postinstall-check DESTDIR=${INSTALLWORLDDIR}
1.193     lukem     342:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    343:        @printf "make ${.TARGET} finished at: " && date
1.199     lukem     344:
                    345: #
1.287     jmcneill  346: # Install modules from $DESTDIR to $INSTALLMODULESDIR
                    347: #
                    348: installmodules: .PHONY .MAKE
                    349: .if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
                    350:        @echo "Can't make ${.TARGET} to DESTDIR=/"
                    351:        @false
                    352: .endif
                    353: .if !defined(INSTALLMODULESDIR) || \
                    354:     ${INSTALLMODULESDIR} == "" || ${INSTALLMODULESDIR} == "/"
                    355: .if (${HOST_UNAME_S} != "NetBSD")
                    356:        @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLMODULESDIR=/"
                    357:        @false
                    358: .endif
                    359: .if (${HOST_UNAME_M} != ${MACHINE})
                    360:        @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLMODULESDIR=/"
                    361:        @false
                    362: .endif
                    363: .endif
1.288     jmcneill  364:        ${MAKEDIRTARGET} sys/modules install DESTDIR=${INSTALLMODULESDIR:U/}
1.287     jmcneill  365:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    366:        @printf "make ${.TARGET} finished at: " && date
                    367:
                    368: #
1.206     lukem     369: # Create sets from $DESTDIR or $NETBSDSRCDIR into $RELEASEDIR
1.199     lukem     370: #
                    371:
1.241     apb       372: .for tgt in sets sourcesets syspkgs
1.242     dsl       373: ${tgt}: .PHONY .MAKE
1.232     lukem     374:        ${MAKEDIRTARGET} distrib/sets ${tgt}
1.206     lukem     375: .endfor
1.193     lukem     376:
                    377: #
1.240     lukem     378: # Build a release or snapshot (implies "make distribution").  Note that
1.181     thorpej   379: # in this case, the set lists will be checked before the tar files
                    380: # are made.
1.193     lukem     381: #
1.123     mrg       382:
1.242     dsl       383: release snapshot: .PHONY .MAKE
1.240     lukem     384:        ${MAKEDIRTARGET} . distribution
                    385:        ${MAKEDIRTARGET} etc release DISTRIBUTION_DONE=1
1.192     lukem     386:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
1.185     lukem     387:        @printf "make ${.TARGET} finished at: " && date
1.123     mrg       388:
1.193     lukem     389: #
1.243     apb       390: # Create a CD-ROM image.
                    391: #
                    392:
                    393: iso-image: .PHONY
1.247     bouyer    394:        ${MAKEDIRTARGET} distrib iso_image
1.243     apb       395:        ${MAKEDIRTARGET} etc iso-image
                    396:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    397:        @printf "make ${.TARGET} finished at: " && date
                    398:
1.248     jnemeth   399: iso-image-source: .PHONY
                    400:        ${MAKEDIRTARGET} distrib iso_image CDSOURCE=true
                    401:        ${MAKEDIRTARGET} etc iso-image
                    402:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    403:        @printf "make ${.TARGET} finished at: " && date
                    404:
1.243     apb       405: #
1.290     tsutsui   406: # Create bootable live images.
                    407: #
                    408:
                    409: live-image: .PHONY
                    410:        ${MAKEDIRTARGET} etc live-image
                    411:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    412:        @printf "make ${.TARGET} finished at: " && date
                    413:
                    414: #
                    415: # Create bootable installation images.
                    416: #
                    417:
                    418: install-image: .PHONY
                    419:        ${MAKEDIRTARGET} etc install-image
                    420:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    421:        @printf "make ${.TARGET} finished at: " && date
                    422:
                    423: #
1.137     tv        424: # Special components of the "make build" process.
1.193     lukem     425: #
1.156     tv        426:
1.228     lukem     427: check-tools: .PHONY
1.223     lukem     428: .if ${TOOLCHAIN_MISSING} != "no" && !defined(EXTERNAL_TOOLCHAIN)
1.187     thorpej   429:        @echo '*** WARNING:  Building on MACHINE=${MACHINE} with missing toolchain.'
                    430:        @echo '*** May result in a failed build or corrupt binaries!'
                    431: .elif defined(EXTERNAL_TOOLCHAIN)
                    432:        @echo '*** Using external toolchain rooted at ${EXTERNAL_TOOLCHAIN}.'
1.156     tv        433: .endif
1.173     sommerfe  434: .if defined(NBUILDJOBS)
                    435:        @echo '*** WARNING: NBUILDJOBS is obsolete; use -j directly instead!'
                    436: .endif
1.123     mrg       437:
1.270     apb       438: # Delete or sanitise a leftover METALOG from a previous build.
                    439: clean_METALOG: .PHONY .MAKE
                    440: .if ${MKUPDATE} != "no"
                    441:        ${MAKEDIRTARGET} distrib/sets clean_METALOG
                    442: .endif
                    443:
1.242     dsl       444: do-distrib-dirs: .PHONY .MAKE
1.147     jmc       445: .if !defined(DESTDIR) || ${DESTDIR} == ""
1.232     lukem     446:        ${MAKEDIRTARGET} etc distrib-dirs DESTDIR=/
1.147     jmc       447: .else
1.232     lukem     448:        ${MAKEDIRTARGET} etc distrib-dirs DESTDIR=${DESTDIR}
1.147     jmc       449: .endif
1.190     lukem     450:
                    451: .for targ in cleandir obj includes
1.228     lukem     452: do-${targ}: .PHONY ${targ}
1.190     lukem     453:        @true
                    454: .endfor
1.123     mrg       455:
1.299.2.1! tls       456: do-tools: .PHONY .MAKE
        !           457:        ${MAKEDIRTARGET} tools build_install
1.184     lukem     458:
1.299     joerg     459: do-lib: .PHONY .MAKE
                    460:        ${MAKEDIRTARGET} lib build_install
                    461:
                    462: do-compat-lib: .PHONY .MAKE
                    463:        ${MAKEDIRTARGET} compat build_install BOOTSTRAP_SUBDIRS="../../../lib"
1.276     mrg       464:
1.261     apb       465: do-top-obj: .PHONY .MAKE
                    466:        ${MAKEDIRTARGET} . obj NOSUBDIR=
                    467:
1.260     apb       468: do-tools-obj: .PHONY .MAKE
                    469:        ${MAKEDIRTARGET} tools obj
                    470:
1.242     dsl       471: do-build: .PHONY .MAKE
1.154     tv        472: .for targ in dependall install
1.232     lukem     473:        ${MAKEDIRTARGET} . ${targ} BUILD_tools=no BUILD_lib=no
1.154     tv        474: .endfor
1.200     lukem     475:
1.242     dsl       476: do-x11: .PHONY .MAKE
1.263     mrg       477: .if ${MKX11} != "no"
                    478: .if ${X11FLAVOUR} == "Xorg"
1.254     mrg       479:        ${MAKEDIRTARGET} external/mit/xorg build
1.263     mrg       480: .else
1.257     lukem     481:        ${MAKEDIRTARGET} x11 build
1.263     mrg       482: .endif
1.254     mrg       483: .else
1.263     mrg       484:        @echo "MKX11 is not enabled"
1.257     lukem     485:        @false
1.254     mrg       486: .endif
1.227     lukem     487:
1.275     uebayasi  488: do-extsrc: .PHONY .MAKE
                    489: .if ${MKEXTSRC} != "no"
                    490:        ${MAKEDIRTARGET} extsrc build
                    491: .else
                    492:        @echo "MKEXTSRC is not enabled"
                    493:        @false
                    494: .endif
                    495:
1.242     dsl       496: do-obsolete: .PHONY .MAKE
1.232     lukem     497:        ${MAKEDIRTARGET} etc install-obsolete-lists
1.87      cjs       498:
1.193     lukem     499: #
1.137     tv        500: # Speedup stubs for some subtrees that don't need to run these rules.
                    501: # (Tells <bsd.subdir.mk> not to recurse for them.)
1.193     lukem     502: #
1.129     tv        503:
1.292     veego     504: .for dir in bin etc distrib games libexec regress sbin usr.bin usr.sbin tools
1.228     lukem     505: includes-${dir}: .PHONY
1.152     tv        506:        @true
                    507: .endfor
                    508: .for dir in etc distrib regress
1.228     lukem     509: install-${dir}: .PHONY
1.152     tv        510:        @true
                    511: .endfor
                    512:
1.193     lukem     513: #
1.152     tv        514: # XXX this needs to change when distrib Makefiles are recursion compliant
1.193     lukem     515: # XXX many distrib subdirs need "cd etc && make snap_pre snap_kern" first...
                    516: #
1.228     lukem     517: dependall-distrib depend-distrib all-distrib: .PHONY
1.136     nathanw   518:        @true
1.130     tv        519:
1.211     lukem     520: .include <bsd.sys.mk>
1.151     tv        521: .include <bsd.obj.mk>
1.209     lukem     522: .include <bsd.kernobj.mk>
1.146     tv        523: .include <bsd.subdir.mk>
1.144     tv        524:
1.209     lukem     525: #
                    526: # Display current make(1) parameters
                    527: #
1.299.2.1! tls       528: show-params: .PHONY .MAKE
1.232     lukem     529:        ${MAKEDIRTARGET} etc params

CVSweb <webmaster@jp.NetBSD.org>