Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Apr 2015 04:40:38 +0000 (UTC)
From:      "Simon J. Gerraty" <sjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r281812 - in head: contrib/bmake contrib/bmake/PSD.doc contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests
Message-ID:  <201504210440.t3L4ecLY001402@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sjg
Date: Tue Apr 21 04:40:38 2015
New Revision: 281812
URL: https://svnweb.freebsd.org/changeset/base/281812

Log:
  Merge bmake-20150418
  
  PR: 199486

Added:
  head/contrib/bmake/mk/cython.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/mk/cython.mk
  head/contrib/bmake/mk/manifest.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/mk/manifest.mk
  head/contrib/bmake/mk/mkopt.sh
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/mk/mkopt.sh
  head/contrib/bmake/mk/whats.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/mk/whats.mk
  head/contrib/bmake/unit-tests/comment.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/comment.exp
  head/contrib/bmake/unit-tests/comment.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/comment.mk
  head/contrib/bmake/unit-tests/cond1.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/cond1.exp
  head/contrib/bmake/unit-tests/cond1.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/cond1.mk
  head/contrib/bmake/unit-tests/doterror.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/doterror.exp
  head/contrib/bmake/unit-tests/doterror.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/doterror.mk
  head/contrib/bmake/unit-tests/dotwait.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/dotwait.exp
  head/contrib/bmake/unit-tests/dotwait.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/dotwait.mk
  head/contrib/bmake/unit-tests/error.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/error.exp
  head/contrib/bmake/unit-tests/error.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/error.mk
  head/contrib/bmake/unit-tests/escape.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/escape.exp
  head/contrib/bmake/unit-tests/escape.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/escape.mk
  head/contrib/bmake/unit-tests/export-all.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export-all.exp
  head/contrib/bmake/unit-tests/export-all.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export-all.mk
  head/contrib/bmake/unit-tests/export-env.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export-env.exp
  head/contrib/bmake/unit-tests/export-env.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export-env.mk
  head/contrib/bmake/unit-tests/export.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export.exp
  head/contrib/bmake/unit-tests/export.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export.mk
  head/contrib/bmake/unit-tests/forloop.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/forloop.exp
  head/contrib/bmake/unit-tests/forloop.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/forloop.mk
  head/contrib/bmake/unit-tests/forsubst.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/forsubst.exp
  head/contrib/bmake/unit-tests/forsubst.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/forsubst.mk
  head/contrib/bmake/unit-tests/hash.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/hash.exp
  head/contrib/bmake/unit-tests/hash.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/hash.mk
  head/contrib/bmake/unit-tests/impsrc.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/impsrc.exp
  head/contrib/bmake/unit-tests/impsrc.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/impsrc.mk
  head/contrib/bmake/unit-tests/misc.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/misc.exp
  head/contrib/bmake/unit-tests/misc.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/misc.mk
  head/contrib/bmake/unit-tests/moderrs.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/moderrs.exp
  head/contrib/bmake/unit-tests/moderrs.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/moderrs.mk
  head/contrib/bmake/unit-tests/modmatch.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modmatch.exp
  head/contrib/bmake/unit-tests/modmatch.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modmatch.mk
  head/contrib/bmake/unit-tests/modmisc.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modmisc.exp
  head/contrib/bmake/unit-tests/modmisc.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modmisc.mk
  head/contrib/bmake/unit-tests/modorder.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modorder.exp
  head/contrib/bmake/unit-tests/modorder.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modorder.mk
  head/contrib/bmake/unit-tests/modts.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modts.exp
  head/contrib/bmake/unit-tests/modts.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modts.mk
  head/contrib/bmake/unit-tests/modword.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modword.exp
  head/contrib/bmake/unit-tests/modword.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modword.mk
  head/contrib/bmake/unit-tests/order.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/order.exp
  head/contrib/bmake/unit-tests/order.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/order.mk
  head/contrib/bmake/unit-tests/phony-end.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/phony-end.exp
  head/contrib/bmake/unit-tests/phony-end.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/phony-end.mk
  head/contrib/bmake/unit-tests/posix.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/posix.exp
  head/contrib/bmake/unit-tests/posix.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/posix.mk
  head/contrib/bmake/unit-tests/posix1.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/posix1.exp
  head/contrib/bmake/unit-tests/posix1.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/posix1.mk
  head/contrib/bmake/unit-tests/qequals.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/qequals.exp
  head/contrib/bmake/unit-tests/qequals.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/qequals.mk
  head/contrib/bmake/unit-tests/suffixes.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/suffixes.exp
  head/contrib/bmake/unit-tests/suffixes.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/suffixes.mk
  head/contrib/bmake/unit-tests/sunshcmd.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/sunshcmd.exp
  head/contrib/bmake/unit-tests/sunshcmd.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/sunshcmd.mk
  head/contrib/bmake/unit-tests/sysv.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/sysv.exp
  head/contrib/bmake/unit-tests/sysv.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/sysv.mk
  head/contrib/bmake/unit-tests/ternary.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/ternary.exp
  head/contrib/bmake/unit-tests/ternary.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/ternary.mk
  head/contrib/bmake/unit-tests/unexport-env.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/unexport-env.exp
  head/contrib/bmake/unit-tests/unexport-env.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/unexport-env.mk
  head/contrib/bmake/unit-tests/unexport.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/unexport.exp
  head/contrib/bmake/unit-tests/unexport.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/unexport.mk
  head/contrib/bmake/unit-tests/varcmd.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varcmd.exp
  head/contrib/bmake/unit-tests/varcmd.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varcmd.mk
  head/contrib/bmake/unit-tests/varmisc.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varmisc.exp
  head/contrib/bmake/unit-tests/varmisc.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varmisc.mk
  head/contrib/bmake/unit-tests/varshell.exp
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varshell.exp
  head/contrib/bmake/unit-tests/varshell.mk
     - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varshell.mk
