Index: /trunk/Makefile
===================================================================
--- /trunk/Makefile	(revision 661)
+++ /trunk/Makefile	(revision 662)
@@ -119,5 +119,5 @@
 all:	
 	mkdir -p $(PATH_OBJ)
-	$(NICE)  $(MAKE) -C . all-logged 2>&1 | $(UNIXROOT)/usr/bin/tee $(PATH_OBJ)/build-`date +"%Y%m%d-%H%M%S"`.log
+	$(NICE) $(MAKE) $(MAKEOPT) -j 1 -C . all-logged 2>&1 | $(UNIXROOT)/usr/bin/tee $(PATH_OBJ)/build-`date +"%Y%m%d-%H%M%S"`.log
 
 all-logged:	\
@@ -232,4 +232,5 @@
 	@echo "    SHELL                = $(SHELL)"
 	@echo "    MAKE                 = $(MAKE)"
+	@echo "    MAKEOPT              = $(MAKEOPT)"
 	@echo "    PATH                 = $(PATH)"
 	@echo "    C_INCLUDE_PATH       = $(C_INCLUDE_PATH)"
@@ -313,5 +314,5 @@
 $(PATH_OBJ)/.ts.versionstamped:	
 	echo '#define INNOTEK_VERSION  "$(INNOTEK_VERSION)"' > include/innotekversion.h
-	$(MAKE) -f $(MAKEFILE) "INNOTEK_VERSION=$(INNOTEK_VERSION)" gcc-versionstamps binutils-versionstamps emx-versionstamps
+	$(MAKE) $(MAKEOPT) -j 1 -f $(MAKEFILE) "INNOTEK_VERSION=$(INNOTEK_VERSION)" gcc-versionstamps binutils-versionstamps emx-versionstamps
 	mkdir -p $(@D)
 	touch $@
@@ -326,5 +327,5 @@
 all-stage1: $(PATH_OBJ)/.all-stage1
 $(PATH_OBJ)/.all-stage1:
-	$(MAKE) -f $(MAKEFILE) all-stage1-it
+	$(MAKE) $(MAKEOPT) -j 1 -f $(MAKEFILE) all-stage1-it
 	echo "$(@F)" > $(PATH_OBJ)/.last-stage
 	touch $@
@@ -344,5 +345,5 @@
 $(PATH_OBJ)/.all-stage2: \
 		$(PATH_OBJ)/.all-stage2.save-stage1
-	$(MAKE) -f $(MAKEFILE) all-stage2-it
+	$(MAKE) $(MAKEOPT) -j 1 -f $(MAKEFILE) all-stage2-it
 	echo "$(@F)" > $(PATH_OBJ)/.last-stage
 	touch $@
@@ -355,6 +356,6 @@
 	@echo "+ Saving Stage 1 - Starting: $(shell date)"
 	@echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
-	$(MAKE) -f $(MAKEFILE) all-preload-unload
-	$(MAKE) -f $(MAKEFILE) all-builttools-stage2
+	$(MAKE) $(MAKEOPT) -j 1 -f $(MAKEFILE) all-preload-unload
+	$(MAKE) $(MAKEOPT) -j 1 -f $(MAKEFILE) all-builttools-stage2
 	rm -Rf $(PATH_OBJ)/stage1
 	mkdir -p $(PATH_OBJ)/stage1
@@ -362,5 +363,5 @@
 	if [ -d $(PATH_OBJ)/emx ] ; then mv $(PATH_OBJ)/emx $(PATH_OBJ)/stage1/emx; fi
 	if [ -d $(PATH_TOP)/src/emx/out ] ; then mv $(PATH_TOP)/src/emx/out $(PATH_OBJ)/stage1/emx_out; fi
-	$(MAKE) -f $(MAKEFILE) all-preload
+	$(MAKE) $(MAKEOPT) -j 1 -f $(MAKEFILE) all-preload
 	touch $@
 	@echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
