--- old/usr/src/pkg/manifests/developer-build-onbld.mf	2015-05-20 12:24:57.654670731 -0400
+++ new/usr/src/pkg/manifests/developer-build-onbld.mf	2015-05-20 12:24:57.666479826 -0400
@@ -21,7 +21,7 @@
 
 #
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright 2010, Richard Lowe
+# Copyright 2015, Richard Lowe
 # Copyright 2012, Piotr Jasiukajtis
 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
 # Copyright (c) 2014, Joyent, Inc.
@@ -49,6 +49,7 @@
 dir path=opt/onbld/gk
 dir path=opt/onbld/lib
 dir path=opt/onbld/lib/$(ARCH)
+dir path=opt/onbld/lib/$(ARCH)/64
 dir path=opt/onbld/lib/perl
 dir path=opt/onbld/lib/python2.6
 dir path=opt/onbld/lib/python2.6/onbld
@@ -57,6 +58,7 @@
 dir path=opt/onbld/lib/python2.6/onbld/hgext
 dir path=opt/onbld/man
 dir path=opt/onbld/man/man1
+dir path=opt/onbld/share
 $(i386_ONLY)file path=opt/onbld/bin/$(ARCH)/aw mode=0555
 $(sparc_ONLY)file path=opt/onbld/bin/$(ARCH)/chk4ubin mode=0555
 file path=opt/onbld/bin/$(ARCH)/codereview mode=0555
@@ -73,6 +75,7 @@
 $(sparc_ONLY)file path=opt/onbld/bin/$(ARCH)/forth_preload.so.1 mode=0555
 file path=opt/onbld/bin/$(ARCH)/install mode=0555
 file path=opt/onbld/bin/$(ARCH)/lintdump mode=0555
+file path=opt/onbld/bin/$(ARCH)/make mode=0555
 $(i386_ONLY)file path=opt/onbld/bin/$(ARCH)/mbh_patch mode=0555
 file path=opt/onbld/bin/$(ARCH)/ndrgen mode=0555
 file path=opt/onbld/bin/$(ARCH)/ndrgen1 mode=0555
@@ -138,7 +141,9 @@
 file path=opt/onbld/gk/.cshrc
 file path=opt/onbld/gk/.login
 file path=opt/onbld/gk/gen_make.machines mode=0755
+file path=opt/onbld/lib/$(ARCH)/64/libmakestate.so.1
 file path=opt/onbld/lib/$(ARCH)/libdwarf.so.1
+file path=opt/onbld/lib/$(ARCH)/libmakestate.so.1
 file path=opt/onbld/lib/perl/onbld_elfmod.pm
 file path=opt/onbld/lib/perl/onbld_elfmod_vertype.pm
 file path=opt/onbld/lib/python2.6/onbld/Checks/CStyle.py mode=0444
@@ -215,6 +220,7 @@
 file path=opt/onbld/man/man1/ws.1
 file path=opt/onbld/man/man1/wsdiff.1
 file path=opt/onbld/man/man1/xref.1
+file path=opt/onbld/share/make.rules mode=0444
 hardlink path=opt/onbld/bin/$(ARCH)/install.bin target=./install
 legacy pkg=SUNWonbld desc="tools used to build the OS-Net consolidation" \
     name="OS-Net Build Tools" version=11.11,REV=2009.10.22
@@ -224,6 +230,7 @@
     license=usr/src/tools/ctf/dwarf/THIRDPARTYLICENSE
 license usr/src/tools/onbld/THIRDPARTYLICENSE \
     license=usr/src/tools/onbld/THIRDPARTYLICENSE
+link path=opt/onbld/bin/$(ARCH)/dmake target=make
 link path=opt/onbld/bin/git-nits target=git-pbchk
 link path=opt/onbld/lib/python target=python2.6
 link path=opt/onbld/man/man1/git-nits.1 target=git-pbchk.1
--- old/usr/src/tools/Makefile	2015-05-20 12:24:58.067167095 -0400
+++ new/usr/src/tools/Makefile	2015-05-20 12:24:58.078825015 -0400
@@ -40,12 +40,13 @@
 	depcheck \
 	env \
 	findunref \
-	ndrgen \
-	onbld \
-	pmodes \
 	gk \
 	install.bin \
 	lintdump \
+	make \
+	ndrgen \
+	onbld \
+	pmodes \
 	protocmp \
 	protolist \
 	scripts