Deleted:
  head/contrib/bmake/unit-tests/comment
  head/contrib/bmake/unit-tests/cond1
  head/contrib/bmake/unit-tests/doterror
  head/contrib/bmake/unit-tests/dotwait
  head/contrib/bmake/unit-tests/error
  head/contrib/bmake/unit-tests/export
  head/contrib/bmake/unit-tests/export-all
  head/contrib/bmake/unit-tests/export-env
  head/contrib/bmake/unit-tests/forloop
  head/contrib/bmake/unit-tests/forsubst
  head/contrib/bmake/unit-tests/hash
  head/contrib/bmake/unit-tests/misc
  head/contrib/bmake/unit-tests/moderrs
  head/contrib/bmake/unit-tests/modmatch
  head/contrib/bmake/unit-tests/modmisc
  head/contrib/bmake/unit-tests/modorder
  head/contrib/bmake/unit-tests/modts
  head/contrib/bmake/unit-tests/modword
  head/contrib/bmake/unit-tests/order
  head/contrib/bmake/unit-tests/phony-end
  head/contrib/bmake/unit-tests/posix
  head/contrib/bmake/unit-tests/qequals
  head/contrib/bmake/unit-tests/sunshcmd
  head/contrib/bmake/unit-tests/sysv
  head/contrib/bmake/unit-tests/ternary
  head/contrib/bmake/unit-tests/test.exp
  head/contrib/bmake/unit-tests/unexport
  head/contrib/bmake/unit-tests/unexport-env
  head/contrib/bmake/unit-tests/varcmd
Modified:
  head/contrib/bmake/ChangeLog
  head/contrib/bmake/FILES
  head/contrib/bmake/Makefile
  head/contrib/bmake/PSD.doc/Makefile
  head/contrib/bmake/PSD.doc/tutorial.ms
  head/contrib/bmake/bmake.1
  head/contrib/bmake/bmake.cat1
  head/contrib/bmake/compat.c
  head/contrib/bmake/configure
  head/contrib/bmake/configure.in
  head/contrib/bmake/job.c
  head/contrib/bmake/lst.h
  head/contrib/bmake/lst.lib/lstInt.h
  head/contrib/bmake/lst.lib/lstRemove.c
  head/contrib/bmake/main.c
  head/contrib/bmake/make.1
  head/contrib/bmake/make.c
  head/contrib/bmake/make.h
  head/contrib/bmake/meta.c
  head/contrib/bmake/mk/ChangeLog
  head/contrib/bmake/mk/FILES
  head/contrib/bmake/mk/auto.dep.mk
  head/contrib/bmake/mk/auto.obj.mk
  head/contrib/bmake/mk/autodep.mk
  head/contrib/bmake/mk/dep.mk
  head/contrib/bmake/mk/dirdeps.mk
  head/contrib/bmake/mk/gendirdeps.mk
  head/contrib/bmake/mk/install-mk
  head/contrib/bmake/mk/links.mk
  head/contrib/bmake/mk/meta.autodep.mk
  head/contrib/bmake/mk/meta.stage.mk
  head/contrib/bmake/mk/meta.sys.mk
  head/contrib/bmake/mk/meta2deps.py
  head/contrib/bmake/mk/meta2deps.sh
  head/contrib/bmake/mk/mk-files.txt
  head/contrib/bmake/mk/own.mk
  head/contrib/bmake/mk/sys.dependfile.mk
  head/contrib/bmake/nonints.h
  head/contrib/bmake/parse.c
  head/contrib/bmake/suff.c
  head/contrib/bmake/targ.c
  head/contrib/bmake/unit-tests/Makefile.in
  head/contrib/bmake/var.c
  head/usr.bin/bmake/Makefile
  head/usr.bin/bmake/unit-tests/Makefile
Directory Properties:
  head/contrib/bmake/   (props changed)

Modified: head/contrib/bmake/ChangeLog
==============================================================================
--- head/contrib/bmake/ChangeLog	Tue Apr 21 03:29:03 2015	(r281811)
+++ head/contrib/bmake/ChangeLog	Tue Apr 21 04:40:38 2015	(r281812)
@@ -1,8 +1,76 @@
+2015-04-18  Simon J. Gerraty  <sjg@bad.crufty.net>
+
+	* Makefile (MAKE_VERSION): 20150418
+	  Merge with NetBSD make, pick up
+	  o job.c: use memmove() rather than memcpy()
+
+	* unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL
+	  case, so skip it.
+
+2015-04-11  Simon J. Gerraty  <sjg@bad.crufty.net>
+
+	* Makefile (MAKE_VERSION): 20150411
+	  bump version - only mk/ changes.
+	
+2015-04-10  Simon J. Gerraty  <sjg@bad.crufty.net>
+
+	* Makefile (MAKE_VERSION): 20150410
+	  Merge with NetBSD make, pick up
+	  o document different handling of '-' in jobs mode vs compat
+	  o fix jobs mode so that '-' only applies to whole job
+	    when shell lacks hasErrCtl
+	  o meta.c: use separate vars to track lcwd and latestdir (read)
+	    per process
+	
+2015-04-01  Simon J. Gerraty  <sjg@bad.crufty.net>
+
+	* Makefile (MAKE_VERSION): 20150401
+	  Merge with NetBSD make, pick up
+	  o meta.c: close meta file in child
+	
+	* Makefile: use BINDIR.bmake if set.
+	  Same for MANDIR and SHAREDIR
+	  Handy for testing release candidates
+	  in various environments.
+	
+2015-03-26  Simon J. Gerraty  <sjg@bad.crufty.net>
+
+	* move initialization of savederr to block where it is used
+	  to avoid spurious warning from gcc5
+
+2014-11-11  Simon J. Gerraty  <sjg@bad.crufty.net>
+
+	* Makefile (MAKE_VERSION): 20141111
+	  just a cooler number
+
+2014-11-05  Simon J. Gerraty  <sjg@bad.crufty.net>
+
+	* Makefile (MAKE_VERSION): 20141105
+	  Merge with NetBSD make, pick up
+	  o revert major overhaul of suffix handling
+	    and POSIX compliance - too much breakage
+	    and impossible to make backwards compatible.
+	  o we still have the new unit test structure which is ok.
+	  o meta.c ensure "-- filemon" is at start of line.
+
+2014-09-17  Simon J. Gerraty  <sjg@bad.crufty.net>
+
+	* configure.in: test that result of getconf PATH_MAX is numeric
+	  and discard if not.  Apparently needed for Hurd.
+
+2014-08-30  Simon J. Gerraty  <sjg@bad.crufty.net>
+
+	* Makefile (MAKE_VERSION): 20140830
+	  Merge with NetBSD make, pick up
+	  o major overhaul of suffix handling
+	  o improved POSIX compliance
+	  o overhauled unit-tests
+
 2014-06-20  Simon J. Gerraty  <sjg@bad.crufty.net>
 
 	* Makefile (MAKE_VERSION): 20140620
 	  Merge with NetBSD make, pick up