@@ -652,5 +653,5 @@
 endif
 	for dir in $(GCC_CONFIGURE_DIRS); do \
-		if $(MAKE) $(@:gcc-autoconf-%=%) -f $(PWD)/config.gmk -C src/$$dir ; then \
+		if $(MAKE) $(MAKEOPT) -j 1 $(@:gcc-autoconf-%=%) -f $(PWD)/config.gmk -C src/$$dir ; then \
 			true; \
 		else \
@@ -664,5 +665,5 @@
 gcc-build gcc-install gcc-configure:
 	mkdir -p $(PATH_OBJ)/gcc
-	$(MAKE) -C $(PATH_OBJ)/gcc -f $(MAKEFILE) $@-it
+	$(MAKE) $(MAKEOPT) -j 1 -C $(PATH_OBJ)/gcc -f $(MAKEFILE) $@-it
 
 
@@ -679,5 +680,5 @@
 		$(PATH_OBJ)/gcc/.ts.configured
 ifeq "$(BUILD_PLATFORM)" "OS2"		
-	unset GCCLOAD ; $(MAKE) -C $(PATH_OBJ)/gcc \
+	unset GCCLOAD ; $(MAKE) $(MAKEOPT) -C $(PATH_OBJ)/gcc \
 	    LIBGCC2_DEBUG_CFLAGS="$(BUILD_DEBUGINFO)" \
 		      CFLAGS="$(SPEC_HACK) $(BUILD_DEBUGINFO) -O2" \
@@ -688,5 +689,5 @@
 		bootstrap
 else
-	$(MAKE) -C $(PATH_OBJ)/gcc bootstrap
+	$(MAKE) $(MAKEOPT) -C $(PATH_OBJ)/gcc bootstrap
 endif	
 		
@@ -728,5 +729,5 @@
 #	Repeating the prefix doesn't hurt anybody.
 gcc-install-it:
-	$(MAKE) prefix=$(ALL_PREFIX) install
+	$(MAKE) $(MAKEOPT) prefix=$(ALL_PREFIX) install
 
 
@@ -744,5 +745,5 @@
 ##     WARNING! Another spec HACK!
 gcc-builttools-stage2:
-	$(MAKE) -C $(PATH_OBJ)/gcc prefix=$(PATH_BUILTTOOLS_TMPD) install
+	$(MAKE) $(MAKEOPT) -C $(PATH_OBJ)/gcc prefix=$(PATH_BUILTTOOLS_TMPD) install
 ##	cp $(PATH_TOP)/src/emx/src/lib/libc.specs $(PATH_OBJ)/gcc/gcc/specs
 
@@ -769,5 +770,5 @@
 gccomf:
 	mkdir -p $(PATH_OBJ)/gccomf
-	$(NICE) $(MAKE) -C . gccomf-logged 2>&1 | $(UNIXROOT)/usr/bin/tee $(PATH_OBJ)/gccomf/build-`date +"%Y%m%d-%H%M%S"`.log
+	$(NICE) $(MAKE) $(MAKEOPT) -C . gccomf-logged 2>&1 | $(UNIXROOT)/usr/bin/tee $(PATH_OBJ)/gccomf/build-`date +"%Y%m%d-%H%M%S"`.log
 					
 gccomf-logged: \
@@ -780,5 +781,5 @@
 gccomf-build gccomf-install gccomf-configure:
 	mkdir -p $(PATH_OBJ)/gccomf
-	$(MAKE) -C $(PATH_OBJ)/gccomf -f $(MAKEFILE) $@-it
+	$(MAKE) $(MAKEOPT) -C $(PATH_OBJ)/gccomf -f $(MAKEFILE) $@-it
 
 
@@ -786,5 +787,5 @@
 gccomf-shell:		   	
 	mkdir -p $(PATH_OBJ)/gccomf
