--- old/usr/src/cmd/make/Makefile.com	2015-06-12 18:13:47.735373082 -0400
+++ new/usr/src/cmd/make/Makefile.com	2015-06-12 18:13:47.780408160 -0400
@@ -12,7 +12,6 @@
 # Copyright 2015, Richard Lowe.
 
 MAKE_INCLUDE= $(SRC)/cmd/make/include
-$(RELEASE_BUILD)MAKE_DEFS += -DNDEBUG
 CFLAGS += $(CCVERBOSE)
 CPPFLAGS += -I$(MAKE_INCLUDE) $(MAKE_DEFS)
 
--- old/usr/src/cmd/make/bin/main.cc	2015-06-12 18:13:49.586000945 -0400
+++ new/usr/src/cmd/make/bin/main.cc	2015-06-12 18:13:49.600737203 -0400
@@ -59,9 +59,6 @@
 // From read2.cc
 extern	Name		normalize_name(register wchar_t *name_string, register int length);
 
-// From parallel.cc
-#define MAXJOBS_ADJUST_RFE4694000
-
 extern void job_adjust_fini();
 
 
@@ -398,8 +395,13 @@
 	 */
     if ((!pmake_cap_r_specified) &&
         (!pmake_machinesfile_specified)) {
-	char *s = strdup(argv[0]);    
-	    
+	char *s, *b;
+
+	if ((s = strdup(argv[0])) == NULL)
+		fatal(gettext("Out of memory"));
+
+	b = basename(s);
+
 	MBSTOWCS(wcs_buffer, "DMAKE_MODE");
 	dmake_name2 = GETNAME(wcs_buffer, FIND_LENGTH);
 	prop2 = get_prop(dmake_name2->prop, macro_prop);
@@ -407,15 +409,13 @@
 	// If we're invoked as 'make' but passed -j, run parallel
 	// If we're invoked as 'dmake', without DMAKE_MODE, default parallel
 	// If we're invoked as 'dmake' and DMAKE_MODE is set, honour it.
-	if ((strcmp(basename(s), "make") == 0) &&
+	if ((strcmp(b, "make") == 0) &&
 	    !dmake_max_jobs_specified) {
 		dmake_mode_type = serial_mode;
 		no_parallel = true;
 	} else if (prop2 == NULL) {
 		/* DMAKE_MODE not defined, default based on our name */
-		char *s = strdup(argv[0]);
-
-		if (strcmp(basename(s), "dmake") == 0) {
+		if (strcmp(b, "dmake") == 0) {
 			dmake_mode_type = parallel_mode;
 			no_parallel = false;
 		}
--- old/usr/src/cmd/make/include/mksh/dosys.h	2015-06-12 18:13:50.285208169 -0400
+++ new/usr/src/cmd/make/include/mksh/dosys.h	2015-06-12 18:13:50.309207831 -0400
@@ -31,7 +31,6 @@
 extern Boolean	await(register Boolean ignore_error, register Boolean silent_error, Name target, wchar_t *command, pid_t running_pid, void *xdrs, int job_msg_id);
 extern int	doexec(register wchar_t *command, register Boolean ignore_error, char *stdout_file, char *stderr_file, pathpt vroot_path, int nice_prio);
 extern int	doshell(wchar_t *command, register Boolean ignore_error, char *stdout_file, char *stderr_file, int nice_prio);
-extern Doname	dosys_mksh(register Name command, register Boolean ignore_error, register Boolean call_make, Boolean silent_error, Boolean always_exec, Name target, char *stdout_file, char *stderr_file, pathpt vroot_path, int nice_prio);
 extern void	redirect_io(char *stdout_file, char *stderr_file);
 extern void	sh_command2string(register String command, register String destination);
 
--- old/usr/src/cmd/make/lib/mksh/libmksh.msg	2015-06-12 18:13:50.706071155 -0400
+++ /dev/null	2015-06-12 18:13:50.000000000 -0400
@@ -1,80 +0,0 @@
-
-$quote "
-
-
-$set	1
-$
-$ CDDL HEADER START
-$
-$ The contents of this file are subject to the terms of the
-$ Common Development and Distribution License (the "License").
-$ You may not use this file except in compliance with the License.
-$
-$ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-$ or http://www.opensolaris.org/os/licensing.
-$ See the License for the specific language governing permissions
-$ and limitations under the License.
-$
-$ When distributing Covered Code, include this CDDL HEADER in each
-$ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-$ If applicable, add the following below this CDDL HEADER, with the
-$ fields enclosed by brackets "[]" replaced with your own identifying
-$ information: Portions Copyright [yyyy] [name of copyright owner]
-$
-$ CDDL HEADER END
-$
-$ Copyright 1996 Sun Microsystems, Inc. All rights reserved.
-$ Use is subject to license terms.
-$
-$
-89	"ulimit() failed: %s"
-90	"Couldn't open standard out temp file `%s': %s"
-91	"Couldn't open standard error temp file `%s': %s"
-92	"Could not load `/usr/bin/nice': %s"
-93	"Could not load Shell from `%s': %s"
-94	"fork failed: %s"
-95	"Command `%s' has more than %d arguments"
-96	"Cannot load command `%s': %s"
-97	"fork failed: %s"
-98	"wait() failed: %s"
-99	"Could not open filter file for -X"
-100	"Could not stat filter file for -X"
-101	"\n**** Error: Directory %s Target %s:\n%s\n"
-102	"**** Error: Directory %s Target %s\n"
-103	"*** Error code %d"
-104	"*** Error code %d"
-105	"*** Signal %d"
-106	"*** Signal %d"
-107	" - core dumped"
-108	" - core dumped"
-109	" (ignored)"
-110	" (ignored)"
-111	"Could not run command `%s' for :sh transformation"
-112	"The command `%s' returned status `%d'"
-113	"Loop detected when expanding macro value `%s'"
-114	"'$' at end of string `%s'"
-115	"'$' at end of line"
-116	"Unmatched `%c' in string `%s'"
-117	"Premature EOF"
-118	"Unmatched `%c' on line"
-119	"Illegal macro reference `%s'"
-120	"= missing from replacement macro reference"
-121	"= missing from replacement macro reference"
-122	"%% missing from replacement macro reference"
-123	"%% missing from replacement macro reference"
-124	"Too many %% in pattern"
-125	"Conditional macro `%s' referenced on line %d"
-126	"Out of memory"
-127	"Error %d"
-128	"mksh: Fatal error: "
-129	"Current working directory %s\n"
-131	"mksh: Fatal error in reader: "
-133	"Current working directory %s\n"
-134	"mksh: Warning: "
-135	"Current working directory %s\n"
-136	"Internal error. Unknown prop type %d"
-137	"`cd %s' failed, and conversion of %s to automounter pathname also failed"
-138	"`cd %s' and `cd %s' both failed"
-139	"The following command caused the error:\n%s\n"
-140	"Error reading `%s': Premature EOF"
-141	"Error reading `%s': %s"
--- old/usr/src/cmd/make/lib/vroot/libvroot.msg	2015-06-12 18:13:51.181655954 -0400
+++ /dev/null	2015-06-12 18:13:51.000000000 -0400
@@ -1,36 +0,0 @@
-
-$quote "
-
-
-$set	1
-$
-$ CDDL HEADER START
-$
-$ The contents of this file are subject to the terms of the
-$ Common Development and Distribution License (the "License").
-$ You may not use this file except in compliance with the License.
-$
-$ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-$ or http://www.opensolaris.org/os/licensing.
-$ See the License for the specific language governing permissions
-$ and limitations under the License.
-$
-$ When distributing Covered Code, include this CDDL HEADER in each
-$ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-$ If applicable, add the following below this CDDL HEADER, with the
-$ fields enclosed by brackets "[]" replaced with your own identifying
-$ information: Portions Copyright [yyyy] [name of copyright owner]
-$
-$ CDDL HEADER END
-$
-$ Copyright 1996 Sun Microsystems, Inc. All rights reserved.
-$ Use is subject to license terms.
-$
-142	"file_lock: file %s is already locked.\n"
-143	"file_lock: will periodically check the lockfile %s for two minutes.\n"
-144	"Current working directory %s\n"
-145	"Could not lock file `%s'; "
-146	" failed - "
-147	"Couldn't write to %s"
-148	"Cannot open `%s' for writing\n"
-149	"Cannot open %s for writing\n"
--- old/usr/src/man/man1s/Makefile	2015-06-12 18:13:51.425627642 -0400
+++ new/usr/src/man/man1s/Makefile	2015-06-12 18:13:51.437565390 -0400
@@ -19,9 +19,12 @@
 MANSECT= 	1s
 
 MANFILES=	make.1s
+MANLINKS=	dmake.1s
+
+dmake.1s	:= LINKSRC = make.1s
 
 .KEEP_STATE:
 
 include		$(SRC)/man/Makefile.man
 
-install:	$(ROOTMANFILES)
+install:	$(ROOTMANFILES) $(ROOTMANLINKS)
--- old/usr/src/pkg/manifests/developer-build-make.mf	2015-06-12 18:13:51.868711644 -0400
+++ new/usr/src/pkg/manifests/developer-build-make.mf	2015-06-12 18:13:51.881129544 -0400
@@ -31,4 +31,5 @@
 link path=usr/ccs/bin/make target=../../bin/make
 link path=usr/ccs/lib/svr4.make target=../../bin/make
 link path=usr/lib/svr4.make target=../bin/make
+link path=usr/share/man/man1s/dmake.1s target=make.1s
 link path=usr/xpg4/bin/make target=../../bin/make
--- old/usr/src/tools/make/Makefile.com	2015-06-12 18:13:52.294836059 -0400
+++ new/usr/src/tools/make/Makefile.com	2015-06-12 18:13:52.306872148 -0400
@@ -12,7 +12,6 @@
 # Copyright 2015, Richard Lowe.
 
 MAKE_INCLUDE= $(SRC)/cmd/make/include
-$(RELEASE_BUILD)MAKE_DEFS += -DNDEBUG
 
 CC = $(NATIVECC)
 CCC = $(NATIVECCC)