-	  o var.c return varNoError rather than var_Error for ::= modidiers.
+	  o var.c return varNoError rather than var_Error for ::= modifiers.
 
 2014-05-22  Simon J. Gerraty  <sjg@bad.crufty.net>
 

Modified: head/contrib/bmake/FILES
==============================================================================
--- head/contrib/bmake/FILES	Tue Apr 21 03:29:03 2015	(r281811)
+++ head/contrib/bmake/FILES	Tue Apr 21 04:40:38 2015	(r281812)
@@ -92,35 +92,74 @@ targ.c
 trace.c
 trace.h
 unit-tests/Makefile.in
-unit-tests/comment
-unit-tests/cond1
-unit-tests/doterror
-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
-unit-tests/misc
-unit-tests/moderrs
-unit-tests/modmatch
-unit-tests/modmisc
-unit-tests/modorder
-unit-tests/modts
-unit-tests/modword
-unit-tests/order
-unit-tests/phony-end
-unit-tests/posix
-unit-tests/qequals
-unit-tests/sunshcmd
-unit-tests/sysv
-unit-tests/ternary
-unit-tests/test.exp
-unit-tests/unexport
-unit-tests/unexport-env
-unit-tests/varcmd
+unit-tests/comment.exp
+unit-tests/comment.mk
+unit-tests/cond1.exp
+unit-tests/cond1.mk
+unit-tests/doterror.exp
+unit-tests/doterror.mk
+unit-tests/dotwait.exp
+unit-tests/dotwait.mk
+unit-tests/error.exp
+unit-tests/error.mk
+unit-tests/escape.exp
+unit-tests/escape.mk
+unit-tests/export-all.exp
+unit-tests/export-all.mk
+unit-tests/export-env.exp
+unit-tests/export-env.mk
+unit-tests/export.exp
+unit-tests/export.mk
+unit-tests/forloop.exp
+unit-tests/forloop.mk
+unit-tests/forsubst.exp
+unit-tests/forsubst.mk
+unit-tests/hash.exp
+unit-tests/hash.mk
+unit-tests/impsrc.exp
+unit-tests/impsrc.mk
+unit-tests/misc.exp
+unit-tests/misc.mk
+unit-tests/moderrs.exp
+unit-tests/moderrs.mk
+unit-tests/modmatch.exp
+unit-tests/modmatch.mk
+unit-tests/modmisc.exp
+unit-tests/modmisc.mk
+unit-tests/modorder.exp
+unit-tests/modorder.mk
+unit-tests/modts.exp
+unit-tests/modts.mk
+unit-tests/modword.exp
+unit-tests/modword.mk
+unit-tests/order.exp
+unit-tests/order.mk
+unit-tests/phony-end.exp
+unit-tests/phony-end.mk
+unit-tests/posix.exp
+unit-tests/posix.mk
+unit-tests/posix1.exp
+unit-tests/posix1.mk
+unit-tests/qequals.exp
+unit-tests/qequals.mk
+unit-tests/suffixes.exp
+unit-tests/suffixes.mk
+unit-tests/sunshcmd.exp
+unit-tests/sunshcmd.mk
+unit-tests/sysv.exp
+unit-tests/sysv.mk
+unit-tests/ternary.exp
+unit-tests/ternary.mk
+unit-tests/unexport-env.exp
+unit-tests/unexport-env.mk
+unit-tests/unexport.exp
+unit-tests/unexport.mk
+unit-tests/varcmd.exp
+unit-tests/varcmd.mk
+unit-tests/varmisc.exp
+unit-tests/varmisc.mk
+unit-tests/varshell.exp
+unit-tests/varshell.mk
 util.c
 var.c
 wait.h

Modified: head/contrib/bmake/Makefile
==============================================================================
--- head/contrib/bmake/Makefile	Tue Apr 21 03:29:03 2015	(r281811)
+++ head/contrib/bmake/Makefile	Tue Apr 21 04:40:38 2015	(r281812)
@@ -1,7 +1,7 @@
-#	$Id: Makefile,v 1.27 2014/06/20 14:51:54 sjg Exp $
+#	$Id: Makefile,v 1.36 2015/04/18 19:58:53 sjg Exp $
 
 # Base version on src date
-MAKE_VERSION= 20140620
+MAKE_VERSION= 20150418
 
 PROG=	bmake
 
@@ -180,9 +180,9 @@ COPTS.parse.c += -Wno-format-nonliteral
 COPTS.var.c += -Wno-format-nonliteral
 
 # Force these
-SHAREDIR= ${prefix}/share
-BINDIR= ${prefix}/bin
-MANDIR= ${SHAREDIR}/man
+SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share}
+BINDIR= ${BINDIR.bmake:U${prefix}/bin}
+MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man}
 
 .if !exists(.depend)
 ${OBJS}: config.h

Modified: head/contrib/bmake/PSD.doc/Makefile
==============================================================================
--- head/contrib/bmake/PSD.doc/Makefile	Tue Apr 21 03:29:03 2015	(r281811)
+++ head/contrib/bmake/PSD.doc/Makefile	Tue Apr 21 04:40:38 2015	(r281812)
@@ -1,8 +1,10 @@
-#	$NetBSD: Makefile,v 1.2 1995/06/14 15:20:23 christos Exp $
+#	$NetBSD: Makefile,v 1.4 2014/07/05 19:22:43 dholland Exp $
 #	@(#)Makefile	8.1 (Berkeley) 8/14/93
 
-DIR=	psd/12.make
+SECTION=reference/ref1
+ARTICLE=make
 SRCS=	tutorial.ms
 MACROS=	-ms
+EXTRAHTMLFILES=make1.png make2.png
 
 .include <bsd.doc.mk>

