From owner-svn-src-projects@FreeBSD.ORG Thu Apr 4 16:02:26 2013 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3E4EDEAE; Thu, 4 Apr 2013 16:02:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2E525D39; Thu, 4 Apr 2013 16:02:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34G2Q13012344; Thu, 4 Apr 2013 16:02:26 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34G2MDX012316; Thu, 4 Apr 2013 16:02:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304041602.r34G2MDX012316@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Apr 2013 16:02:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r249098 - in projects/camlock: . bin/dd bin/sh contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests etc/defaults etc/periodic/daily lib/libc/stdlib rescue/rescue sbin sbin/atacontrol... X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Apr 2013 16:02:26 -0000 Author: mav Date: Thu Apr 4 16:02:21 2013 New Revision: 249098 URL: http://svnweb.freebsd.org/changeset/base/249098 Log: MFC Added: projects/camlock/contrib/bmake/unit-tests/export-env - copied unchanged from r249097, head/contrib/bmake/unit-tests/export-env projects/camlock/etc/periodic/daily/401.status-graid - copied unchanged from r249097, head/etc/periodic/daily/401.status-graid projects/camlock/sys/dev/cfi/cfi_bus_nexus.c - copied unchanged from r249097, head/sys/dev/cfi/cfi_bus_nexus.c Deleted: projects/camlock/etc/periodic/daily/405.status-ata-raid projects/camlock/sbin/atacontrol/ projects/camlock/share/man/man4/atapicam.4 projects/camlock/share/man/man4/ataraid.4 projects/camlock/sys/dev/ata/ata-disk.c projects/camlock/sys/dev/ata/ata-disk.h projects/camlock/sys/dev/ata/ata-raid-ddf.h projects/camlock/sys/dev/ata/ata-raid.c projects/camlock/sys/dev/ata/ata-raid.h projects/camlock/sys/dev/ata/atapi-cam.c projects/camlock/sys/dev/ata/atapi-cd.c projects/camlock/sys/dev/ata/atapi-cd.h projects/camlock/sys/dev/ata/atapi-fd.c projects/camlock/sys/dev/ata/atapi-fd.h projects/camlock/sys/dev/ata/atapi-tape.c projects/camlock/sys/dev/ata/atapi-tape.h projects/camlock/sys/modules/ata/atacam/ projects/camlock/sys/modules/ata/atadisk/ projects/camlock/sys/modules/ata/atapicam/ projects/camlock/sys/modules/ata/atapicd/ projects/camlock/sys/modules/ata/atapifd/ projects/camlock/sys/modules/ata/atapist/ projects/camlock/sys/modules/ata/ataraid/ projects/camlock/usr.sbin/burncd/ Modified: projects/camlock/ObsoleteFiles.inc projects/camlock/bin/dd/dd.c projects/camlock/bin/sh/redir.c projects/camlock/contrib/bmake/ChangeLog projects/camlock/contrib/bmake/FILES projects/camlock/contrib/bmake/Makefile projects/camlock/contrib/bmake/bmake.1 projects/camlock/contrib/bmake/bmake.cat1 projects/camlock/contrib/bmake/boot-strap projects/camlock/contrib/bmake/configure projects/camlock/contrib/bmake/configure.in projects/camlock/contrib/bmake/dir.c projects/camlock/contrib/bmake/job.c projects/camlock/contrib/bmake/job.h projects/camlock/contrib/bmake/main.c projects/camlock/contrib/bmake/make.1 projects/camlock/contrib/bmake/make.h projects/camlock/contrib/bmake/meta.c projects/camlock/contrib/bmake/meta.h projects/camlock/contrib/bmake/mk/ChangeLog projects/camlock/contrib/bmake/mk/dirdeps.mk projects/camlock/contrib/bmake/mk/gendirdeps.mk projects/camlock/contrib/bmake/mk/install-mk projects/camlock/contrib/bmake/mk/meta.stage.mk projects/camlock/contrib/bmake/mk/meta2deps.py projects/camlock/contrib/bmake/mk/meta2deps.sh projects/camlock/contrib/bmake/mk/sys.dependfile.mk projects/camlock/contrib/bmake/parse.c projects/camlock/contrib/bmake/unit-tests/Makefile.in projects/camlock/contrib/bmake/unit-tests/test.exp projects/camlock/contrib/bmake/var.c projects/camlock/etc/defaults/periodic.conf projects/camlock/etc/periodic/daily/Makefile projects/camlock/lib/libc/stdlib/rand.3 projects/camlock/lib/libc/stdlib/rand.c projects/camlock/lib/libc/stdlib/random.3 projects/camlock/lib/libc/stdlib/random.c projects/camlock/rescue/rescue/Makefile projects/camlock/sbin/Makefile projects/camlock/sbin/geom/class/raid/graid.8 projects/camlock/sbin/geom/class/stripe/gstripe.8 projects/camlock/sbin/nvmecontrol/nvmecontrol.c projects/camlock/share/man/man4/Makefile projects/camlock/share/man/man4/ata.4 projects/camlock/share/man/man4/igb.4 projects/camlock/share/man/man5/devfs.conf.5 projects/camlock/share/man/man5/periodic.conf.5 projects/camlock/share/man/man5/rc.conf.5 projects/camlock/share/man/man7/hier.7 projects/camlock/share/mk/sys.mk projects/camlock/sys/amd64/conf/GENERIC projects/camlock/sys/arm/conf/AC100 projects/camlock/sys/arm/conf/ARMADAXP projects/camlock/sys/arm/conf/AVILA projects/camlock/sys/arm/conf/CAMBRIA projects/camlock/sys/arm/conf/CRB projects/camlock/sys/arm/conf/CUBIEBOARD projects/camlock/sys/arm/conf/EFIKA_MX projects/camlock/sys/arm/conf/EP80219 projects/camlock/sys/arm/conf/IQ31244 projects/camlock/sys/arm/conf/TS7800 projects/camlock/sys/cam/ata/ata_da.c projects/camlock/sys/cam/cam_xpt.c projects/camlock/sys/cam/ctl/ctl.c projects/camlock/sys/cam/ctl/ctl_backend_block.c projects/camlock/sys/cam/ctl/scsi_ctl.c projects/camlock/sys/cam/scsi/scsi_da.c projects/camlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c projects/camlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c projects/camlock/sys/conf/NOTES projects/camlock/sys/conf/files projects/camlock/sys/conf/files.sparc64 projects/camlock/sys/conf/options projects/camlock/sys/dev/ahci/ahciem.c projects/camlock/sys/dev/ata/ata-all.c projects/camlock/sys/dev/ata/ata-all.h projects/camlock/sys/dev/ata/ata-cbus.c projects/camlock/sys/dev/ata/ata-dma.c projects/camlock/sys/dev/ata/ata-lowlevel.c projects/camlock/sys/dev/ata/ata-pci.c projects/camlock/sys/dev/ata/ata-pci.h projects/camlock/sys/dev/ata/ata-queue.c projects/camlock/sys/dev/ata/ata-sata.c projects/camlock/sys/dev/ata/ata_if.m projects/camlock/sys/dev/ata/chipsets/ata-acard.c projects/camlock/sys/dev/ata/chipsets/ata-acerlabs.c projects/camlock/sys/dev/ata/chipsets/ata-intel.c projects/camlock/sys/dev/ata/chipsets/ata-ite.c projects/camlock/sys/dev/ata/chipsets/ata-serverworks.c projects/camlock/sys/dev/ata/chipsets/ata-siliconimage.c projects/camlock/sys/dev/ath/if_ath_rx.c projects/camlock/sys/dev/ath/if_ath_rx.h projects/camlock/sys/dev/ath/if_ath_rx_edma.c projects/camlock/sys/dev/drm2/drm_edid.c projects/camlock/sys/dev/drm2/i915/intel_iic.c projects/camlock/sys/dev/drm2/i915/intel_modes.c projects/camlock/sys/dev/drm2/i915/intel_sdvo.c projects/camlock/sys/dev/e1000/if_em.c projects/camlock/sys/dev/e1000/if_igb.c projects/camlock/sys/dev/e1000/if_lem.c projects/camlock/sys/dev/hwpmc/hwpmc_core.c projects/camlock/sys/dev/hwpmc/hwpmc_intel.c projects/camlock/sys/dev/hwpmc/hwpmc_uncore.c projects/camlock/sys/dev/hwpmc/pmc_events.h projects/camlock/sys/dev/md/md.c projects/camlock/sys/dev/usb/misc/udbp.c projects/camlock/sys/dev/usb/usb_device.c projects/camlock/sys/dev/usb/usbdevs projects/camlock/sys/i386/conf/GENERIC projects/camlock/sys/i386/conf/XBOX projects/camlock/sys/ia64/conf/GENERIC projects/camlock/sys/kern/init_main.c projects/camlock/sys/kern/subr_bus_dma.c projects/camlock/sys/mips/atheros/uart_dev_ar933x.c projects/camlock/sys/mips/conf/AR933X_BASE.hints projects/camlock/sys/mips/conf/OCTEON1 projects/camlock/sys/mips/conf/XLR projects/camlock/sys/mips/conf/XLR64 projects/camlock/sys/mips/conf/XLRN32 projects/camlock/sys/mips/conf/std.SWARM projects/camlock/sys/mips/conf/std.XLP projects/camlock/sys/mips/malta/std.malta projects/camlock/sys/modules/ata/Makefile projects/camlock/sys/modules/ctl/Makefile projects/camlock/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c projects/camlock/sys/pc98/conf/GENERIC projects/camlock/sys/pc98/conf/NOTES projects/camlock/sys/powerpc/conf/GENERIC projects/camlock/sys/powerpc/conf/GENERIC64 projects/camlock/sys/powerpc/conf/MPC85XX projects/camlock/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c projects/camlock/sys/sparc64/conf/GENERIC projects/camlock/sys/sys/bus.h projects/camlock/sys/ufs/ffs/ffs_softdep.c projects/camlock/sys/vm/vm_radix.c projects/camlock/usr.bin/bmake/Makefile projects/camlock/usr.bin/bmake/config.h projects/camlock/usr.bin/bmake/unit-tests/Makefile projects/camlock/usr.sbin/Makefile projects/camlock/usr.sbin/bsdconfig/share/device.subr projects/camlock/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Directory Properties: projects/camlock/ (props changed) projects/camlock/contrib/bmake/ (props changed) projects/camlock/lib/libc/ (props changed) projects/camlock/sbin/ (props changed) projects/camlock/share/man/man4/ (props changed) projects/camlock/sys/ (props changed) projects/camlock/sys/cddl/contrib/opensolaris/ (props changed) projects/camlock/sys/conf/ (props changed) Modified: projects/camlock/ObsoleteFiles.inc ============================================================================== --- projects/camlock/ObsoleteFiles.inc Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/ObsoleteFiles.inc Thu Apr 4 16:02:21 2013 (r249098) @@ -38,6 +38,13 @@ # xargs -n1 | sort | uniq -d; # done +# 20130404: legacy ATA stack removed +OLD_FILES+=sbin/atacontrol +OLD_FILES+=usr/share/man/man8/atacontrol.8.gz +OLD_FILES+=usr/share/man/man4/atapicam.4.gz +OLD_FILES+=usr/share/man/man4/ataraid.4.gz +OLD_FILES+=usr.sbin/burncd +OLD_FILES+=usr/share/man/man8/burncd.8.gz # 20130316: vinum.4 removed OLD_FILES+=usr/share/man/man4/vinum.4.gz # 20130312: fortunes-o removed Modified: projects/camlock/bin/dd/dd.c ============================================================================== --- projects/camlock/bin/dd/dd.c Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/bin/dd/dd.c Thu Apr 4 16:02:21 2013 (r249098) @@ -98,6 +98,13 @@ main(int argc __unused, char *argv[]) dd_in(); dd_close(); + /* + * Some devices such as cfi(4) may perform significant amounts + * of work when a write descriptor is closed. Close the out + * descriptor explicitly so that the summary handler (called + * from an atexit() hook) includes this work. + */ + close(out.fd); exit(0); } Modified: projects/camlock/bin/sh/redir.c ============================================================================== --- projects/camlock/bin/sh/redir.c Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/bin/sh/redir.c Thu Apr 4 16:02:21 2013 (r249098) @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #define EMPTY -2 /* marks an unused slot in redirtab */ #define CLOSED -1 /* fd was not open before redir */ -#define PIPESIZE 4096 /* amount of buffering in a pipe */ MKINIT @@ -253,7 +252,9 @@ openhere(union node *redir) { char *p; int pip[2]; - int len = 0; + size_t len = 0; + int flags; + ssize_t written = 0; if (pipe(pip) < 0) error("Pipe call failed: %s", strerror(errno)); @@ -263,9 +264,16 @@ openhere(union node *redir) else p = redir->nhere.doc->narg.text; len = strlen(p); - if (len <= PIPESIZE) { - xwrite(pip[1], p, len); + if (len == 0) goto out; + flags = fcntl(pip[1], F_GETFL, 0); + if (flags != -1 && fcntl(pip[1], F_SETFL, flags | O_NONBLOCK) != -1) { + written = write(pip[1], p, len); + if (written < 0) + written = 0; + if ((size_t)written == len) + goto out; + fcntl(pip[1], F_SETFL, flags); } if (forkshell((struct job *)NULL, (union node *)NULL, FORK_NOJOB) == 0) { @@ -275,7 +283,7 @@ openhere(union node *redir) signal(SIGHUP, SIG_IGN); signal(SIGTSTP, SIG_IGN); signal(SIGPIPE, SIG_DFL); - xwrite(pip[1], p, len); + xwrite(pip[1], p + written, len - written); _exit(0); } out: Modified: projects/camlock/contrib/bmake/ChangeLog ============================================================================== --- projects/camlock/contrib/bmake/ChangeLog Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/ChangeLog Thu Apr 4 16:02:21 2013 (r249098) @@ -1,3 +1,47 @@ +2013-03-30 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130330 + Merge with NetBSD make, pick up + o meta.c: refine the handling of .OODATE in commands. + Rather than suppress command comparison for the entire script + as though .NOMETA_CMP had been used, only suppress it for the + one command line. + This allows something like ${.OODATE:M.NOMETA_CMP} to be used to + suppress comparison of a command without otherwise affecting it. + o make.1: document that + +2013-03-22 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130321 + yes, not quite right but its a cooler number. + Merge with NetBSD make, pick up + o parse.c: fix ParseGmakeExport to be portable + and add a unit-test. + * meta.c: call meta_init() before makefiles are read and if built + with filemon support set .MAKE.PATH_FILEMON to _PATH_FILEMON + this let's makefiles test for support. + Call meta_mode_init() to process .MAKE.MODE. + +2013-03-13 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130305 + Merge with NetBSD make, pick up + o run .STALE: target when a dependency from .depend is missing. + o job.c: add Job_RunTarget() for the above and .BEGIN + +2013-03-03 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130303 + Merge with NetBSD make, pick up + o main.c: set .MAKE.OS to utsname.sysname + o job.c: more checks for read and poll errors + o var.c: lose VarChangeCase() saves 4% time + +2013-03-02 Simon J. Gerraty + + * boot-strap: remove MAKEOBJDIRPREFIX from environment since we + want to use MAKEOBJDIR + 2013-01-27 Simon J. Gerraty * Merge with NetBSD make, pick up Modified: projects/camlock/contrib/bmake/FILES ============================================================================== --- projects/camlock/contrib/bmake/FILES Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/FILES Thu Apr 4 16:02:21 2013 (r249098) @@ -102,6 +102,7 @@ unit-tests/dotwait unit-tests/error unit-tests/export unit-tests/export-all +unit-tests/export-env unit-tests/forloop unit-tests/forsubst unit-tests/hash Modified: projects/camlock/contrib/bmake/Makefile ============================================================================== --- projects/camlock/contrib/bmake/Makefile Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/Makefile Thu Apr 4 16:02:21 2013 (r249098) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.5 2013/01/28 19:31:58 sjg Exp $ +# $Id: Makefile,v 1.10 2013/03/31 05:57:19 sjg Exp $ # Base version on src date -MAKE_VERSION= 20130123 +MAKE_VERSION= 20130330 PROG= bmake @@ -187,14 +187,14 @@ MANDIR= ${SHAREDIR}/man .if !exists(.depend) ${OBJS}: config.h .endif -.if ${MK_AUTOCONF_MK} == "yes" -.include -.endif # make sure that MAKE_VERSION gets updated. main.o: ${SRCS} ${MAKEFILE} # start-delete2 for bsd.after-import.mk +.if ${MK_AUTOCONF_MK} == "yes" +.include +.endif SHARE_MK?=${SHAREDIR}/mk MKSRC=${srcdir}/mk INSTALL?=${srcdir}/install-sh Modified: projects/camlock/contrib/bmake/bmake.1 ============================================================================== --- projects/camlock/contrib/bmake/bmake.1 Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/bmake.1 Thu Apr 4 16:02:21 2013 (r249098) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.210 2013/01/27 18:52:01 sjg Exp $ +.\" $NetBSD: make.1,v 1.213 2013/03/31 05:49:51 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd January 23, 2013 +.Dd March 30, 2013 .Dt MAKE 1 .Os .Sh NAME @@ -874,6 +874,13 @@ by appending their names to is re-exported whenever .Ql Va .MAKEOVERRIDES is modified. +.It Va .MAKE.PATH_FILEMON +If +.Nm +was built with +.Xr filemon 4 +support, this is set to the path of the device node. +This allows makefiles to test for this support. .It Va .MAKE.PID The process-id of .Nm . @@ -1757,6 +1764,20 @@ targets. Ignore differences in commands when deciding if target is out of date. This is useful if the command contains a value which always changes. If the number of commands change, though, the target will still be out of date. +The same effect applies to any command line that uses the variable +.Va .OODATE , +which can be used for that purpose even when not otherwise needed or desired: +.Bd -literal -offset indent + +skip-compare-for-some: + @echo this will be compared + @echo this will not ${.OODATE:M.NOMETA_CMP} + @echo this will also be compared + +.Ed +The +.Cm \&:M +pattern suppresses any expansion of the unwanted variable. .It Ic .NOPATH Do not search for the target in the directories specified by .Ic .PATH . @@ -2008,6 +2029,10 @@ If no sources are specified, the .Ic .SILENT attribute is applied to every command in the file. +.It Ic .STALE +This target gets run when a dependency file contains stale entries, having +.Va .ALLSRC +set to the name of that dependency file. .It Ic .SUFFIXES Each source specifies a suffix to .Nm . Modified: projects/camlock/contrib/bmake/bmake.cat1 ============================================================================== --- projects/camlock/contrib/bmake/bmake.cat1 Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/bmake.cat1 Thu Apr 4 16:02:21 2013 (r249098) @@ -565,6 +565,11 @@ VVAARRIIAABBLLEE AASSSSIIGG `MAKEFLAGS' is re-exported whenever `_._M_A_K_E_O_V_E_R_R_I_D_E_S' is modified. + _._M_A_K_E_._P_A_T_H___F_I_L_E_M_O_N + If bbmmaakkee was built with filemon(4) support, this is set + to the path of the device node. This allows makefiles to + test for this support. + _._M_A_K_E_._P_I_D The process-id of bbmmaakkee. _._M_A_K_E_._P_P_I_D The parent process-id of bbmmaakkee. @@ -1106,7 +1111,19 @@ SSPPEECCIIAALL SSOOUURRCCEE Ignore differences in commands when deciding if target is out of date. This is useful if the command contains a value which always changes. If the number of commands change, though, the - target will still be out of date. + target will still be out of date. The same effect applies to + any command line that uses the variable _._O_O_D_A_T_E, which can be + used for that purpose even when not otherwise needed or + desired: + + + skip-compare-for-some: + @echo this will be compared + @echo this will not ${.OODATE:M.NOMETA_CMP} + @echo this will also be compared + + The ::MM pattern suppresses any expansion of the unwanted vari- + able. ..NNOOPPAATTHH Do not search for the target in the directories specified by ..PPAATTHH. @@ -1278,6 +1295,9 @@ SSPPEECCIIAALL TTAARRGGEETT sources are specified, the ..SSIILLEENNTT attribute is applied to every command in the file. + ..SSTTAALLEE This target gets run when a dependency file contains stale + entries, having _._A_L_L_S_R_C set to the name of that dependency file. + ..SSUUFFFFIIXXEESS Each source specifies a suffix to bbmmaakkee. If no sources are specified, any previously specified suffixes are deleted. It @@ -1340,4 +1360,4 @@ BBUUGGSS There is no way of escaping a space character in a filename. -NetBSD 5.1 January 23, 2013 NetBSD 5.1 +NetBSD 5.1 March 30, 2013 NetBSD 5.1 Modified: projects/camlock/contrib/bmake/boot-strap ============================================================================== --- projects/camlock/contrib/bmake/boot-strap Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/boot-strap Thu Apr 4 16:02:21 2013 (r249098) @@ -111,7 +111,7 @@ # Simon J. Gerraty # RCSid: -# $Id: boot-strap,v 1.42 2013/01/25 20:20:33 sjg Exp $ +# $Id: boot-strap,v 1.43 2013/03/02 18:55:23 sjg Exp $ # # @(#) Copyright (c) 2001 Simon J. Gerraty # @@ -159,6 +159,9 @@ source_rc() { cmd_args="$@" +# clear some things from the environment that we care about +unset MAKEOBJDIR MAKEOBJDIRPREFIX + # --install[-host-target] will set this INSTALL_PREFIX= # other things we pass to install step Modified: projects/camlock/contrib/bmake/configure ============================================================================== Binary file (source and/or target). No diff available. Modified: projects/camlock/contrib/bmake/configure.in ============================================================================== --- projects/camlock/contrib/bmake/configure.in Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/configure.in Thu Apr 4 16:02:21 2013 (r249098) @@ -1,10 +1,10 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.46 2012/12/28 21:28:18 sjg Exp $ +dnl $Id: configure.in,v 1.48 2013/03/04 21:25:57 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl -AC_INIT([bmake], [20121212], [sjg@NetBSD.org]) +AC_INIT([bmake], [20130303], [sjg@NetBSD.org]) AC_CONFIG_HEADER(config.h) dnl make srcdir absolute Modified: projects/camlock/contrib/bmake/dir.c ============================================================================== --- projects/camlock/contrib/bmake/dir.c Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/dir.c Thu Apr 4 16:02:21 2013 (r249098) @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $ */ +/* $NetBSD: dir.c,v 1.67 2013/03/05 22:01:43 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $"; +static char rcsid[] = "$NetBSD: dir.c,v 1.67 2013/03/05 22:01:43 christos Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $"); +__RCSID("$NetBSD: dir.c,v 1.67 2013/03/05 22:01:43 christos Exp $"); #endif #endif /* not lint */ #endif @@ -145,6 +145,7 @@ __RCSID("$NetBSD: dir.c,v 1.65 2012/06/1 #include "make.h" #include "hash.h" #include "dir.h" +#include "job.h" /* * A search path consists of a Lst of Path structures. A Path structure @@ -1463,9 +1464,11 @@ Dir_MTime(GNode *gn, Boolean recheck) * so that we give that to the compiler. */ gn->path = bmake_strdup(fullName); - fprintf(stdout, - "%s: ignoring stale %s for %s, found %s\n", - progname, makeDependfile, gn->name, fullName); + if (!Job_RunTarget(".STALE", gn->fname)) + fprintf(stdout, + "%s: %s, %d: ignoring stale %s for %s, " + "found %s\n", progname, gn->fname, gn->lineno, + makeDependfile, gn->name, fullName); } } } Modified: projects/camlock/contrib/bmake/job.c ============================================================================== --- projects/camlock/contrib/bmake/job.c Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/job.c Thu Apr 4 16:02:21 2013 (r249098) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.165 2013/01/26 15:52:59 christos Exp $ */ +/* $NetBSD: job.c,v 1.172 2013/03/05 22:01:43 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.165 2013/01/26 15:52:59 christos Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.172 2013/03/05 22:01:43 christos Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.165 2013/01/26 15:52:59 christos Exp $"); +__RCSID("$NetBSD: job.c,v 1.172 2013/03/05 22:01:43 christos Exp $"); #endif #endif /* not lint */ #endif @@ -142,6 +142,7 @@ __RCSID("$NetBSD: job.c,v 1.165 2013/01/ #include #include "wait.h" +#include #include #include #if !defined(USE_SELECT) && defined(HAVE_POLL_H) @@ -1245,8 +1246,10 @@ Job_CheckCommands(GNode *gn, void (*abor static const char msg[] = ": don't know how to make"; if (gn->flags & FROM_DEPEND) { - fprintf(stdout, "%s: ignoring stale %s for %s\n", - progname, makeDependfile, gn->name); + if (!Job_RunTarget(".STALE", gn->fname)) + fprintf(stdout, "%s: %s, %d: ignoring stale %s for %s\n", + progname, gn->fname, gn->lineno, makeDependfile, + gn->name); return TRUE; } @@ -2063,32 +2066,45 @@ Job_CatchOutput(void) (void)fflush(stdout); /* The first fd in the list is the job token pipe */ - nready = poll(fds + 1 - wantToken, nfds - 1 + wantToken, POLL_MSEC); + do { + nready = poll(fds + 1 - wantToken, nfds - 1 + wantToken, POLL_MSEC); + } while (nready < 0 && errno == EINTR); - if (nready < 0 || readyfd(&childExitJob)) { + if (nready < 0) + Punt("poll: %s", strerror(errno)); + + if (nready > 0 && readyfd(&childExitJob)) { char token = 0; - nready -= 1; - while (read(childExitJob.inPipe, &token, 1) == -1 && errno == EAGAIN) - continue; - if (token == DO_JOB_RESUME[0]) - /* Complete relay requested from our SIGCONT handler */ - JobRestartJobs(); - Job_CatchChildren(); + ssize_t count; + count = read(childExitJob.inPipe, &token, 1); + switch (count) { + case 0: + Punt("unexpected eof on token pipe"); + case -1: + Punt("token pipe read: %s", strerror(errno)); + case 1: + if (token == DO_JOB_RESUME[0]) + /* Complete relay requested from our SIGCONT handler */ + JobRestartJobs(); + break; + default: + abort(); + } + --nready; } - if (nready <= 0) - return; - - if (wantToken && readyfd(&tokenWaitJob)) - nready--; + Job_CatchChildren(); + if (nready == 0) + return; for (i = 2; i < nfds; i++) { if (!fds[i].revents) continue; job = jobfds[i]; - if (job->job_state != JOB_ST_RUNNING) - continue; - JobDoOutput(job, FALSE); + if (job->job_state == JOB_ST_RUNNING) + JobDoOutput(job, FALSE); + if (--nready == 0) + return; } } @@ -2179,8 +2195,6 @@ Job_SetPrefix(void) void Job_Init(void) { - GNode *begin; /* node for commands to do at the very start */ - /* Allocate space for all the job info */ job_table = bmake_malloc(maxJobs * sizeof *job_table); memset(job_table, 0, maxJobs * sizeof *job_table); @@ -2256,15 +2270,7 @@ Job_Init(void) ADDSIG(SIGCONT, JobContinueSig) #undef ADDSIG - begin = Targ_FindNode(".BEGIN", TARG_NOCREATE); - - if (begin != NULL) { - JobRun(begin); - if (begin->made == ERROR) { - PrintOnError(begin, "\n\nStop."); - exit(1); - } - } + (void)Job_RunTarget(".BEGIN", NULL); postCommands = Targ_FindNode(".END", TARG_CREATE); } @@ -2930,6 +2936,38 @@ Job_TokenWithdraw(void) return TRUE; } +/*- + *----------------------------------------------------------------------- + * Job_RunTarget -- + * Run the named target if found. If a filename is specified, then + * set that to the sources. + * + * Results: + * None + * + * Side Effects: + * exits if the target fails. + * + *----------------------------------------------------------------------- + */ +Boolean +Job_RunTarget(const char *target, const char *fname) { + GNode *gn = Targ_FindNode(target, TARG_NOCREATE); + + if (gn == NULL) + return FALSE; + + if (fname) + Var_Set(ALLSRC, fname, gn, 0); + + JobRun(gn); + if (gn->made == ERROR) { + PrintOnError(gn, "\n\nStop."); + exit(1); + } + return TRUE; +} + #ifdef USE_SELECT int emul_poll(struct pollfd *fd, int nfd, int timeout) Modified: projects/camlock/contrib/bmake/job.h ============================================================================== --- projects/camlock/contrib/bmake/job.h Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/job.h Thu Apr 4 16:02:21 2013 (r249098) @@ -1,4 +1,4 @@ -/* $NetBSD: job.h,v 1.40 2010/09/13 15:36:57 sjg Exp $ */ +/* $NetBSD: job.h,v 1.41 2013/03/05 22:01:44 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -268,5 +268,6 @@ void Job_TokenReturn(void); Boolean Job_TokenWithdraw(void); void Job_ServerStart(int, int, int); void Job_SetPrefix(void); +Boolean Job_RunTarget(const char *, const char *); #endif /* _JOB_H_ */ Modified: projects/camlock/contrib/bmake/main.c ============================================================================== --- projects/camlock/contrib/bmake/main.c Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/main.c Thu Apr 4 16:02:21 2013 (r249098) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.205 2013/01/26 15:53:00 christos Exp $ */ +/* $NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.205 2013/01/26 15:53:00 christos Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.205 2013/01/26 15:53:00 christos Exp $"); +__RCSID("$NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -119,9 +119,7 @@ __RCSID("$NetBSD: main.c,v 1.205 2013/01 #include #include #include -#ifdef MAKE_NATIVE #include -#endif #include "wait.h" #include @@ -768,7 +766,7 @@ MakeMode(const char *mode) } #if USE_META if (strstr(mode, "meta")) - meta_init(mode); + meta_mode_init(mode); #endif } if (mp) @@ -813,9 +811,7 @@ main(int argc, char **argv) static char defsyspath[] = _PATH_DEFSYSPATH; char found_path[MAXPATHLEN + 1]; /* for searching for sys.mk */ struct timeval rightnow; /* to initialize random seed */ -#ifdef MAKE_NATIVE struct utsname utsname; -#endif /* default to writing debug to stderr */ debug_file = stderr; @@ -834,7 +830,7 @@ main(int argc, char **argv) progname++; else progname = argv[0]; -#ifdef RLIMIT_NOFILE +#if defined(MAKE_NATIVE) || (defined(HAVE_SETRLIMIT) && defined(RLIMIT_NOFILE)) /* * get rid of resource limit on file descriptors */ @@ -848,6 +844,12 @@ main(int argc, char **argv) } #endif + if (uname(&utsname) == -1) { + (void)fprintf(stderr, "%s: uname failed (%s).\n", progname, + strerror(errno)); + exit(2); + } + /* * Get the name of this type of MACHINE from utsname * so we can share an executable for similar machines. @@ -858,11 +860,6 @@ main(int argc, char **argv) */ if (!machine) { #ifdef MAKE_NATIVE - if (uname(&utsname) == -1) { - (void)fprintf(stderr, "%s: uname failed (%s).\n", progname, - strerror(errno)); - exit(2); - } machine = utsname.machine; #else #ifdef MAKE_MACHINE @@ -892,6 +889,7 @@ main(int argc, char **argv) */ Var_Init(); /* Initialize the lists of variables for * parsing arguments */ + Var_Set(".MAKE.OS", utsname.sysname, VAR_GLOBAL, 0); Var_Set("MACHINE", machine, VAR_GLOBAL, 0); Var_Set("MACHINE_ARCH", machine_arch, VAR_GLOBAL, 0); #ifdef MAKE_VERSION @@ -987,6 +985,9 @@ main(int argc, char **argv) } Job_SetPrefix(); +#ifdef USE_META + meta_init(); +#endif /* * First snag any flags out of the MAKE environment variable. * (Note this is *not* MAKEFLAGS since /bin/make uses that and it's @@ -1697,7 +1698,7 @@ Finish(int errors) } /* - * enunlink -- + * eunlink -- * Remove a file carefully, avoiding directories. */ int Modified: projects/camlock/contrib/bmake/make.1 ============================================================================== --- projects/camlock/contrib/bmake/make.1 Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/make.1 Thu Apr 4 16:02:21 2013 (r249098) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.210 2013/01/27 18:52:01 sjg Exp $ +.\" $NetBSD: make.1,v 1.213 2013/03/31 05:49:51 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd January 23, 2013 +.Dd March 30, 2013 .Dt MAKE 1 .Os .Sh NAME @@ -874,6 +874,13 @@ by appending their names to is re-exported whenever .Ql Va .MAKEOVERRIDES is modified. +.It Va .MAKE.PATH_FILEMON +If +.Nm +was built with +.Xr filemon 4 +support, this is set to the path of the device node. +This allows makefiles to test for this support. .It Va .MAKE.PID The process-id of .Nm . @@ -1757,6 +1764,20 @@ targets. Ignore differences in commands when deciding if target is out of date. This is useful if the command contains a value which always changes. If the number of commands change, though, the target will still be out of date. +The same effect applies to any command line that uses the variable +.Va .OODATE , +which can be used for that purpose even when not otherwise needed or desired: +.Bd -literal -offset indent + +skip-compare-for-some: + @echo this will be compared + @echo this will not ${.OODATE:M.NOMETA_CMP} + @echo this will also be compared + +.Ed +The +.Cm \&:M +pattern suppresses any expansion of the unwanted variable. .It Ic .NOPATH Do not search for the target in the directories specified by .Ic .PATH . @@ -2008,6 +2029,10 @@ If no sources are specified, the .Ic .SILENT attribute is applied to every command in the file. +.It Ic .STALE +This target gets run when a dependency file contains stale entries, having +.Va .ALLSRC +set to the name of that dependency file. .It Ic .SUFFIXES Each source specifies a suffix to .Nm . Modified: projects/camlock/contrib/bmake/make.h ============================================================================== --- projects/camlock/contrib/bmake/make.h Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/make.h Thu Apr 4 16:02:21 2013 (r249098) @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.89 2012/06/12 19:21:51 joerg Exp $ */ +/* $NetBSD: make.h,v 1.90 2013/02/25 01:57:14 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -103,7 +103,7 @@ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \ (__GNUC__ > (x))) #else /* defined(__GNUC__) */ -#define MAKE_GNUC_PREREQx, y) 0 +#define MAKE_GNUC_PREREQ(x, y) 0 #endif /* defined(__GNUC__) */ #if MAKE_GNUC_PREREQ(2, 7) Modified: projects/camlock/contrib/bmake/meta.c ============================================================================== --- projects/camlock/contrib/bmake/meta.c Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/meta.c Thu Apr 4 16:02:21 2013 (r249098) @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.26 2013/01/19 04:23:37 sjg Exp $ */ +/* $NetBSD: meta.c,v 1.29 2013/03/31 05:49:51 sjg Exp $ */ /* * Implement 'meta' mode. @@ -539,8 +539,24 @@ boolValue(char *s) return TRUE; } +/* + * Initialization we need before reading makefiles. + */ +void +meta_init() +{ +#ifdef USE_FILEMON + /* this allows makefiles to test if we have filemon support */ + Var_Set(".MAKE.PATH_FILEMON", _PATH_FILEMON, VAR_GLOBAL, 0); +#endif +} + + +/* + * Initialization we need after reading makefiles. + */ void -meta_init(const char *make_mode) +meta_mode_init(const char *make_mode) { static int once = 0; char *cp; @@ -1037,6 +1053,7 @@ meta_oodate(GNode *gn, Boolean oodate) char *tp = Lst_Datum(ln); Lst_Remove(missingFiles, ln); free(tp); + ln = NULL; /* we're done with it */ } } break; @@ -1196,17 +1213,19 @@ meta_oodate(GNode *gn, Boolean oodate) oodate = TRUE; } else { char *cmd = (char *)Lst_Datum(ln); + Boolean hasOODATE = FALSE; - if (!needOODATE) { - if (strstr(cmd, "$?")) - needOODATE = TRUE; - else if ((cp = strstr(cmd, ".OODATE"))) { - /* check for $[{(].OODATE[)}] */ - if (cp > cmd + 2 && cp[-2] == '$') - needOODATE = TRUE; - } - if (needOODATE && DEBUG(META)) - fprintf(debug_file, "%s: %d: cannot compare commands using .OODATE\n", fname, lineno); + if (strstr(cmd, "$?")) + hasOODATE = TRUE; + else if ((cp = strstr(cmd, ".OODATE"))) { + /* check for $[{(].OODATE[:)}] */ + if (cp > cmd + 2 && cp[-2] == '$') + hasOODATE = TRUE; + } + if (hasOODATE) { + needOODATE = TRUE; + if (DEBUG(META)) + fprintf(debug_file, "%s: %d: cannot compare command using .OODATE\n", fname, lineno); } cmd = Var_Subst(NULL, cmd, gn, TRUE); @@ -1235,7 +1254,7 @@ meta_oodate(GNode *gn, Boolean oodate) if (buf[x - 1] == '\n') buf[x - 1] = '\0'; } - if (!needOODATE && + if (!hasOODATE && !(gn->type & OP_NOMETA_CMP) && strcmp(p, cmd) != 0) { if (DEBUG(META)) Modified: projects/camlock/contrib/bmake/meta.h ============================================================================== --- projects/camlock/contrib/bmake/meta.h Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/meta.h Thu Apr 4 16:02:21 2013 (r249098) @@ -1,4 +1,4 @@ -/* $NetBSD: meta.h,v 1.2 2011/03/30 22:03:49 sjg Exp $ */ +/* $NetBSD: meta.h,v 1.3 2013/03/23 05:31:29 sjg Exp $ */ /* * Things needed for 'meta' mode. @@ -41,7 +41,8 @@ typedef struct BuildMon { extern Boolean useMeta; struct Job; /* not defined yet */ -void meta_init(const char *); +void meta_init(void); +void meta_mode_init(const char *); void meta_job_start(struct Job *, GNode *); void meta_job_child(struct Job *); void meta_job_error(struct Job *, GNode *, int, int); Modified: projects/camlock/contrib/bmake/mk/ChangeLog ============================================================================== --- projects/camlock/contrib/bmake/mk/ChangeLog Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/mk/ChangeLog Thu Apr 4 16:02:21 2013 (r249098) @@ -1,3 +1,71 @@ +2013-03-30 Simon J. Gerraty + + * meta2deps.py (MetaFile.__init__): ensure self.cwd is initialized. + * install-mk (MK_VERSION): bump version + +2013-03-21 Simon J. Gerraty + + * install-mk (MK_VERSION): bump version + * gendirdeps.mk: do not apply :tA to DPADD entries, since we lose + any trailing /., rather apply :tA only when needed. + * gendirdeps.mk: better mimic meta2deps handling of .dirdep files. + * meta.stage.mk (LN_CP_SCRIPT): Add LnCp to do the ln||cp dance + consistently. + * dirdeps.mk: better describe the dance in sys.mk for TARGET_SPEC. + +2013-03-18 Simon J. Gerraty + + * gendirdeps.mk: revert the dance around .MAKE.DEPENDFILE_DEFAULT + it is simpler to just not update when say building for "host" + (where we know we apply filters to DIRDEPS), and using a + non-machine qualified dependfile. + +2013-03-16 Simon J. Gerraty + + * dirdeps.mk: improve DIRDEPS filtering by allowing DEP_SKIP_DIR + and DEP_DIRDEPS_FILTER to vary by DEP_MACHINE and DEP_TARGET_SPEC + * gendirdeps.mk: ensure _objroot has trailing / if it needs it. + * meta2deps.py: if machine is "host", then also trim + self.host_target from any OBJROOTS. + + +2013-03-11 Simon J. Gerraty + + * gendirdeps.mk: if .MAKE.DEPENDFILE_DEFAULT is not machine + qualified but _DEPENDFILE is, and .MAKE.DEPENDFILE_DEFAULT exists + but _DEPENDFILE does not, compare the new _DEPENDFILE against + .MAKE.DEPENDFILE_DEFAULT and discard if the same. + +2013-03-08 Simon J. Gerraty + + * meta.stage.mk: use STAGE_TARGETS to control .ORDER + and hook to all: via staging: + +2013-03-07 Simon J. Gerraty + + * sys.dependfile.mk (.MAKE.DEPENDFILE_DEFAULT): + use a separate variable for the default .MAKE.DEPENDFILE value + so that it can be controlled independently of + .MAKE.DEPENDFILE_PREFERENCE + + * meta.stage.mk: throw error if cp fails etc. + Stage*() return early if passed no args. + .ORDER stage_* + +2013-03-03 Simon J. Gerraty + + * install-mk (MK_VERSION): bump version + * gendirdeps.mk: handle multiple M2D_OBJROOTS better. + +2013-02-10 Simon J. Gerraty + + * install-mk (MK_VERSION): bump version to 20130210 + * import latest dirdeps.mk, gendirdeps.mk and meta2deps.py + from Juniper. + o dirdeps.mk now fully supports TARGET_SPEC consisting of more + than just MACHINE. + o no longer use DEP_MACHINE from Makefile.depend* so remove it. + 2013-01-23 Simon J. Gerraty * install-mk (MK_VERSION): bump version to 20130123 Modified: projects/camlock/contrib/bmake/mk/dirdeps.mk ============================================================================== --- projects/camlock/contrib/bmake/mk/dirdeps.mk Thu Apr 4 15:40:19 2013 (r249097) +++ projects/camlock/contrib/bmake/mk/dirdeps.mk Thu Apr 4 16:02:21 2013 (r249098) @@ -1,6 +1,7 @@ -# $Id: dirdeps.mk,v 1.23 2012/11/06 05:44:03 sjg Exp $ +# $Id: dirdeps.mk,v 1.28 2013/03/25 21:11:43 sjg Exp $ -# Copyright (c) 2010-2012, Juniper Networks, Inc. +# Copyright (c) 2010-2013, Juniper Networks, Inc. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -33,21 +34,31 @@ # This is what we do with DIRDEPS # DIRDEPS: -# This is a list of directories - relative to SRCTOP, it is only -# of interest to .MAKE.LEVEL 0. +# This is a list of directories - relative to SRCTOP, it is +# normally only of interest to .MAKE.LEVEL 0. # In some cases the entry may be qualified with a . -# suffix, for example to force building something for the pseudo +# or . suffix (see TARGET_SPEC_VARS below), +# for example to force building something for the pseudo # machines "host" or "common" regardless of current ${MACHINE}. -# All unqualified entries end up being qualified with .${MACHINE} -# and _DIRDEPS_USE below, uses the suffix to set MACHINE +# +# All unqualified entries end up being qualified with .${TARGET_SPEC} +# and partially qualified (if TARGET_SPEC_VARS has multiple +# entries) are also expanded to a full .. +# The _DIRDEPS_USE target uses the suffix to set TARGET_SPEC # correctly when visiting each entry. # -# Each entry is also converted into a set of paths to look for -# Makefile.depend. to learn the dependencies of each. -# Each Makefile.depend. sets DEP_RELDIR to be the +# The fully qualified directory entries are used to construct a +# dependency graph that will drive the build later. +# +# Also, for each fully qualified directory target, we will search +# using ${.MAKE.DEPENDFILE_PREFERENCE} to find additional +# dependencies. We use Makefile.depend (default value for +# .MAKE.DEPENDFILE_PREFIX) to refer to these makefiles to +# distinguish them from others. +# +# Each Makefile.depend file sets DEP_RELDIR to be the # the RELDIR (path relative to SRCTOP) for its directory, and -# DEP_MACHINE to its suffix (), further since -# each Makefile.depend. includes dirdeps.mk, this +# since each Makefile.depend file includes dirdeps.mk, this # processing is recursive and results in .MAKE.LEVEL 0 learning the # dependencies of the tree wrt the initial directory (_DEP_RELDIR). # @@ -55,38 +66,49 @@ # Indicates whether .MAKE.LEVEL 0 builds anything: # if "no" sub-makes are used to build everything, # if "yes" sub-makes are only used to build for other machines. +# It is best to use "no", but this can require fixing some +# makefiles to not do anything at .MAKE.LEVEL 0. # # TARGET_SPEC_VARS -# All the description above (and below) assumes is the -# only data needed to control the build. -# This is not always the case. So in addition to setting -# MACHINE in the build environment we set TARGET_SPEC which is -# composed of the values of TARGET_SPEC_VARS separated by -# commas. The default is just MACHINE. +# The default value is just MACHINE, and for most environments +# this is sufficient. The _DIRDEPS_USE target actually sets +# both MACHINE and TARGET_SPEC to the suffix of the current +# target so that in the general case TARGET_SPEC can be ignored. # *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***