-	$(MAKE) -e -C $(PATH_OBJ)/gccomf -f $(MAKEFILE) $@-it
+	$(MAKE) $(MAKEOPT) -e -C $(PATH_OBJ)/gccomf -f $(MAKEFILE) $@-it
 gccomf-shell-it:
 	chdir $(PATH_OBJ)/gccomf ; \
@@ -814,5 +815,5 @@
 ifeq "$(BUILD_PLATFORM)" "OS2"		
 	if test -d $(PATH_BUILTTOOLS)/omfhack; then mv -f $(PATH_BUILTTOOLS)/omfhack $(PATH_BUILTTOOLS)/omfhackbin; fi
-	unset GCCLOAD ; export GCC_OMF="real" ; echo GCC_OMF=$$GCC_OMF; $(MAKE) -C $(PATH_OBJ)/gccomf \
+	unset GCCLOAD ; export GCC_OMF="real" ; echo GCC_OMF=$$GCC_OMF; $(MAKE) $(MAKEOPT) -C $(PATH_OBJ)/gccomf \
 	    LIBGCC2_DEBUG_CFLAGS="-g -Zaout" \
 		      CFLAGS="$(OMFSPEC_HACK) -Zomf -g " \
@@ -824,5 +825,5 @@
 	mv -f $(PATH_BUILTTOOLS)/omfhackbin $(PATH_BUILTTOOLS)/omfhack
 else
-	$(MAKE) -C $(PATH_OBJ)/gcc all
+	$(MAKE) $(MAKEOPT) -C $(PATH_OBJ)/gcc all
 endif	
 
@@ -865,5 +866,5 @@
 #	Repeating the prefix doesn't hurt anybody.
 gccomf-install-it:
-	$(MAKE) prefix=$(ALL_PREFIX) install
+	$(MAKE) $(MAKEOPT) prefix=$(ALL_PREFIX) install
 
 
@@ -915,5 +916,5 @@
 endif
 	for dir in $(BINUTILS_CONFIGURE_DIRS); do \
-		if $(MAKE) $(@:binutils-autoconf-%=%) -f $(PWD)/config.gmk -C src/$$dir ; then \
+		if $(MAKE) $(MAKEOPT) -j 1 $(@:binutils-autoconf-%=%) -f $(PWD)/config.gmk -C src/$$dir ; then \
 			true; \
 		else \
@@ -927,5 +928,5 @@
 binutils-build binutils-install binutils-configure:
 	mkdir -p $(PATH_OBJ)/binutils
-	$(MAKE) -C $(PATH_OBJ)/binutils -f $(MAKEFILE) $@-it
+	$(MAKE) $(MAKEOPT) -C $(PATH_OBJ)/binutils -f $(MAKEFILE) $@-it
 
 
@@ -933,5 +934,5 @@
 binutils-build-it: \
 		$(PATH_OBJ)/binutils/.ts.configured
-	$(ASH) -c " unset GCCLOAD ; $(MAKE) -C $(PATH_OBJ)/binutils "
+	$(ASH) -c " unset GCCLOAD ; $(MAKE) $(MAKEOPT) -C $(PATH_OBJ)/binutils "
 		
 # configure it (invoked after directory change).
@@ -978,5 +979,5 @@
 #	Repeating the prefix doesn't hurt anybody.
 binutils-install-it:
-	$(MAKE) prefix=$(ALL_PREFIX) install
+	$(MAKE) $(MAKEOPT) prefix=$(ALL_PREFIX) install
 
 
@@ -1068,5 +1069,5 @@
 emx-build emx-install emx-configure:
 	mkdir -p $(PATH_OBJ)/emx
-	$(MAKE) -C $(PATH_TOP)/src/emx -f $(MAKEFILE) $@-it
+	$(MAKE) $(MAKEOPT) -C $(PATH_TOP)/src/emx -f $(MAKEFILE) $@-it
 
 # This is the configure equivalent.	