Modified: head/contrib/bmake/PSD.doc/tutorial.ms
==============================================================================
--- head/contrib/bmake/PSD.doc/tutorial.ms	Tue Apr 21 03:29:03 2015	(r281811)
+++ head/contrib/bmake/PSD.doc/tutorial.ms	Tue Apr 21 04:40:38 2015	(r281812)
@@ -1,4 +1,4 @@
-.\"	$NetBSD: tutorial.ms,v 1.11 2011/08/18 15:19:30 sjg Exp $
+.\"	$NetBSD: tutorial.ms,v 1.12 2014/09/30 21:33:14 christos Exp $
 .\" Copyright (c) 1988, 1989, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -67,6 +67,16 @@
 .\"
 .EH 'PSD:12-%''PMake \*- A Tutorial'
 .OH 'PMake \*- A Tutorial''PSD:12-%'
+.\" Ix is an indexing macro similar to .IX but I've disabled it for now
+.\" Since that would require 2 passes and I am not in the mood for that.
+.de Ix
+..
+.\" Rd is section (region) define and Rm is region mention? Again disable for
+.\" now.
+.de Rd
+..
+.de Rm
+..
 .\" xH is a macro to provide numbered headers that are automatically stuffed
 .\" into a table-of-contents, properly indented, etc. If the first argument
 .\" is numeric, it is taken as the depth for numbering (as for .NH), else

Modified: head/contrib/bmake/bmake.1
==============================================================================
--- head/contrib/bmake/bmake.1	Tue Apr 21 03:29:03 2015	(r281811)
+++ head/contrib/bmake/bmake.1	Tue Apr 21 04:40:38 2015	(r281812)
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.229 2014/01/19 10:23:29 apb Exp $
+.\"	$NetBSD: make.1,v 1.247 2015/04/10 08:43:32 wiz 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 February 14, 2014
+.Dd April 9, 2015
 .Dt MAKE 1
 .Os
 .Sh NAME
@@ -209,8 +209,6 @@ Force the
 option to print raw values of variables.
 .It Ar v
 Print debugging information about variable assignment.
-.It Ar w
-Print entering and leaving directory messages, pre and post processing.
 .It Ar x
 Run shell commands with
 .Fl x
@@ -352,6 +350,8 @@ contains a
 then the value will be expanded before printing.
 .It Fl W
 Treat any warnings during makefile parsing as errors.
+.It Fl w
+Print entering and leaving directory messages, pre and post processing.
 .It Fl X
 Don't export variables passed on the command line to the environment
 individually.
@@ -441,17 +441,29 @@ The value
 need not necessarily be used to describe existing files.
 Expansion is in directory order, not alphabetically as done in the shell.
 .Sh SHELL COMMANDS
-Each target may have associated with it a series of shell commands, normally
+Each target may have associated with it one or more lines of shell
+commands, normally
 used to create the target.
-Each of the commands in this script
+Each of the lines in this script
 .Em must
 be preceded by a tab.
-While any target may appear on a dependency line, only one of these
-dependencies may be followed by a creation script, unless the
+(For historical reasons, spaces are not accepted.)
+While targets can appear in many dependency lines if desired, by
+default only one of these rules may be followed by a creation
+script.
+If the
 .Ql Ic \&::
-operator is used.
+operator is used, however, all rules may include scripts and the
+scripts are executed in the order found.
 .Pp
-If the first characters of the command line are any combination of
+Each line is treated as a separate shell command, unless the end of
+line is escaped with a backslash
+.Pq Ql \e
+in which case that line and the next are combined.
+.\" The escaped newline is retained and passed to the shell, which
+.\" normally ignores it.
+.\" However, the tab at the beginning of the following line is removed.
+If the first characters of the command are any combination of
 .Ql Ic @ ,
 .Ql Ic + ,
 or
@@ -469,6 +481,7 @@ This is similar to the effect of the .MA
 except that the effect can be limited to a single line of a script.
 A
 .Ql Ic \-
+in compatibility mode
 causes any non-zero exit status of the command line to be ignored.
 .Pp
 When
@@ -477,22 +490,21 @@ is run in jobs mode with
 .Fl j Ar max_jobs ,
 the entire script for the target is fed to a
 single instance of the shell.
-.Pp
 In compatibility (non-jobs) mode, each command is run in a separate process.
 If the command contains any shell meta characters
 .Pq Ql #=|^(){};&<>*?[]:$`\e\en
-it will be passed to the shell, otherwise
+it will be passed to the shell; otherwise
 .Nm
 will attempt direct execution.
-.Pp
-Since
-.Nm
-will
-.Xr chdir 2
-to
-.Ql Va .OBJDIR
-before executing any targets, each child process
-starts with that as its current working directory.
+If a line starts with
+.Ql Ic \-
+and the shell has ErrCtl enabled then failure of the command line
+will be ignored as in compatibility mode.
+Otherwise
+.Ql Ic \-
+affects the entire job;
+the script will stop at the first command line that fails,
+but the target will not be deemed to have failed.
 .Pp
 Makefiles should be written so that the mode of
 .Nm
@@ -500,20 +512,32 @@ operation does not change their behavior
 For example, any command which needs to use
 .Dq cd
 or
-.Dq chdir ,
-without side-effect should be put in parenthesis:
+.Dq chdir
+without potentially changing the directory for subsequent commands
+should be put in parentheses so it executes in a subshell.
+To force the use of one shell, escape the line breaks so as to make
+the whole script one command.
+For example:
 .Bd -literal -offset indent
-
 avoid-chdir-side-effects:
 	@echo Building $@ in `pwd`
-	@(cd ${.CURDIR} && ${.MAKE} $@)
+	@(cd ${.CURDIR} && ${MAKE} $@)
 	@echo Back in `pwd`
 
 ensure-one-shell-regardless-of-mode:
-	@echo Building $@ in `pwd`; \\
-	(cd ${.CURDIR} && ${.MAKE} $@); \\
+	@echo Building $@ in `pwd`; \e
+	(cd ${.CURDIR} && ${MAKE} $@); \e
 	echo Back in `pwd`
 .Ed
+.Pp
+Since
+.Nm
+will
+.Xr chdir 2
+to
+.Ql Va .OBJDIR
+before executing any targets, each child process
+starts with that as its current working directory.
 .Sh VARIABLE ASSIGNMENTS
 Variables in make are much like variables in the shell, and, by tradition,
 consist of all upper-case letters.
