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

Annotation of src/Makefile, Revision 1.299

1.299   ! joerg       1: #      $NetBSD: Makefile,v 1.298 2012/08/15 12:50:12 apb 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.137     tv         90: #   obj:             creates object directories.
1.208     lukem      91: #   do-distrib-dirs: creates the distribution directories.
                     92: #   includes:        installs include files.
1.202     thorpej    93: #   do-tools-compat: builds the "libnbcompat" library; needed for some
                     94: #                    random host tool programs in the source tree.
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.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.224     lukem     237: BUILDTARGETS+= do-build
1.263     mrg       238: .if ${MKX11} != "no"
1.227     lukem     239: BUILDTARGETS+= do-x11
                    240: .endif
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
                    252: includes-gnu:  .PHONY includes-lib
1.123     mrg       253:
1.193     lukem     254: #
1.137     tv        255: # Build the system and install into DESTDIR.
1.193     lukem     256: #
1.123     mrg       257:
1.191     lukem     258: START_TIME!=   date
                    259:
1.242     dsl       260: build: .PHONY .MAKE
1.137     tv        261: .if defined(BUILD_DONE)
                    262:        @echo "Build already installed into ${DESTDIR}"
                    263: .else
1.191     lukem     264:        @echo "Build started at: ${START_TIME}"
1.145     tv        265: .for tgt in ${BUILDTARGETS}
1.232     lukem     266:        ${MAKEDIRTARGET} . ${tgt}
1.145     tv        267: .endfor
1.232     lukem     268:        ${MAKEDIRTARGET} etc install-etc-release
1.191     lukem     269:        @echo   "Build started at:  ${START_TIME}"
1.172     bjh21     270:        @printf "Build finished at: " && date
1.71      mycroft   271: .endif
1.160     thorpej   272:
1.193     lukem     273: #
1.160     thorpej   274: # Build a full distribution, but not a release (i.e. no sets into
1.193     lukem     275: # ${RELEASEDIR}).  "buildworld" enforces a build to ${DESTDIR} != /
                    276: #