@@ -1074,21 +1075,21 @@
 $(EMX_RULES):
 	rm -f $(EMX_RULES)
-	$(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) $(EMX_RULES)
+	$(MAKE) $(MAKEOPT) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) $(EMX_RULES)
 	
 # make handle issue here. Make portions at the time.
 emx-build-it: $(EMX_RULES)
-	$(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) tools
-	$(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) os2
-	$(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) libc
-	$(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) app
-	$(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) alias
-	$(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) regexp
-	$(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) libc-dll
-	$(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) libsocket libdl
-	$(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) libs
-	$(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) all
+	$(MAKE) $(MAKEOPT) -j 1 -C $(PATH_TOP)/src/emx $(EMX_DEFINES) tools
+	$(MAKE) $(MAKEOPT) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) os2
+	$(MAKE) $(MAKEOPT) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) libc
+	$(MAKE) $(MAKEOPT) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) app
+	$(MAKE) $(MAKEOPT) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) alias
+	$(MAKE) $(MAKEOPT) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) regexp
+	$(MAKE) $(MAKEOPT) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) libc-dll
+	$(MAKE) $(MAKEOPT) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) libsocket libdl
+	$(MAKE) $(MAKEOPT) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) libs
+	$(MAKE) $(MAKEOPT) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) all
 
 emx-install-it: $(EMX_RULES)
-	$(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) INS=$(ALL_PREFIX)/ install
+	$(MAKE) $(MAKEOPT) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) INS=$(ALL_PREFIX)/ install
 
 					
@@ -1100,5 +1101,5 @@
 ##emx-builttools-stage2: emx-builttools-stage2-specs
 emx-builttools-stage2:
-	$(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) INS=$(PATH_BUILTTOOLS_TMP)/  install
+	$(MAKE) $(MAKEOPT) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) INS=$(PATH_BUILTTOOLS_TMP)/  install
 
 ## bird: for now we will just replace the specs with the constantly updated libc specs.	
@@ -1222,5 +1223,5 @@
 endif
 	for dir in $(DEJAGNU_CONFIGURE_DIRS); do \
-		if $(MAKE) $(@:dejagnu-autoconf-%=%) -f $(PWD)/config.gmk -C $$dir ; then \
+		if $(MAKE) $(MAKEOPT) -j 1 $(@:dejagnu-autoconf-%=%) -f $(PWD)/config.gmk -C $$dir ; then \
 			true; \
 		else \
@@ -1242,5 +1243,5 @@
 expect-build expect-install expect-configure:
 	mkdir -p $(PATH_OBJ)/misc/expect
-	$(MAKE) -C $(PATH_OBJ)/misc/expect -f $(MAKEFILE) $@-it
+	$(MAKE) $(MAKEOPT) -C $(PATH_OBJ)/misc/expect -f $(MAKEFILE) $@-it
 
 
@@ -1248,5 +1249,5 @@
 expect-build-it: \
 		$(PATH_OBJ)/misc/expect/.ts.configured
-	$(MAKE) -C $(PATH_OBJ)/misc/expect
+	$(MAKE) $(MAKEOPT) -C $(PATH_OBJ)/misc/expect
 		
 # configure it (invoked after directory change).
@@ -1277,5 +1278,5 @@
 # install to builttools	(if anywhere!)
 expect-install-it:
-	$(MAKE) prefix=$(PATH_BUILTTOOLSD) install
+	$(MAKE) $(MAKEOPT) prefix=$(PATH_BUILTTOOLSD) install
 	
 
@@ -1292,5 +1293,5 @@
 endif
 	for dir in $(EXPECT_CONFIGURE_DIRS); do \
-		if $(MAKE) $(@:expect-autoconf-%=%) -f $(PWD)/config.gmk -C $$dir ; then \
+		if $(MAKE) $(MAKEOPT) -j 1 $(@:expect-autoconf-%=%) -f $(PWD)/config.gmk -C $$dir ; then \
 			true; \
 		else \