@@ -91,6 +92,7 @@
 	$(ROOTONBLD)/bin/$(MACH) \
 	$(ROOTONBLD)/lib \
 	$(ROOTONBLD)/lib/$(MACH) \
+	$(ROOTONBLD)/lib/$(MACH)/64 \
 	$(ROOTONBLD)/lib/perl \
 	$(ROOTONBLD)/lib/python2.6 \
 	$(ROOTONBLD)/lib/python2.6/onbld \
@@ -100,6 +102,7 @@
 	$(ROOTONBLD)/env \
 	$(ROOTONBLD)/etc \
 	$(ROOTONBLD)/etc/exception_lists \
+	$(ROOTONBLD)/share \
 	$(ROOTONBLD)/gk \
 	$(ROOTONBLD)/man \
 	$(ROOTONBLD)/man/man1
@@ -145,4 +148,6 @@
 $(ROOTONBLDLIBPY): $(ROOTDIRS)
 	$(RM) -r $@; $(SYMLINK) python2.6 $@
 
+make: ctf
+
 FRC:
--- old/usr/src/tools/Makefile.tools	2015-05-20 12:24:58.466416393 -0400
+++ new/usr/src/tools/Makefile.tools	2015-05-20 12:24:58.478128797 -0400
@@ -36,6 +36,7 @@
 ROOTONBLDETC=		$(ROOTONBLD)/etc
 ROOTONBLDLIB=		$(ROOTONBLD)/lib
 ROOTONBLDLIBMACH=	$(ROOTONBLD)/lib/$(MACH)
+ROOTONBLDLIBMACH64=	$(ROOTONBLD)/lib/$(MACH)/64
 ROOTONBLDLIBPERL=	$(ROOTONBLD)/lib/perl
 ROOTONBLDLIBPY=		$(ROOTONBLD)/lib/python
 ROOTONBLDLIBPY_26=	$(ROOTONBLD)/lib/python2.6
@@ -45,6 +46,7 @@
 ROOTONBLDMAN1=		$(ROOTONBLD)/man/man1
 ROOTONBLDETCABI=	$(ROOTONBLD)/etc/abi
 ROOTONBLDETCEXCEPT=	$(ROOTONBLD)/etc/exception_lists
+ROOTONBLDSHARE=		$(ROOTONBLD)/share
 
 CPPFLAGS=		-D_TS_ERRNO
 ELFSIGN_O=		$(TRUE)
