From 96dbee189c7b5094382628c25f10e25a0c9ca379 Mon Sep 17 00:00:00 2001
From: Martin Stjernholm <mast@lysator.liu.se>
Date: Tue, 12 Oct 2010 11:48:53 +0200
Subject: [PATCH] Fixes to actually use build/source for source builds.

---
 Makefile | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index 153f97857a..6b79e308ac 100644
--- a/Makefile
+++ b/Makefile
@@ -280,8 +280,9 @@ gdb_hilfe:
 	@$(DO_MAKE) "METATARGET=gdb_hilfe" _make_in_builddir
 
 source:
-	@$(DO_MAKE) "CONFIGUREARGS=--disable-binary $(CONFIGUREARGS)" \
-	  "OS=source" "LIMITED_TARGETS=yes" "METATARGET=source" _make_in_builddir
+	@PIKE_BUILD_OS=source $(DO_MAKE) \
+	  "CONFIGUREARGS=--disable-binary $(CONFIGUREARGS)" \
+	  "LIMITED_TARGETS=yes" "METATARGET=source" _make_in_builddir
 
 export:
 	@EXPORT_PREREQ=yepp ; echo ; \
@@ -307,16 +308,19 @@ export:
 	  echo ; \
 	  exit 1; \
 	fi
-	@$(DO_MAKE) "CONFIGUREARGS=--disable-binary $(CONFIGUREARGS)" \
-	  "OS=source" "LIMITED_TARGETS=yes" "METATARGET=export" _make_in_builddir
+	@PIKE_BUILD_OS=source $(DO_MAKE) \
+	  "CONFIGUREARGS=--disable-binary $(CONFIGUREARGS)" \
+	  "LIMITED_TARGETS=yes" "METATARGET=export" _make_in_builddir
 
 export_forced:
-	@$(DO_MAKE) "CONFIGUREARGS=--disable-binary $(CONFIGUREARGS)" \
-	  "OS=source" "LIMITED_TARGETS=yes" "METATARGET=export" _make_in_builddir
+	@PIKE_BUILD_OS=source $(DO_MAKE) \
+	  "CONFIGUREARGS=--disable-binary $(CONFIGUREARGS)" \
+	  "LIMITED_TARGETS=yes" "METATARGET=export" _make_in_builddir
 
 snapshot_export:
-	@$(DO_MAKE) "CONFIGUREARGS=--disable-binary $(CONFIGUREARGS)" \
-	  "OS=source" "LIMITED_TARGETS=yes" "METATARGET=snapshot_export" \
+	@PIKE_BUILD_OS=source $(DO_MAKE) \
+	  "CONFIGUREARGS=--disable-binary $(CONFIGUREARGS)" \
+	  "LIMITED_TARGETS=yes" "METATARGET=snapshot_export" \
 	  "EXPORT_NAME=Pike-v%maj.%min-snapshot-%Y%M%D" _make_in_builddir
 
 snapshot: snapshot_export
@@ -331,8 +335,9 @@ xenofarm_export:
 	    cp -f "$$f" bundles/; \
 	  fi; \
 	done >>export_result.txt
-	@$(DO_MAKE) "CONFIGUREARGS=--disable-binary $(CONFIGUREARGS)" \
-	  "OS=source" "LIMITED_TARGETS=yes" "METATARGET=snapshot_export" \
+	@PIKE_BUILD_OS=source $(DO_MAKE) \
+	  "CONFIGUREARGS=--disable-binary $(CONFIGUREARGS)" \
+	  "LIMITED_TARGETS=yes" "METATARGET=snapshot_export" \
 	  "EXPORT_NAME=Pike%maj.%min-%Y%M%D-%h%m%s" \
 	  "EXPORTARGS=--snapshot $(EXPORTARGS)" \
 	  _make_in_builddir >>export_result.txt 2>&1
@@ -396,7 +401,7 @@ delete_builddir:
 
 distclean:
 	@$(DO_MAKE) delete_builddir
-	$(DO_MAKE) "OS=source" delete_builddir
+	@PIKE_BUILD_OS=source $(DO_MAKE) delete_builddir
 	-rm -f bin/pike
 
 srcclean:
-- 
GitLab