@@ -624,13 +648,19 @@ Variables defined in the makefile or in 
 Variables defined as part of the command line.
 .It Local variables
 Variables that are defined specific to a certain target.
+.El
+.Pp
+Local variables are all built in and their values vary magically from
+target to target.
+It is not currently possible to define new local variables.
 The seven local variables are as follows:
-.Bl -tag -width ".ARCHIVE"
+.Bl -tag -width ".ARCHIVE" -offset indent
 .It Va .ALLSRC
 The list of all sources for this target; also known as
 .Ql Va \&\*[Gt] .
 .It Va .ARCHIVE
-The name of the archive file.
+The name of the archive file; also known as
+.Ql Va \&! .
 .It Va .IMPSRC
 In suffix-transformation rules, the name/path of the source from which the
 target is to be transformed (the
@@ -639,7 +669,8 @@ source); also known as
 .Ql Va \&\*[Lt] .
 It is not defined in explicit rules.
 .It Va .MEMBER
-The name of the archive member.
+The name of the archive member; also known as
+.Ql Va % .
 .It Va .OODATE
 The list of sources for this target that were deemed out-of-date; also
 known as
@@ -648,31 +679,41 @@ known as
 The file prefix of the target, containing only the file portion, no suffix
 or preceding directory components; also known as
 .Ql Va * .
+The suffix must be one of the known suffixes declared with
+.Ic .SUFFIXES
+or it will not be recognized.
 .It Va .TARGET
 The name of the target; also known as
 .Ql Va @ .
 .El
 .Pp
 The shorter forms
-.Ql Va @ ,
+.Ql ( Va \*[Gt] ,
+.Ql Va \&! ,
+.Ql Va \*[Lt] ,
+.Ql Va % ,
 .Ql Va \&? ,
-.Ql Va \&\*[Lt] ,
-.Ql Va \&\*[Gt] ,
+.Ql Va * ,
 and
-.Ql Va *
+.Ql Va @ )
 are permitted for backward
-compatibility with historical makefiles and are not recommended.
-The six variables
-.Ql Va "@F" ,
-.Ql Va "@D" ,
-.Ql Va "\*[Lt]F" ,
-.Ql Va "\*[Lt]D" ,
-.Ql Va "*F" ,
+compatibility with historical makefiles and legacy POSIX make and are
+not recommended.
+.Pp
+Variants of these variables with the punctuation followed immediately by
+.Ql D
+or
+.Ql F ,
+e.g.
+.Ql Va $(@D) ,
+are legacy forms equivalent to using the
+.Ql :H
 and
-.Ql Va "*D"
-are permitted for compatibility with
+.Ql :T
+modifiers.
+These forms are accepted for compatibility with
 .At V
-makefiles and are not recommended.
+makefiles and POSIX but are not recommended.
 .Pp
 Four of the local variables may be used in sources on dependency lines
 because they expand to the proper value for each target on the line.
@@ -682,7 +723,6 @@ These variables are
 .Ql Va .ARCHIVE ,
 and
 .Ql Va .MEMBER .
-.El
 .Ss Additional built-in variables
 In addition,
 .Nm
@@ -2119,19 +2159,87 @@ system makefile
 system makefile directory
 .El
 .Sh COMPATIBILITY
-The basic make syntax is compatible between different versions of make,
+The basic make syntax is compatible between different versions of make;
 however the special variables, variable modifiers and conditionals are not.
-.Pp
-The way that parallel makes are scheduled changed in
-NetBSD 4.0
-so that .ORDER and .WAIT apply recursively to the dependent nodes.
-The algorithms used may change again in the future.
+.Ss Older versions
+An incomplete list of changes in older versions of
+.Nm :
 .Pp
 The way that .for loop variables are substituted changed after
 NetBSD 5.0
 so that they still appear to be variable expansions.
 In particular this stops them being treated as syntax, and removes some
 obscure problems using them in .if statements.
+.Pp
+The way that parallel makes are scheduled changed in
+NetBSD 4.0
+so that .ORDER and .WAIT apply recursively to the dependent nodes.
+The algorithms used may change again in the future.
+.Ss Other make dialects
+Other make dialects (GNU make, SVR4 make, POSIX make, etc.) do not
+support most of the features of
+.Nm
+as described in this manual.
+Most notably:
+.Bl -bullet -offset indent
+.It
+The
+.Ic .WAIT
+and
+.Ic .ORDER
+declarations and most functionality pertaining to parallelization.
+(GNU make supports parallelization but lacks these features needed to
+control it effectively.)
+.It
+Directives, including for loops and conditionals and most of the
+forms of include files.
+(GNU make has its own incompatible and less powerful syntax for
+conditionals.)
+.It
+All built-in variables that begin with a dot.
+.It
+Most of the special sources and targets that begin with a dot,
+with the notable exception of
+.Ic .PHONY ,
+.Ic .PRECIOUS ,
+and
+.Ic .SUFFIXES .
+.It
+Variable modifiers, except for the
+.Dl :old=new
+string substitution, which does not portably support globbing with
+.Ql %
+and historically only works on declared suffixes.
+.It
+The
+.Ic $>
+variable even in its short form; most makes support this functionality
+but its name varies.
+.El
+.Pp
+Some features are somewhat more portable, such as assignment with
+.Ic += ,
+.Ic ?= ,
+and
+.Ic != .
+The
+.Ic .PATH
+functionality is based on an older feature
+.Ic VPATH
+found in GNU make and many versions of SVR4 make; however,
+historically its behavior is too ill-defined (and too buggy) to rely
+upon.
+.Pp
+The
+.Ic $@
+and
+.Ic $<
+variables are more or less universally portable, as is the
+.Ic $(MAKE)
+variable.
+Basic use of suffix rules (for files only in the current directory,
+not trying to chain transformations together, etc.) is also reasonably
+portable.
 .Sh SEE ALSO
 .Xr mkdep 1
 .Sh HISTORY

Modified: head/contrib/bmake/bmake.cat1
==============================================================================
--- head/contrib/bmake/bmake.cat1	Tue Apr 21 03:29:03 2015	(r281811)
+++ head/contrib/bmake/bmake.cat1	Tue Apr 21 04:40:38 2015	(r281812)
@@ -122,9 +122,6 @@ DDEESSCCRRIIPPTTIIOONN
 
              _v       Print debugging information about variable assignment.
 