1.160     thorpej   277:
1.242     dsl       278: distribution buildworld: .PHONY .MAKE
1.194     lukem     279: .if make(buildworld) && \
                    280:     (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
1.193     lukem     281:        @echo "Won't make ${.TARGET} with DESTDIR=/"
                    282:        @false
                    283: .endif
1.232     lukem     284:        ${MAKEDIRTARGET} . build NOPOSTINSTALL=1
                    285:        ${MAKEDIRTARGET} etc distribution INSTALL_DONE=1
1.181     thorpej   286: .if defined(DESTDIR) && ${DESTDIR} != "" && ${DESTDIR} != "/"
1.232     lukem     287:        ${MAKEDIRTARGET} . postinstall-fix-obsolete
                    288:        ${MAKEDIRTARGET} distrib/sets checkflist
1.181     thorpej   289: .endif
1.192     lukem     290:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
1.185     lukem     291:        @printf "make ${.TARGET} finished at: " && date
1.123     mrg       292:
1.193     lukem     293: #
                    294: # Install the distribution from $DESTDIR to $INSTALLWORLDDIR (defaults to `/')
                    295: # If installing to /, ensures that the host's operating system is NetBSD and
                    296: # the host's `uname -m` == ${MACHINE}.
                    297: #
                    298:
                    299: HOST_UNAME_S!= uname -s
                    300: HOST_UNAME_M!= uname -m
                    301:
1.242     dsl       302: installworld: .PHONY .MAKE
1.194     lukem     303: .if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
1.193     lukem     304:        @echo "Can't make ${.TARGET} to DESTDIR=/"
                    305:        @false
                    306: .endif
                    307: .if !defined(INSTALLWORLDDIR) || \
                    308:     ${INSTALLWORLDDIR} == "" || ${INSTALLWORLDDIR} == "/"
                    309: .if (${HOST_UNAME_S} != "NetBSD")
                    310:        @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLWORLDDIR=/"
                    311:        @false
                    312: .endif
                    313: .if (${HOST_UNAME_M} != ${MACHINE})
                    314:        @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLWORLDDIR=/"
                    315:        @false
                    316: .endif
                    317: .endif
1.232     lukem     318:        ${MAKEDIRTARGET} distrib/sets installsets \
1.282     jym       319:                INSTALLDIR=${INSTALLWORLDDIR:U/} INSTALLSETS=${INSTALLSETS:Q}
1.232     lukem     320:        ${MAKEDIRTARGET} . postinstall-check DESTDIR=${INSTALLWORLDDIR}
1.193     lukem     321:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    322:        @printf "make ${.TARGET} finished at: " && date
1.199     lukem     323:
                    324: #
1.287     jmcneill  325: # Install modules from $DESTDIR to $INSTALLMODULESDIR
                    326: #
                    327: installmodules: .PHONY .MAKE
                    328: .if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
                    329:        @echo "Can't make ${.TARGET} to DESTDIR=/"
                    330:        @false
                    331: .endif
                    332: .if !defined(INSTALLMODULESDIR) || \
                    333:     ${INSTALLMODULESDIR} == "" || ${INSTALLMODULESDIR} == "/"
                    334: .if (${HOST_UNAME_S} != "NetBSD")
                    335:        @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLMODULESDIR=/"
                    336:        @false
                    337: .endif
                    338: .if (${HOST_UNAME_M} != ${MACHINE})
                    339:        @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLMODULESDIR=/"
                    340:        @false
                    341: .endif
                    342: .endif
1.288     jmcneill  343:        ${MAKEDIRTARGET} sys/modules install DESTDIR=${INSTALLMODULESDIR:U/}
1.287     jmcneill  344:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    345:        @printf "make ${.TARGET} finished at: " && date
                    346:
                    347: #
1.206     lukem     348: # Create sets from $DESTDIR or $NETBSDSRCDIR into $RELEASEDIR
1.199     lukem     349: #
                    350:
1.241     apb       351: .for tgt in sets sourcesets syspkgs
1.242     dsl       352: ${tgt}: .PHONY .MAKE
1.232     lukem     353:        ${MAKEDIRTARGET} distrib/sets ${tgt}
1.206     lukem     354: .endfor
1.193     lukem     355:
                    356: #
1.240     lukem     357: # Build a release or snapshot (implies "make distribution").  Note that
1.181     thorpej   358: # in this case, the set lists will be checked before the tar files
                    359: # are made.
1.193     lukem     360: #
1.123     mrg       361:
1.242     dsl       362: release snapshot: .PHONY .MAKE
1.240     lukem     363:        ${MAKEDIRTARGET} . distribution
                    364:        ${MAKEDIRTARGET} etc release DISTRIBUTION_DONE=1
1.192     lukem     365:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
1.185     lukem     366:        @printf "make ${.TARGET} finished at: " && date
1.123     mrg       367:
1.193     lukem     368: #
1.243     apb       369: # Create a CD-ROM image.
                    370: #
                    371:
                    372: iso-image: .PHONY
1.247     bouyer    373:        ${MAKEDIRTARGET} distrib iso_image
1.243     apb       374:        ${MAKEDIRTARGET} etc iso-image
                    375:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    376:        @printf "make ${.TARGET} finished at: " && date
                    377:
1.248     jnemeth   378: iso-image-source: .PHONY
                    379:        ${MAKEDIRTARGET} distrib iso_image CDSOURCE=true
                    380:        ${MAKEDIRTARGET} etc iso-image
                    381:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    382:        @printf "make ${.TARGET} finished at: " && date
                    383:
1.243     apb       384: #
1.290     tsutsui   385: # Create bootable live images.
                    386: #
                    387:
                    388: live-image: .PHONY
                    389:        ${MAKEDIRTARGET} etc live-image
                    390:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    391:        @printf "make ${.TARGET} finished at: " && date
                    392:
                    393: #
                    394: # Create bootable installation images.
                    395: #
                    396:
                    397: install-image: .PHONY
                    398:        ${MAKEDIRTARGET} etc install-image
                    399:        @echo   "make ${.TARGET} started at:  ${START_TIME}"
                    400:        @printf "make ${.TARGET} finished at: " && date
                    401:
                    402: #
1.137     tv        403: # Special components of the "make build" process.
1.193     lukem     404: #
1.156     tv        405:
1.228     lukem     406: check-tools: .PHONY
1.223     lukem     407: .if ${TOOLCHAIN_MISSING} != "no" && !defined(EXTERNAL_TOOLCHAIN)
1.187     thorpej   408:        @echo '*** WARNING:  Building on MACHINE=${MACHINE} with missing toolchain.'
                    409:        @echo '*** May result in a failed build or corrupt binaries!'
                    410: .elif defined(EXTERNAL_TOOLCHAIN)
                    411:        @echo '*** Using external toolchain rooted at ${EXTERNAL_TOOLCHAIN}.'
1.156     tv        412: .endif
1.173     sommerfe  413: .if defined(NBUILDJOBS)
                    414:        @echo '*** WARNING: NBUILDJOBS is obsolete; use -j directly instead!'
                    415: .endif
1.123     mrg       416:
1.270     apb       417: # Delete or sanitise a leftover METALOG from a previous build.
                    418: clean_METALOG: .PHONY .MAKE
                    419: .if ${MKUPDATE} != "no"
                    420:        ${MAKEDIRTARGET} distrib/sets clean_METALOG
                    421: .endif
                    422:
1.242     dsl       423: do-distrib-dirs: .PHONY .MAKE
1.147     jmc       424: .if !defined(DESTDIR) || ${DESTDIR} == ""
1.232     lukem     425:        ${MAKEDIRTARGET} etc distrib-dirs DESTDIR=/
1.147     jmc       426: .else
1.232     lukem     427:        ${MAKEDIRTARGET} etc distrib-dirs DESTDIR=${DESTDIR}
1.147     jmc       428: .endif
1.190     lukem     429:
                    430: .for targ in cleandir obj includes
1.228     lukem     431: do-${targ}: .PHONY ${targ}
1.190     lukem     432:        @true
                    433: .endfor
1.123     mrg       434:
1.299   ! joerg     435: .for dir in tools tools/compat
1.242     dsl       436: do-${dir:S/\//-/g}: .PHONY .MAKE
1.137     tv        437: .for targ in dependall install
1.232     lukem     438:        ${MAKEDIRTARGET} ${dir} ${targ}
1.137     tv        439: .endfor
1.184     lukem     440: .endfor
                    441:
1.299   ! joerg     442: do-lib: .PHONY .MAKE
        !           443:        ${MAKEDIRTARGET} lib build_install
        !           444:
        !           445: do-compat-lib: .PHONY .MAKE
        !           446:        ${MAKEDIRTARGET} compat build_install BOOTSTRAP_SUBDIRS="../../../lib"
1.276     mrg       447:
1.261     apb       448: do-top-obj: .PHONY .MAKE
                    449:        ${MAKEDIRTARGET} . obj NOSUBDIR=
                    450:
1.260     apb       451: do-tools-obj: .PHONY .MAKE
                    452:        ${MAKEDIRTARGET} tools obj
                    453:
1.242     dsl       454: do-build: .PHONY .MAKE
1.154     tv        455: .for targ in dependall install
1.232     lukem     456:        ${MAKEDIRTARGET} . ${targ} BUILD_tools=no BUILD_lib=no
1.154     tv        457: .endfor
1.200     lukem     458:
1.242     dsl       459: do-x11: .PHONY .MAKE
1.263     mrg       460: .if ${MKX11} != "no"
                    461: .if ${X11FLAVOUR} == "Xorg"
1.254     mrg       462:        ${MAKEDIRTARGET} external/mit/xorg build
1.263     mrg       463: .else
1.257     lukem     464:        ${MAKEDIRTARGET} x11 build
1.263     mrg       465: .endif
1.254     mrg       466: .else
1.263     mrg       467:        @echo "MKX11 is not enabled"
1.257     lukem     468:        @false
1.254     mrg       469: .endif
1.227     lukem     470:
1.275     uebayasi  471: do-extsrc: .PHONY .MAKE
                    472: .if ${MKEXTSRC} != "no"
                    473:        ${MAKEDIRTARGET} extsrc build
                    474: .else
                    475:        @echo "MKEXTSRC is not enabled"
                    476:        @false
                    477: .endif
                    478:
1.242     dsl       479: do-obsolete: .PHONY .MAKE
1.232     lukem     480:        ${MAKEDIRTARGET} etc install-obsolete-lists
1.87      cjs       481:
1.193     lukem     482: #
1.137     tv        483: # Speedup stubs for some subtrees that don't need to run these rules.
                    484: # (Tells <bsd.subdir.mk> not to recurse for them.)
1.193     lukem     485: #
1.129     tv        486:
1.292     veego     487: .for dir in bin etc distrib games libexec regress sbin usr.bin usr.sbin tools
1.228     lukem     488: includes-${dir}: .PHONY
1.152     tv        489:        @true
                    490: .endfor
                    491: .for dir in etc distrib regress
1.228     lukem     492: install-${dir}: .PHONY
1.152     tv        493:        @true
                    494: .endfor
                    495:
1.193     lukem     496: #
1.152     tv        497: # XXX this needs to change when distrib Makefiles are recursion compliant
1.193     lukem     498: # XXX many distrib subdirs need "cd etc && make snap_pre snap_kern" first...
                    499: #
1.228     lukem     500: dependall-distrib depend-distrib all-distrib: .PHONY
1.136     nathanw   501:        @true
1.130     tv        502:
1.211     lukem     503: .include <bsd.sys.mk>
1.151     tv        504: .include <bsd.obj.mk>
1.209     lukem     505: .include <bsd.kernobj.mk>
1.146     tv        506: .include <bsd.subdir.mk>
1.144     tv        507:
1.209     lukem     508: #
                    509: # Display current make(1) parameters
                    510: #
1.242     dsl       511: params: .PHONY .MAKE
1.232     lukem     512:        ${MAKEDIRTARGET} etc params

CVSweb <webmaster@jp.NetBSD.org>