svn commit: r249184 - in projects/counters: . bin/dd bin/sh contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests crypto/openssh etc/defaults etc/periodic/daily lib/libc/stdlib lib/libc/sys lib/l...
Gleb Smirnoff
glebius at FreeBSD.org
Sat Apr 6 07:14:55 UTC 2013
Author: glebius
Date: Sat Apr 6 07:14:50 2013
New Revision: 249184
URL: http://svnweb.freebsd.org/changeset/base/249184
Log:
Merge head r243428 through r249183.
Added:
projects/counters/contrib/bmake/unit-tests/export-env
- copied unchanged from r249183, head/contrib/bmake/unit-tests/export-env
- copied from r249183, head/contrib/unbound/
projects/counters/etc/periodic/daily/401.status-graid
- copied unchanged from r249183, head/etc/periodic/daily/401.status-graid
projects/counters/sys/contrib/dev/acpica/compiler/asllistsup.c
- copied unchanged from r249183, head/sys/contrib/dev/acpica/compiler/asllistsup.c
projects/counters/sys/contrib/dev/acpica/compiler/asloffset.c
- copied unchanged from r249183, head/sys/contrib/dev/acpica/compiler/asloffset.c
projects/counters/sys/contrib/dev/acpica/components/utilities/utpredef.c
- copied unchanged from r249183, head/sys/contrib/dev/acpica/components/utilities/utpredef.c
projects/counters/sys/dev/cfi/cfi_bus_nexus.c
- copied unchanged from r249183, head/sys/dev/cfi/cfi_bus_nexus.c
Directory Properties:
projects/counters/contrib/unbound/ (props changed)
Deleted:
projects/counters/etc/periodic/daily/405.status-ata-raid
projects/counters/sbin/atacontrol/
projects/counters/share/man/man4/atapicam.4
projects/counters/share/man/man4/ataraid.4
projects/counters/sys/dev/ata/ata-disk.c
projects/counters/sys/dev/ata/ata-disk.h
projects/counters/sys/dev/ata/ata-raid-ddf.h
projects/counters/sys/dev/ata/ata-raid.c
projects/counters/sys/dev/ata/ata-raid.h
projects/counters/sys/dev/ata/atapi-cam.c
projects/counters/sys/dev/ata/atapi-cd.c
projects/counters/sys/dev/ata/atapi-cd.h
projects/counters/sys/dev/ata/atapi-fd.c
projects/counters/sys/dev/ata/atapi-fd.h
projects/counters/sys/dev/ata/atapi-tape.c
projects/counters/sys/dev/ata/atapi-tape.h
projects/counters/sys/modules/ata/atacam/
projects/counters/sys/modules/ata/atadisk/
projects/counters/sys/modules/ata/atapicam/
projects/counters/sys/modules/ata/atapicd/
projects/counters/sys/modules/ata/atapifd/
projects/counters/sys/modules/ata/atapist/
projects/counters/sys/modules/ata/ataraid/
projects/counters/usr.sbin/bhyve/uart.c
projects/counters/usr.sbin/burncd/
Modified:
projects/counters/ObsoleteFiles.inc
projects/counters/bin/dd/dd.c
projects/counters/bin/sh/redir.c
projects/counters/contrib/bmake/ChangeLog
projects/counters/contrib/bmake/FILES
projects/counters/contrib/bmake/Makefile
projects/counters/contrib/bmake/bmake.1
projects/counters/contrib/bmake/bmake.cat1
projects/counters/contrib/bmake/boot-strap
projects/counters/contrib/bmake/configure
projects/counters/contrib/bmake/configure.in
projects/counters/contrib/bmake/dir.c
projects/counters/contrib/bmake/job.c
projects/counters/contrib/bmake/job.h
projects/counters/contrib/bmake/main.c
projects/counters/contrib/bmake/make.1
projects/counters/contrib/bmake/make.h
projects/counters/contrib/bmake/meta.c
projects/counters/contrib/bmake/meta.h
projects/counters/contrib/bmake/mk/ChangeLog
projects/counters/contrib/bmake/mk/dirdeps.mk
projects/counters/contrib/bmake/mk/gendirdeps.mk
projects/counters/contrib/bmake/mk/install-mk
projects/counters/contrib/bmake/mk/meta.stage.mk
projects/counters/contrib/bmake/mk/meta2deps.py
projects/counters/contrib/bmake/mk/meta2deps.sh
projects/counters/contrib/bmake/mk/sys.dependfile.mk
projects/counters/contrib/bmake/parse.c
projects/counters/contrib/bmake/unit-tests/Makefile.in
projects/counters/contrib/bmake/unit-tests/test.exp
projects/counters/contrib/bmake/var.c
projects/counters/crypto/openssh/krl.c
projects/counters/crypto/openssh/readconf.c
projects/counters/crypto/openssh/readconf.h
projects/counters/crypto/openssh/ssh.c
projects/counters/crypto/openssh/sshconnect2.c
projects/counters/etc/defaults/periodic.conf
projects/counters/etc/periodic/daily/Makefile
projects/counters/lib/libc/stdlib/rand.3
projects/counters/lib/libc/stdlib/rand.c
projects/counters/lib/libc/stdlib/random.3
projects/counters/lib/libc/stdlib/random.c
projects/counters/lib/libc/sys/getsockopt.2
projects/counters/lib/libpam/modules/pam_unix/pam_unix.c
projects/counters/rescue/rescue/Makefile
projects/counters/sbin/Makefile
projects/counters/sbin/camcontrol/camcontrol.8
projects/counters/sbin/camcontrol/camcontrol.c
projects/counters/sbin/geom/class/raid/graid.8
projects/counters/sbin/geom/class/stripe/gstripe.8
projects/counters/sbin/nvmecontrol/nvmecontrol.c
projects/counters/share/man/man4/Makefile
projects/counters/share/man/man4/ata.4
projects/counters/share/man/man4/igb.4
projects/counters/share/man/man5/devfs.conf.5
projects/counters/share/man/man5/periodic.conf.5
projects/counters/share/man/man5/rc.conf.5
projects/counters/share/man/man7/hier.7
projects/counters/share/misc/committers-ports.dot
projects/counters/share/mk/sys.mk
projects/counters/sys/amd64/conf/GENERIC
projects/counters/sys/amd64/vmm/io/vlapic.c
projects/counters/sys/arm/arm/machdep.c
projects/counters/sys/arm/arm/vfp.c
projects/counters/sys/arm/conf/AC100
projects/counters/sys/arm/conf/ARMADAXP
projects/counters/sys/arm/conf/AVILA
projects/counters/sys/arm/conf/CAMBRIA
projects/counters/sys/arm/conf/CRB
projects/counters/sys/arm/conf/CUBIEBOARD
projects/counters/sys/arm/conf/EFIKA_MX
projects/counters/sys/arm/conf/EP80219
projects/counters/sys/arm/conf/IQ31244
projects/counters/sys/arm/conf/TS7800
projects/counters/sys/arm/include/setjmp.h
projects/counters/sys/arm/ti/aintc.c
projects/counters/sys/boot/common/util.c
projects/counters/sys/cam/ata/ata_da.c
projects/counters/sys/cam/ata/ata_xpt.c
projects/counters/sys/cam/cam_periph.c
projects/counters/sys/cam/cam_sim.c
projects/counters/sys/cam/cam_xpt.c
projects/counters/sys/cam/cam_xpt_sim.h
projects/counters/sys/cam/ctl/ctl.c
projects/counters/sys/cam/ctl/ctl_backend_block.c
projects/counters/sys/cam/ctl/scsi_ctl.c
projects/counters/sys/cam/scsi/scsi_cd.c
projects/counters/sys/cam/scsi/scsi_da.c
projects/counters/sys/cam/scsi/scsi_pass.c
projects/counters/sys/cam/scsi/scsi_xpt.c
projects/counters/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
projects/counters/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
projects/counters/sys/conf/NOTES
projects/counters/sys/conf/files
projects/counters/sys/conf/files.sparc64
projects/counters/sys/conf/options
projects/counters/sys/contrib/dev/acpica/changes.txt (contents, props changed)
projects/counters/sys/contrib/dev/acpica/common/ahpredef.c
projects/counters/sys/contrib/dev/acpica/compiler/aslcompile.c
projects/counters/sys/contrib/dev/acpica/compiler/aslcompiler.h
projects/counters/sys/contrib/dev/acpica/compiler/asldefine.h
projects/counters/sys/contrib/dev/acpica/compiler/aslerror.c
projects/counters/sys/contrib/dev/acpica/compiler/aslfiles.c
projects/counters/sys/contrib/dev/acpica/compiler/aslglobal.h
projects/counters/sys/contrib/dev/acpica/compiler/asllisting.c
projects/counters/sys/contrib/dev/acpica/compiler/aslmain.c
projects/counters/sys/contrib/dev/acpica/compiler/aslpredef.c
projects/counters/sys/contrib/dev/acpica/compiler/aslprepkg.c
projects/counters/sys/contrib/dev/acpica/compiler/aslresource.c
projects/counters/sys/contrib/dev/acpica/compiler/asltypes.h
projects/counters/sys/contrib/dev/acpica/compiler/aslwalks.c
projects/counters/sys/contrib/dev/acpica/components/debugger/dbmethod.c
projects/counters/sys/contrib/dev/acpica/components/debugger/dbnames.c
projects/counters/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c
projects/counters/sys/contrib/dev/acpica/components/dispatcher/dswexec.c
projects/counters/sys/contrib/dev/acpica/components/events/evevent.c
projects/counters/sys/contrib/dev/acpica/components/executer/exoparg2.c
projects/counters/sys/contrib/dev/acpica/components/namespace/nseval.c
projects/counters/sys/contrib/dev/acpica/components/namespace/nspredef.c
projects/counters/sys/contrib/dev/acpica/components/tables/tbfadt.c
projects/counters/sys/contrib/dev/acpica/components/tables/tbxface.c
projects/counters/sys/contrib/dev/acpica/components/utilities/utdelete.c
projects/counters/sys/contrib/dev/acpica/components/utilities/utmutex.c
projects/counters/sys/contrib/dev/acpica/components/utilities/utosi.c
projects/counters/sys/contrib/dev/acpica/components/utilities/utxface.c
projects/counters/sys/contrib/dev/acpica/include/acglobal.h
projects/counters/sys/contrib/dev/acpica/include/aclocal.h
projects/counters/sys/contrib/dev/acpica/include/acnamesp.h
projects/counters/sys/contrib/dev/acpica/include/acpixf.h
projects/counters/sys/contrib/dev/acpica/include/acpredef.h
projects/counters/sys/contrib/dev/acpica/include/acutils.h
projects/counters/sys/dev/ahci/ahciem.c
projects/counters/sys/dev/ata/ata-all.c
projects/counters/sys/dev/ata/ata-all.h
projects/counters/sys/dev/ata/ata-cbus.c
projects/counters/sys/dev/ata/ata-dma.c
projects/counters/sys/dev/ata/ata-lowlevel.c
projects/counters/sys/dev/ata/ata-pci.c
projects/counters/sys/dev/ata/ata-pci.h
projects/counters/sys/dev/ata/ata-queue.c
projects/counters/sys/dev/ata/ata-sata.c
projects/counters/sys/dev/ata/ata_if.m
projects/counters/sys/dev/ata/chipsets/ata-acard.c
projects/counters/sys/dev/ata/chipsets/ata-acerlabs.c
projects/counters/sys/dev/ata/chipsets/ata-intel.c
projects/counters/sys/dev/ata/chipsets/ata-ite.c
projects/counters/sys/dev/ata/chipsets/ata-serverworks.c
projects/counters/sys/dev/ata/chipsets/ata-siliconimage.c
projects/counters/sys/dev/ath/ath_hal/ah.h
projects/counters/sys/dev/ath/ath_hal/ah_debug.h
projects/counters/sys/dev/ath/ath_hal/ah_internal.h
projects/counters/sys/dev/ath/if_ath_rx.c
projects/counters/sys/dev/ath/if_ath_rx.h
projects/counters/sys/dev/ath/if_ath_rx_edma.c
projects/counters/sys/dev/ciss/ciss.c
projects/counters/sys/dev/drm2/drm_edid.c
projects/counters/sys/dev/drm2/i915/intel_iic.c
projects/counters/sys/dev/drm2/i915/intel_modes.c
projects/counters/sys/dev/drm2/i915/intel_sdvo.c
projects/counters/sys/dev/e1000/if_em.c
projects/counters/sys/dev/e1000/if_igb.c
projects/counters/sys/dev/e1000/if_lem.c
projects/counters/sys/dev/hwpmc/hwpmc_core.c
projects/counters/sys/dev/hwpmc/hwpmc_intel.c
projects/counters/sys/dev/hwpmc/hwpmc_uncore.c
projects/counters/sys/dev/hwpmc/pmc_events.h
projects/counters/sys/dev/md/md.c
projects/counters/sys/dev/usb/misc/udbp.c
projects/counters/sys/dev/usb/usb_device.c
projects/counters/sys/dev/usb/usbdevs
projects/counters/sys/geom/geom_disk.c
projects/counters/sys/i386/conf/GENERIC
projects/counters/sys/i386/conf/XBOX
projects/counters/sys/ia64/conf/GENERIC
projects/counters/sys/kern/init_main.c
projects/counters/sys/kern/kern_intr.c
projects/counters/sys/kern/kern_sig.c
projects/counters/sys/kern/subr_bus_dma.c
projects/counters/sys/mips/atheros/apb.c
projects/counters/sys/mips/atheros/ar71xx_ehci.c
projects/counters/sys/mips/atheros/ar71xx_setup.c
projects/counters/sys/mips/atheros/ar71xx_setup.h
projects/counters/sys/mips/atheros/ar933x_chip.c
projects/counters/sys/mips/atheros/ar933xreg.h
projects/counters/sys/mips/atheros/if_arge.c
projects/counters/sys/mips/atheros/uart_dev_ar933x.c
projects/counters/sys/mips/conf/AP121
projects/counters/sys/mips/conf/AP121.hints
projects/counters/sys/mips/conf/OCTEON1
projects/counters/sys/mips/conf/XLR
projects/counters/sys/mips/conf/XLR64
projects/counters/sys/mips/conf/XLRN32
projects/counters/sys/mips/conf/std.SWARM
projects/counters/sys/mips/conf/std.XLP
projects/counters/sys/mips/malta/std.malta
projects/counters/sys/modules/ata/Makefile
projects/counters/sys/modules/ctl/Makefile
projects/counters/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
projects/counters/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
projects/counters/sys/pc98/conf/GENERIC
projects/counters/sys/pc98/conf/NOTES
projects/counters/sys/powerpc/aim/trap.c
projects/counters/sys/powerpc/conf/GENERIC
projects/counters/sys/powerpc/conf/GENERIC64
projects/counters/sys/powerpc/conf/MPC85XX
projects/counters/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c
projects/counters/sys/sparc64/conf/GENERIC
projects/counters/sys/sys/ata.h
projects/counters/sys/sys/bus.h
projects/counters/sys/ufs/ffs/ffs_softdep.c
projects/counters/sys/vm/vm_radix.c
projects/counters/usr.bin/bmake/Makefile
projects/counters/usr.bin/bmake/config.h
projects/counters/usr.bin/bmake/unit-tests/Makefile
projects/counters/usr.bin/calendar/calendars/calendar.freebsd
projects/counters/usr.sbin/Makefile
projects/counters/usr.sbin/acpi/acpidb/Makefile
projects/counters/usr.sbin/acpi/iasl/Makefile
projects/counters/usr.sbin/bhyve/Makefile
projects/counters/usr.sbin/bhyve/mptbl.c
projects/counters/usr.sbin/bluetooth/ath3kfw/ath3kfw.c
projects/counters/usr.sbin/bsdconfig/share/device.subr
projects/counters/usr.sbin/pc-sysinstall/backend-query/disk-list.sh
Directory Properties:
projects/counters/ (props changed)
projects/counters/contrib/bmake/ (props changed)
projects/counters/crypto/openssh/ (props changed)
projects/counters/lib/libc/ (props changed)
projects/counters/sbin/ (props changed)
projects/counters/share/man/man4/ (props changed)
projects/counters/sys/ (props changed)
projects/counters/sys/amd64/vmm/ (props changed)
projects/counters/sys/boot/ (props changed)
projects/counters/sys/cddl/contrib/opensolaris/ (props changed)
projects/counters/sys/conf/ (props changed)
projects/counters/sys/contrib/dev/acpica/ (props changed)
projects/counters/sys/contrib/dev/acpica/common/ (props changed)
projects/counters/sys/contrib/dev/acpica/compiler/ (props changed)
projects/counters/sys/contrib/dev/acpica/components/debugger/ (props changed)
projects/counters/sys/contrib/dev/acpica/components/dispatcher/ (props changed)
projects/counters/sys/contrib/dev/acpica/components/events/ (props changed)
projects/counters/sys/contrib/dev/acpica/components/executer/ (props changed)
projects/counters/sys/contrib/dev/acpica/components/namespace/ (props changed)
projects/counters/sys/contrib/dev/acpica/components/tables/ (props changed)
projects/counters/sys/contrib/dev/acpica/components/utilities/ (props changed)
projects/counters/sys/contrib/dev/acpica/include/ (props changed)
projects/counters/usr.bin/calendar/ (props changed)
projects/counters/usr.sbin/bhyve/ (props changed)
Modified: projects/counters/ObsoleteFiles.inc
==============================================================================
--- projects/counters/ObsoleteFiles.inc Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/ObsoleteFiles.inc Sat Apr 6 07:14:50 2013 (r249184)
@@ -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/counters/bin/dd/dd.c
==============================================================================
--- projects/counters/bin/dd/dd.c Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/bin/dd/dd.c Sat Apr 6 07:14:50 2013 (r249184)
@@ -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/counters/bin/sh/redir.c
==============================================================================
--- projects/counters/bin/sh/redir.c Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/bin/sh/redir.c Sat Apr 6 07:14:50 2013 (r249184)
@@ -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/counters/contrib/bmake/ChangeLog
==============================================================================
--- projects/counters/contrib/bmake/ChangeLog Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/ChangeLog Sat Apr 6 07:14:50 2013 (r249184)
@@ -1,3 +1,47 @@
+2013-03-30 Simon J. Gerraty <sjg at bad.crufty.net>
+
+ * 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 <sjg at bad.crufty.net>
+
+ * 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 <sjg at bad.crufty.net>
+
+ * 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 <sjg at bad.crufty.net>
+
+ * 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 <sjg at bad.crufty.net>
+
+ * boot-strap: remove MAKEOBJDIRPREFIX from environment since we
+ want to use MAKEOBJDIR
+
2013-01-27 Simon J. Gerraty <sjg at bad.crufty.net>
* Merge with NetBSD make, pick up
Modified: projects/counters/contrib/bmake/FILES
==============================================================================
--- projects/counters/contrib/bmake/FILES Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/FILES Sat Apr 6 07:14:50 2013 (r249184)
@@ -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/counters/contrib/bmake/Makefile
==============================================================================
--- projects/counters/contrib/bmake/Makefile Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/Makefile Sat Apr 6 07:14:50 2013 (r249184)
@@ -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 <autoconf.mk>
-.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 <autoconf.mk>
+.endif
SHARE_MK?=${SHAREDIR}/mk
MKSRC=${srcdir}/mk
INSTALL?=${srcdir}/install-sh
Modified: projects/counters/contrib/bmake/bmake.1
==============================================================================
--- projects/counters/contrib/bmake/bmake.1 Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/bmake.1 Sat Apr 6 07:14:50 2013 (r249184)
@@ -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/counters/contrib/bmake/bmake.cat1
==============================================================================
--- projects/counters/contrib/bmake/bmake.cat1 Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/bmake.cat1 Sat Apr 6 07:14:50 2013 (r249184)
@@ -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/counters/contrib/bmake/boot-strap
==============================================================================
--- projects/counters/contrib/bmake/boot-strap Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/boot-strap Sat Apr 6 07:14:50 2013 (r249184)
@@ -111,7 +111,7 @@
# Simon J. Gerraty <sjg at crufty.net>
# 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/counters/contrib/bmake/configure
==============================================================================
Binary file (source and/or target). No diff available.
Modified: projects/counters/contrib/bmake/configure.in
==============================================================================
--- projects/counters/contrib/bmake/configure.in Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/configure.in Sat Apr 6 07:14:50 2013 (r249184)
@@ -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 at NetBSD.org])
+AC_INIT([bmake], [20130303], [sjg at NetBSD.org])
AC_CONFIG_HEADER(config.h)
dnl make srcdir absolute
Modified: projects/counters/contrib/bmake/dir.c
==============================================================================
--- projects/counters/contrib/bmake/dir.c Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/dir.c Sat Apr 6 07:14:50 2013 (r249184)
@@ -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 <sys/cdefs.h>
#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/counters/contrib/bmake/job.c
==============================================================================
--- projects/counters/contrib/bmake/job.c Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/job.c Sat Apr 6 07:14:50 2013 (r249184)
@@ -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 <sys/cdefs.h>
#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 <sys/time.h>
#include "wait.h"
+#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#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/counters/contrib/bmake/job.h
==============================================================================
--- projects/counters/contrib/bmake/job.h Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/job.h Sat Apr 6 07:14:50 2013 (r249184)
@@ -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/counters/contrib/bmake/main.c
==============================================================================
--- projects/counters/contrib/bmake/main.c Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/main.c Sat Apr 6 07:14:50 2013 (r249184)
@@ -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 <sys/cdefs.h>
#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 <sys/resource.h>
#include <signal.h>
#include <sys/stat.h>
-#ifdef MAKE_NATIVE
#include <sys/utsname.h>
-#endif
#include "wait.h"
#include <errno.h>
@@ -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/counters/contrib/bmake/make.1
==============================================================================
--- projects/counters/contrib/bmake/make.1 Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/make.1 Sat Apr 6 07:14:50 2013 (r249184)
@@ -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/counters/contrib/bmake/make.h
==============================================================================
--- projects/counters/contrib/bmake/make.h Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/make.h Sat Apr 6 07:14:50 2013 (r249184)
@@ -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/counters/contrib/bmake/meta.c
==============================================================================
--- projects/counters/contrib/bmake/meta.c Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/meta.c Sat Apr 6 07:14:50 2013 (r249184)
@@ -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/counters/contrib/bmake/meta.h
==============================================================================
--- projects/counters/contrib/bmake/meta.h Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/meta.h Sat Apr 6 07:14:50 2013 (r249184)
@@ -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/counters/contrib/bmake/mk/ChangeLog
==============================================================================
--- projects/counters/contrib/bmake/mk/ChangeLog Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/mk/ChangeLog Sat Apr 6 07:14:50 2013 (r249184)
@@ -1,3 +1,71 @@
+2013-03-30 Simon J. Gerraty <sjg at bad.crufty.net>
+
+ * meta2deps.py (MetaFile.__init__): ensure self.cwd is initialized.
+ * install-mk (MK_VERSION): bump version
+
+2013-03-21 Simon J. Gerraty <sjg at bad.crufty.net>
+
+ * 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 <sjg at bad.crufty.net>
+
+ * 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 <sjg at bad.crufty.net>
+
+ * 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 <sjg at bad.crufty.net>
+
+ * 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 <sjg at bad.crufty.net>
+
+ * meta.stage.mk: use STAGE_TARGETS to control .ORDER
+ and hook to all: via staging:
+
+2013-03-07 Simon J. Gerraty <sjg at bad.crufty.net>
+
+ * 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 <sjg at bad.crufty.net>
+
+ * install-mk (MK_VERSION): bump version
+ * gendirdeps.mk: handle multiple M2D_OBJROOTS better.
+
+2013-02-10 Simon J. Gerraty <sjg at bad.crufty.net>
+
+ * 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 <sjg at bad.crufty.net>
* install-mk (MK_VERSION): bump version to 20130123
Modified: projects/counters/contrib/bmake/mk/dirdeps.mk
==============================================================================
--- projects/counters/contrib/bmake/mk/dirdeps.mk Sat Apr 6 07:10:54 2013 (r249183)
+++ projects/counters/contrib/bmake/mk/dirdeps.mk Sat Apr 6 07:14:50 2013 (r249184)
@@ -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 .<machine>
-# suffix, for example to force building something for the pseudo
+# or .<target_spec> 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 .<target_spec>.
+# 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.<machine> to learn the dependencies of each.
-# Each Makefile.depend.<machine> 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 (<machine>), further since
-# each Makefile.depend.<machine> 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 <machine> 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 ***
More information about the svn-src-projects
mailing list