-             _w       Print entering and leaving directory messages, pre and
-                     post processing.
-
              _x       Run shell commands with --xx so the actual commands are
                      printed as they are executed.
 
@@ -221,6 +218,9 @@ DDEESSCCRRIIPPTTIIOONN
 
      --WW      Treat any warnings during makefile parsing as errors.
 
+     --ww      Print entering and leaving directory messages, pre and post pro-
+             cessing.
+
      --XX      Don't export variables passed on the command line to the environ-
              ment individually.  Variables passed on the command line are
              still exported via the _M_A_K_E_F_L_A_G_S environment variable.  This
@@ -273,46 +273,55 @@ FFIILLEE DDEEPPEENNDDEENNCC
      done in the shell.
 
 SSHHEELLLL CCOOMMMMAANNDDSS
-     Each target may have associated with it a series of shell commands, nor-
-     mally used to create the target.  Each of the commands in this script
-     _m_u_s_t be preceded by a tab.  While any target may appear on a dependency
-     line, only one of these dependencies may be followed by a creation
-     script, unless the `::::' operator is used.
-
-     If the first characters of the command line are any combination of `@@',
-     `++', or `--', the command is treated specially.  A `@@' causes the command
-     not to be echoed before it is executed.  A `++' causes the command to be
-     executed even when --nn is given.  This is similar to the effect of the
-     .MAKE special source, except that the effect can be limited to a single
-     line of a script.  A `--' causes any non-zero exit status of the command
-     line to be ignored.
+     Each target may have associated with it one or more lines of shell com-
+     mands, normally used to create the target.  Each of the lines in this
+     script _m_u_s_t be preceded by a tab.  (For historical reasons, spaces are
+     not accepted.)  While targets can appear in many dependency lines if
+     desired, by default only one of these rules may be followed by a creation
+     script.  If the `::::' operator is used, however, all rules may include
+     scripts and the scripts are executed in the order found.
+
+     Each line is treated as a separate shell command, unless the end of line
+     is escaped with a backslash (`\') in which case that line and the next
+     are combined.  If the first characters of the command are any combination
+     of `@@', `++', or `--', the command is treated specially.  A `@@' causes the
+     command not to be echoed before it is executed.  A `++' causes the command
+     to be executed even when --nn is given.  This is similar to the effect of
+     the .MAKE special source, except that the effect can be limited to a sin-
+     gle line of a script.  A `--' in compatibility mode causes any non-zero
+     exit status of the command line to be ignored.
 
      When bbmmaakkee is run in jobs mode with --jj _m_a_x___j_o_b_s, the entire script for
-     the target is fed to a single instance of the shell.
-
-     In compatibility (non-jobs) mode, each command is run in a separate
-     process.  If the command contains any shell meta characters
-     (`#=|^(){};&<>*?[]:$`\\n') it will be passed to the shell, otherwise
-     bbmmaakkee will attempt direct execution.
-
-     Since bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' before executing any targets, each
-     child process starts with that as its current working directory.
+     the target is fed to a single instance of the shell.  In compatibility
+     (non-jobs) mode, each command is run in a separate process.  If the com-
+     mand contains any shell meta characters (`#=|^(){};&<>*?[]:$`\\n') it
+     will be passed to the shell; otherwise bbmmaakkee will attempt direct execu-
+     tion.  If a line starts with `--' and the shell has ErrCtl enabled then
+     failure of the command line will be ignored as in compatibility mode.
+     Otherwise `--' affects the entire job; the script will stop at the first
+     command line that fails, but the target will not be deemed to have
+     failed.
 
      Makefiles should be written so that the mode of bbmmaakkee operation does not
      change their behavior.  For example, any command which needs to use
-     ``cd'' or ``chdir'', without side-effect should be put in parenthesis:
-
+     ``cd'' or ``chdir'' without potentially changing the directory for subse-
+     quent commands should be put in parentheses so it executes in a subshell.
+     To force the use of one shell, escape the line breaks so as to make the
+     whole script one command.  For example:
 
            avoid-chdir-side-effects:
                    @echo Building $@ in `pwd`
-                   @(cd ${.CURDIR} && ${.MAKE} $@)
+                   @(cd ${.CURDIR} && ${MAKE} $@)
                    @echo Back in `pwd`
 
            ensure-one-shell-regardless-of-mode:
                    @echo Building $@ in `pwd`; \
-                   (cd ${.CURDIR} && ${.MAKE} $@); \
+                   (cd ${.CURDIR} && ${MAKE} $@); \
                    echo Back in `pwd`
 
+     Since bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' before executing any targets, each
+     child process starts with that as its current working directory.
+
 VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS
      Variables in make are much like variables in the shell, and, by tradi-
      tion, consist of all upper-case letters.
@@ -402,40 +411,47 @@ VVAARRIIAABBLLEE AASSSSIIGG
              Variables defined as part of the command line.
 
      Local variables
-             Variables that are defined specific to a certain target.  The
-             seven local variables are as follows:
+             Variables that are defined specific to a certain target.
 
-             _._A_L_L_S_R_C   The list of all sources for this target; also known as
-                       `_>'.
+     Local variables are all built in and their values vary magically from
+     target to target.  It is not currently possible to define new local vari-
+     ables.  The seven local variables are as follows:
 
-             _._A_R_C_H_I_V_E  The name of the archive file.
+           _._A_L_L_S_R_C   The list of all sources for this target; also known as
+                     `_>'.
 
-             _._I_M_P_S_R_C   In suffix-transformation rules, the name/path of the
-                       source from which the target is to be transformed (the
-                       ``implied'' source); also known as `_<'.  It is not
-                       defined in explicit rules.
+           _._A_R_C_H_I_V_E  The name of the archive file; also known as `_!'.
 
-             _._M_E_M_B_E_R   The name of the archive member.
+           _._I_M_P_S_R_C   In suffix-transformation rules, the name/path of the
+                     source from which the target is to be transformed (the
+                     ``implied'' source); also known as `_<'.  It is not
+                     defined in explicit rules.
 
-             _._O_O_D_A_T_E   The list of sources for this target that were deemed
-                       out-of-date; also known as `_?'.
+           _._M_E_M_B_E_R   The name of the archive member; also known as `_%'.
 
-             _._P_R_E_F_I_X   The file prefix of the target, containing only the file
-                       portion, no suffix or preceding directory components;
-                       also known as `_*'.
+           _._O_O_D_A_T_E   The list of sources for this target that were deemed out-
+                     of-date; also known as `_?'.
 
-             _._T_A_R_G_E_T   The name of the target; also known as `_@'.
+           _._P_R_E_F_I_X   The file prefix of the target, containing only the file
+                     portion, no suffix or preceding directory components;
+                     also known as `_*'.  The suffix must be one of the known
+                     suffixes declared with ..SSUUFFFFIIXXEESS or it will not be recog-
+                     nized.
 
-             The shorter forms `_@', `_?', `_<', `_>', and `_*' are permitted for
-             backward compatibility with historical makefiles and are not rec-
-             ommended.  The six variables `_@_F', `_@_D', `_<_F', `_<_D', `_*_F', and
-             `_*_D' are permitted for compatibility with AT&T System V UNIX
-             makefiles and are not recommended.
+           _._T_A_R_G_E_T   The name of the target; also known as `_@'.
 
-             Four of the local variables may be used in sources on dependency
-             lines because they expand to the proper value for each target on
-             the line.  These variables are `_._T_A_R_G_E_T', `_._P_R_E_F_I_X', `_._A_R_C_H_I_V_E',
-             and `_._M_E_M_B_E_R'.
+     The shorter forms (`_>', `_!', `_<', `_%', `_?', `_*', and `_@') are permitted
+     for backward compatibility with historical makefiles and legacy POSIX
+     make and are not recommended.
+
+     Variants of these variables with the punctuation followed immediately by
+     `D' or `F', e.g.  `_$_(_@_D_)', are legacy forms equivalent to using the `:H'
+     and `:T' modifiers.  These forms are accepted for compatibility with AT&T
+     System V UNIX makefiles and POSIX but are not recommended.
+
+     Four of the local variables may be used in sources on dependency lines
+     because they expand to the proper value for each target on the line.
+     These variables are `_._T_A_R_G_E_T', `_._P_R_E_F_I_X', `_._A_R_C_H_I_V_E', and `_._M_E_M_B_E_R'.
 
    AAddddiittiioonnaall bbuuiilltt--iinn vvaarriiaabblleess
      In addition, bbmmaakkee sets or knows about the following variables:
@@ -1356,19 +1372,58 @@ FFIILLEESS
      /usr/share/mk  system makefile directory
 
 CCOOMMPPAATTIIBBIILLIITTYY
-     The basic make syntax is compatible between different versions of make,
+     The basic make syntax is compatible between different versions of make;
      however the special variables, variable modifiers and conditionals are
      not.
 
-     The way that parallel makes are scheduled changed in NetBSD 4.0 so that
-     .ORDER and .WAIT apply recursively to the dependent nodes.  The algo-
-     rithms used may change again in the future.
+   OOllddeerr vveerrssiioonnss
+     An incomplete list of changes in older versions of bbmmaakkee:
 
      The way that .for loop variables are substituted changed after NetBSD 5.0
      so that they still appear to be variable expansions.  In particular this
      stops them being treated as syntax, and removes some obscure problems
      using them in .if statements.
 
+     The way that parallel makes are scheduled changed in NetBSD 4.0 so that
+     .ORDER and .WAIT apply recursively to the dependent nodes.  The algo-
+     rithms used may change again in the future.
+
+   OOtthheerr mmaakkee ddiiaalleeccttss
+     Other make dialects (GNU make, SVR4 make, POSIX make, etc.) do not sup-
+     port most of the features of bbmmaakkee as described in this manual.  Most
+     notably:
+
+           ++oo   The ..WWAAIITT and ..OORRDDEERR declarations and most functionality per-
+               taining to parallelization.  (GNU make supports parallelization
+               but lacks these features needed to control it effectively.)
+
+           ++oo   Directives, including for loops and conditionals and most of
+               the forms of include files.  (GNU make has its own incompatible
+               and less powerful syntax for conditionals.)
+
+           ++oo   All built-in variables that begin with a dot.
+
+           ++oo   Most of the special sources and targets that begin with a dot,
+               with the notable exception of ..PPHHOONNYY, ..PPRREECCIIOOUUSS, and ..SSUUFFFFIIXXEESS.
+
+           ++oo   Variable modifiers, except for the
+                     :old=new
+               string substitution, which does not portably support globbing
+               with `%' and historically only works on declared suffixes.
+
+           ++oo   The $$>> variable even in its short form; most makes support this
+               functionality but its name varies.
+
+     Some features are somewhat more portable, such as assignment with ++==, ??==,
+     and !!==.  The ..PPAATTHH functionality is based on an older feature VVPPAATTHH found
+     in GNU make and many versions of SVR4 make; however, historically its
+     behavior is too ill-defined (and too buggy) to rely upon.
+
+     The $$@@ and $$<< variables are more or less universally portable, as is the
+     $$((MMAAKKEE)) variable.  Basic use of suffix rules (for files only in the cur-
+     rent directory, not trying to chain transformations together, etc.) is
+     also reasonably portable.
+
 SSEEEE AALLSSOO
      mkdep(1)
 
@@ -1394,4 +1449,4 @@ BBUUGGSS
 
      There is no way of escaping a space character in a filename.
 
-NetBSD 5.1                     February 14, 2014                    NetBSD 5.1
+NetBSD 5.1                       April 9, 2015                      NetBSD 5.1

Modified: head/contrib/bmake/compat.c
==============================================================================
--- head/contrib/bmake/compat.c	Tue Apr 21 03:29:03 2015	(r281811)
+++ head/contrib/bmake/compat.c	Tue Apr 21 04:40:38 2015	(r281812)
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat.c,v 1.94 2014/01/03 00:02:01 sjg Exp $	*/
+/*	$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: compat.c,v 1.94 2014/01/03 00:02:01 sjg Exp $";
+static char rcsid[] = "$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)compat.c	8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: compat.c,v 1.94 2014/01/03 00:02:01 sjg Exp $");
+__RCSID("$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $");
 #endif
 #endif /* not lint */
 #endif

Modified: head/contrib/bmake/configure
==============================================================================
Binary file (source and/or target). No diff available.

Modified: head/contrib/bmake/configure.in
==============================================================================
--- head/contrib/bmake/configure.in	Tue Apr 21 03:29:03 2015	(r281811)
+++ head/contrib/bmake/configure.in	Tue Apr 21 04:40:38 2015	(r281812)
@@ -1,6 +1,6 @@
 dnl
 dnl RCSid:
-dnl	$Id: configure.in,v 1.52 2014/02/15 22:27:59 sjg Exp $
+dnl	$Id: configure.in,v 1.53 2014/11/06 01:49:40 sjg Exp $
 dnl
 dnl Process this file with autoconf to produce a configure script
 dnl
@@ -82,6 +82,8 @@ dnl
 dnl Hurd refuses to define PATH_MAX or MAXPATHLEN
 if test -x /usr/bin/getconf; then
    bmake_path_max=`getconf PATH_MAX / 2> /dev/null`
+   # only a numeric response is useful
+   test ${bmake_path_max:-0} -gt 0 2> /dev/null || bmake_path_max=
 fi
 bmake_path_max=${bmake_path_max:-1024}
 if test $bmake_path_max -gt 1024; then

Modified: head/contrib/bmake/job.c
==============================================================================
--- head/contrib/bmake/job.c	Tue Apr 21 03:29:03 2015	(r281811)
+++ head/contrib/bmake/job.c	Tue Apr 21 04:40:38 2015	(r281812)
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $	*/
+/*	$NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg 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.176 2013/08/04 16:48:15 sjg Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg 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.176 2013/08/04 16:48:15 sjg Exp $");
+__RCSID("$NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -744,7 +744,6 @@ JobPrintCommand(void *cmdp, void *jobp)
 	    shutUp = DEBUG(LOUD) ? FALSE : TRUE;
 	    break;
 	case '-':
-	    job->flags |= JOB_IGNERR;
 	    errOff = TRUE;
 	    break;
 	case '+':
@@ -823,6 +822,7 @@ JobPrintCommand(void *cmdp, void *jobp)
 		 * to ignore errors. Set cmdTemplate to use the weirdness
 		 * instead of the simple "%s\n" template.
 		 */
+		job->flags |= JOB_IGNERR;
 		if (!(job->flags & JOB_SILENT) && !shutUp) {
 			if (commandShell->hasEchoCtl) {
 				DBPRINTF("%s\n", commandShell->echoOff);
@@ -1376,7 +1376,8 @@ JobExec(Job *job, char **argv)
 	(void)fcntl(0, F_SETFD, 0);
 	(void)lseek(0, (off_t)0, SEEK_SET);
 
-	if (Always_pass_job_queue || (job->node->type & OP_MAKE)) {
+	if (Always_pass_job_queue ||
+	    (job->node->type & (OP_MAKE | OP_SUBMAKE))) {
 		/*
 		 * Pass job token pipe to submakes.
 		 */
@@ -1910,16 +1911,16 @@ end_loop:
 		(void)fflush(stdout);
 	    }
 	}
-	if (i < max - 1) {
-	    /* shift the remaining characters down */
-	    (void)memcpy(job->outBuf, &job->outBuf[i + 1], max - (i + 1));
+	/*
+	 * max is the last offset still in the buffer. Move any remaining
+	 * characters to the start of the buffer and update the end marker
+	 * curPos.
+	 */
+	if (i < max) {
+	    (void)memmove(job->outBuf, &job->outBuf[i + 1], max - (i + 1));
 	    job->curPos = max - (i + 1);
-
 	} else {
-	    /*
-	     * We have written everything out, so we just start over
-	     * from the start of the buffer. No copying. No nothing.
-	     */
+	    assert(i == max);
 	    job->curPos = 0;
 	}
     }

Modified: head/contrib/bmake/lst.h
==============================================================================
--- head/contrib/bmake/lst.h	Tue Apr 21 03:29:03 2015	(r281811)
+++ head/contrib/bmake/lst.h	Tue Apr 21 04:40:38 2015	(r281812)
@@ -1,4 +1,4 @@
-/*	$NetBSD: lst.h,v 1.18 2009/01/23 21:58:27 dsl Exp $	*/
+/*	$NetBSD: lst.h,v 1.20 2014/09/07 20:55:34 joerg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.

Modified: head/contrib/bmake/lst.lib/lstInt.h
==============================================================================
--- head/contrib/bmake/lst.lib/lstInt.h	Tue Apr 21 03:29:03 2015	(r281811)
+++ head/contrib/bmake/lst.lib/lstInt.h	Tue Apr 21 04:40:38 2015	(r281812)
@@ -1,4 +1,4 @@
-/*	$NetBSD: lstInt.h,v 1.20 2009/01/24 14:43:29 dsl Exp $	*/
+/*	$NetBSD: lstInt.h,v 1.22 2014/09/07 20:55:34 joerg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993

Modified: head/contrib/bmake/lst.lib/lstRemove.c
==============================================================================
--- head/contrib/bmake/lst.lib/lstRemove.c	Tue Apr 21 03:29:03 2015	(r281811)
+++ head/contrib/bmake/lst.lib/lstRemove.c	Tue Apr 21 04:40:38 2015	(r281812)
@@ -1,4 +1,4 @@
-/*	$NetBSD: lstRemove.c,v 1.14 2008/12/13 15:19:29 dsl Exp $	*/
+/*	$NetBSD: lstRemove.c,v 1.16 2014/09/07 20:55:34 joerg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstRemove.c,v 1.14 2008/12/13 15:19:29 dsl Exp $";
+static char rcsid[] = "$NetBSD: lstRemove.c,v 1.16 2014/09/07 20:55:34 joerg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)lstRemove.c	8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: lstRemove.c,v 1.14 2008/12/13 15:19:29 dsl Exp $");
+__RCSID("$NetBSD: lstRemove.c,v 1.16 2014/09/07 20:55:34 joerg Exp $");
 #endif
 #endif /* not lint */
 #endif

Modified: head/contrib/bmake/main.c
==============================================================================
--- head/contrib/bmake/main.c	Tue Apr 21 03:29:03 2015	(r281811)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504210440.t3L4ecLY001402>