--- /dev/null	2015-05-20 12:24:58.000000000 -0400
+++ new/usr/src/tools/make/Makefile	2015-05-20 12:24:58.870301583 -0400
@@ -0,0 +1,32 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+# Copyright 2015, Richard Lowe.
+
+SUBDIRS=bin \
+	lib
+
+all	:=	TARGET = all
+install :=	TARGET = install
+clean	:=	TARGET = clean
+clobber	:=	TARGET = clobber
+lint	:=	TARGET = lint
+
+.KEEP_STATE:
+
+bin: lib
+
+all clean clobber lint install: $(SUBDIRS)
+
+$(SUBDIRS):	FRC
+	@cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
--- /dev/null	2015-05-20 12:24:59.000000000 -0400
+++ new/usr/src/tools/make/Makefile.com	2015-05-20 12:24:59.133624763 -0400
@@ -0,0 +1,22 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+# Copyright 2015, Richard Lowe.
+
+MAKE_INCLUDE= $(SRC)/cmd/make/include
+$(RELEASE_BUILD)MAKE_DEFS += -DNDEBUG
+
+CC = $(NATIVECC)
+CCC = $(NATIVECCC)
+CFLAGS = $(NATIVE_CFLAGS)
+CFLAGS += $(CCVERBOSE)
+CPPFLAGS = $(CPPFLAGS.native)
+CPPFLAGS += -I$(MAKE_INCLUDE) $(MAKE_DEFS)
--- /dev/null	2015-05-20 12:24:59.000000000 -0400
+++ new/usr/src/tools/make/bin/Makefile	2015-05-20 12:24:59.333859476 -0400
@@ -0,0 +1,72 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+# Copyright 2015, Richard Lowe.
+
+PROG=	make
+CMDDIR=	$(SRC)/cmd/make/bin
+OBJS=	ar.o		\
+	depvar.o	\
+	doname.o	\
+	dosys.o		\
+	files.o		\
+	globals.o	\
+	implicit.o	\
+	macro.o		\
+	main.o		\
+	misc.o		\
+	nse_printdep.o	\
+	parallel.o	\
+	pmake.o		\
+	read.o		\
+	read2.o		\
+	rep.o		\
+	state.o
+SRCS=$(OBJS:%.o:$(CMDDIR)/%.cc)
+
+include ../../Makefile.tools
+include ../Makefile.com
+
+LDLIBS += ../lib/mksh/libmksh.a ../lib/vroot/libvroot.a
+LDLIBS += ../lib/bsd/libbsd.a -lc -lnsl -lumem
+
+CPPFLAGS += -D_FILE_OFFSET_BITS=64
+
+ROOTLINKS = $(ROOTONBLDBINMACH)/dmake
+ROOTRULES = $(ROOTONBLDSHARE)/make.rules
+
+all:	$(PROG)
+
+install: all $(ROOTONBLDMACHPROG) $(ROOTLINKS) $(ROOTRULES)
+
+$(PROG):	$(OBJS)
+	$(LINK.cc) $(OBJS) -o $@ $(LDLIBS)
+	$(POST_PROCESS)
+
+%.o:	$(CMDDIR)/%.cc
+	$(COMPILE.cc) -o $@ $<
+
+$(ROOTONBLDBINMACH)/dmake:
+	-$(RM) $@; $(SYMLINK) ./make $@
+
+$(ROOTRULES) := FILEMODE = 0444
+
+$(ROOTONBLDSHARE)/%: $(CMDDIR)/%.file
+	$(INS.rename)
+
+
+lint:
+
+clean:
+	$(RM) $(OBJS)
+
+include $(SRC)/tools/Makefile.targ
+
--- /dev/null	2015-05-20 12:24:59.000000000 -0400
+++ new/usr/src/tools/make/lib/Makefile	2015-05-20 12:24:59.533991420 -0400
@@ -0,0 +1,32 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+# Copyright 2015, Richard Lowe.
+
+SUBDIRS=bsd \
+	makestate \
+	mksh \
+	vroot
+
+all	:=	TARGET = all
+install :=	TARGET = install
+clean	:=	TARGET = clean
+clobber	:=	TARGET = clobber
+lint	:=	TARGET = lint
+
+.KEEP_STATE:
+
+all clean clobber lint install: $(SUBDIRS)
+
+$(SUBDIRS):	FRC
+	@cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
--- /dev/null	2015-05-20 12:24:59.000000000 -0400
+++ new/usr/src/tools/make/lib/bsd/Makefile	2015-05-20 12:24:59.740671330 -0400
@@ -0,0 +1,31 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+# Copyright 2015, Richard Lowe.
+
+LIBRARY = libbsd.a
+VERS = .1
+OBJECTS = bsd.o
+
+include $(SRC)/lib/Makefile.lib
+include ../../Makefile.com
+
+LIBS = $(LIBRARY)
+SRCDIR = $(SRC)/cmd/make/lib/bsd
+CPPFLAGS += -D_FILE_OFFSET_BITS=64
+
+all: $(LIBS)
+
+install: all
+
+lint:
+
+include $(SRC)/lib/Makefile.targ
--- /dev/null	2015-05-20 12:24:59.000000000 -0400
+++ new/usr/src/tools/make/lib/makestate/Makefile	2015-05-20 12:24:59.929754629 -0400
@@ -0,0 +1,31 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+# Copyright 2015, Richard Lowe.
+
+include $(SRC)/Makefile.master
+
+SUBDIRS=$(MACH) $(MACH64)
+
+all	:=	TARGET = all
+install :=	TARGET = install
+clean	:=	TARGET = clean
+clobber	:=	TARGET = clobber
+lint	:=	TARGET = lint
+
+.KEEP_STATE:
+
+all clean clobber lint install: $(SUBDIRS)
+
+$(SUBDIRS):	FRC
+	@cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
--- /dev/null	2015-05-20 12:25:00.000000000 -0400
+++ new/usr/src/tools/make/lib/makestate/Makefile.com	2015-05-20 12:25:00.133868563 -0400
@@ -0,0 +1,40 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+# Copyright 2015, Richard Lowe.
+
+include $(SRC)/tools/Makefile.tools
+
+LIBRARY = libmakestate.a
+VERS = .1
+OBJECTS = ld_file.o lock.o
+
+include $(SRC)/lib/Makefile.lib
+include ../../../Makefile.com
+
+LIBS = $(DYNLIB)
+SRCDIR = $(SRC)/cmd/make/lib/makestate
+MAPFILES = $(SRCDIR)/mapfile-vers
+LDLIBS += -lc
+
+FILEMODE= 755
+
+all: $(LIBS)
+
+lint:
+
+$(ROOTONBLDLIBMACH)/%: %
+	$(INS.file)
+
+$(ROOTONBLDLIBMACH64)/%: %
+	$(INS.file)
+
+include $(SRC)/lib/Makefile.targ
--- /dev/null	2015-05-20 12:25:00.000000000 -0400
+++ new/usr/src/tools/make/lib/makestate/amd64/Makefile	2015-05-20 12:25:00.367027374 -0400
@@ -0,0 +1,17 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+# Copyright 2015, Richard Lowe.
+
+include ../Makefile.com
+include $(SRC)/lib/Makefile.lib.64
+
+install: all $(ROOTONBLDLIBMACH64)/libmakestate.so.1
--- /dev/null	2015-05-20 12:25:00.000000000 -0400
+++ new/usr/src/tools/make/lib/makestate/i386/Makefile	2015-05-20 12:25:00.557025939 -0400
@@ -0,0 +1,16 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+# Copyright 2015, Richard Lowe.
+
+include ../Makefile.com
+
+install: all $(ROOTONBLDLIBMACH)/libmakestate.so.1
--- /dev/null	2015-05-20 12:25:00.000000000 -0400
+++ new/usr/src/tools/make/lib/makestate/sparc/Makefile	2015-05-20 12:25:00.747010708 -0400
@@ -0,0 +1,15 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+# Copyright 2015, Richard Lowe.
+
+include ../Makefile.com
+install: all $(ROOTONBLDLIBMACH)/libmakestate.so.1
--- /dev/null	2015-05-20 12:25:00.000000000 -0400
+++ new/usr/src/tools/make/lib/makestate/sparcv9/Makefile	2015-05-20 12:25:00.936757499 -0400
@@ -0,0 +1,15 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+# Copyright 2015, Richard Lowe.
+
+include ../Makefile.com
+install: all $(ROOTONBLDLIBMACH64)/libmakestate.so.1
--- /dev/null	2015-05-20 12:25:01.000000000 -0400
+++ new/usr/src/tools/make/lib/mksh/Makefile	2015-05-20 12:25:01.128381992 -0400
@@ -0,0 +1,32 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+# Copyright 2015, Richard Lowe.
+
+LIBRARY = libmksh.a
+VERS = .1
+OBJECTS = dosys.o globals.o i18n.o macro.o misc.o mksh.o read.o
+
+include $(SRC)/lib/Makefile.lib
+include ../../Makefile.com
+
+LIBS = $(LIBRARY)
+SRCDIR = $(SRC)/cmd/make/lib/mksh
+MAPFILES=
+CPPFLAGS += -D_FILE_OFFSET_BITS=64
+
+all: $(LIBS)
+
+install: all
+
+lint:
+
+include $(SRC)/lib/Makefile.targ
--- /dev/null	2015-05-20 12:25:01.000000000 -0400
+++ new/usr/src/tools/make/lib/vroot/Makefile	2015-05-20 12:25:01.319573221 -0400
@@ -0,0 +1,53 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+# Copyright 2015, Richard Lowe.
+
+LIBRARY =	libvroot.a
+VERS =		.1
+OBJECTS =	access.o	\
+		args.o		\
+		chdir.o		\
+		chmod.o		\
+		chown.o		\
+		chroot.o	\
+		creat.o		\
+		execve.o	\
+		lock.o		\
+		lstat.o		\
+		mkdir.o		\
+		mount.o		\
+		open.o		\
+		readlink.o	\
+		report.o	\
+		rmdir.o		\
+		stat.o		\
+		truncate.o	\
+		unlink.o	\
+		utimes.o	\
+		vroot.o		\
+		setenv.o
+
+include $(SRC)/lib/Makefile.lib
+include ../../Makefile.com
+
+LIBS = $(LIBRARY)
+SRCDIR = $(SRC)/cmd/make/lib/vroot
+MAPFILES=
+CPPFLAGS += -D_FILE_OFFSET_BITS=64
+
+all: $(LIBS)
+
+install: all
+
+lint:
+
+include $(SRC)/lib/Makefile.targ
