shithub: purgatorio

Download patch

ref: 43de7b8419fa3582af6df803473ef1bde2ce5c23
parent: 482e874528c6c86e661a3e4a1b9fda12f2346385
author: henesy <devnull@localhost>
date: Sat Mar 9 11:17:03 EST 2019

Add EMU= option in mkconfig to allow headless builds (thanks aeggy)

--- a/INSTALL
+++ b/INSTALL
@@ -71,7 +71,7 @@
 
 4    Then `mk nuke` to remove any extraneous object files.
 
-5	Then `mk mkdirs` to create all the missing directories.
+5    Then `mk mkdirs` to create all the missing directories.
 
 6    Finally, `mk install` to create and install   the
      libraries,    limbo  compiler,  emu for hosted Inferno,
--- a/emu/FreeBSD/mkfile
+++ b/emu/FreeBSD/mkfile
@@ -1,3 +1,7 @@
+CONF=emu			#default configuration
+CONFLIST=emu
+CLEANCONFLIST=
+
 SYSTARG=FreeBSD
 OBJTYPE=386
 <../../mkconfig
@@ -4,17 +8,9 @@
 SYSTARG=FreeBSD
 OBJTYPE=386
 
-#Configurable parameters
-
-CONF=emu			#default configuration
-CONFLIST=emu
-CLEANCONFLIST=
-
 INSTALLDIR=$ROOT/$SYSTARG/$OBJTYPE/bin	#path of directory where kernel is installed
 
 X11LIBS= -lX11 -lXext
-
-#end configurable parameters
 
 <$ROOT/mkfiles/mkfile-$SYSTARG-$OBJTYPE	#set vars based on target system
 
--- a/emu/Linux/mkfile
+++ b/emu/Linux/mkfile
@@ -1,16 +1,12 @@
-SYSTARG=Linux
-<../../mkconfig
-SYSTARG=Linux
-
-#Configurable parameters
-
 CONF=emu			#default configuration
 CONFLIST=emu
 CLEANCONFLIST=
 
-INSTALLDIR=$ROOT/$SYSTARG/$OBJTYPE/bin	#path of directory where kernel is installed
+SYSTARG=Linux
+<../../mkconfig
+SYSTARG=Linux
 
-#end configurable parameters
+INSTALLDIR=$ROOT/$SYSTARG/$OBJTYPE/bin	#path of directory where kernel is installed
 
 X11LIBS= -lX11 -lXext	# can remove or override using env section in config files
 
--- a/emu/NetBSD/mkfile
+++ b/emu/NetBSD/mkfile
@@ -1,3 +1,7 @@
+CONF=emu			#default configuration
+CONFLIST=emu
+CLEANCONFLIST=
+
 SYSTARG=NetBSD
 OBJTYPE=386
 <../../mkconfig
@@ -4,15 +8,7 @@
 SYSTARG=NetBSD
 OBJTYPE=386
 
-#Configurable parameters
-
-CONF=emu			#default configuration
-CONFLIST=emu
-CLEANCONFLIST=
-
 INSTALLDIR=$ROOT/$SYSTARG/$OBJTYPE/bin	#path of directory where kernel is installed
-
-#end configurable parameters
 
 # can remove or override X11LIBS using env section in config files
 X11LIBS= -L/usr/X11R7/lib -R/usr/X11R7/lib -lXext -lX11
--- a/emu/OpenBSD/mkfile
+++ b/emu/OpenBSD/mkfile
@@ -1,16 +1,12 @@
-<../../mkconfig
-SYSTARG=OpenBSD
-OBJTYPE=386
-
-#Configurable parameters
-
 CONF=emu			#default configuration
 CONFLIST=emu
 CLEANCONFLIST=
 
-INSTALLDIR=$ROOT/$SYSTARG/$OBJTYPE/bin	#path of directory where kernel is installed
+<../../mkconfig
+SYSTARG=OpenBSD
+OBJTYPE=386
 
-#end configurable parameters
+INSTALLDIR=$ROOT/$SYSTARG/$OBJTYPE/bin	#path of directory where kernel is installed
 
 <$ROOT/mkfiles/mkfile-$SYSTARG-$OBJTYPE	#set vars based on target system
 
--- a/mkconfig
+++ b/mkconfig
@@ -11,6 +11,11 @@
 #
 TKSTYLE=std
 
+# emu target, emu-g is a headless variant. Linux/BSD only (emu, emu-g)
+CONF=emu
+
+#	binary will be placed at $SYSTARG/$OBJTYPE/bin/$CONF
+
 #
 #	Except for building kernels, SYSTARG must always be the same as SYSHOST
 #