[banshee] [build] ensure an environment is sourced if one exists



commit 0ae1d5b725a60373c28068ee48f9de677f57d615
Author: Aaron Bockover <abockover novell com>
Date:   Thu Jan 21 13:50:43 2010 -0500

    [build] ensure an environment is sourced if one exists

 Makefile.am                       |   18 ++++++++++++++++--
 build/bundle/bockbuild/profile.py |    1 +
 2 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 0561fa8..3299c4e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,10 +43,24 @@ $(MO_FILES): $(LC_BUILD)/%/LC_MESSAGES/$(PACKAGE).mo: po/%.gmo
 	$(mkdir_p) $(dir $@)
 	cp -rf '$<' '$@'
 
-run: $(MO_FILES)
+check-bootstrap-env:
+	@if test -z "$$BOCKBUILD_ENV"; then \
+		for env in $$(find $(top_srcdir) -maxdepth 1 -name \*.env); do \
+			echo "A bootstrap environment was found, but it does not"; \
+			echo "appear to be sourced into your current environment:"; \
+			echo; \
+			echo "    $$env"; \
+			echo; \
+			echo "Source the environment first."; \
+			echo; \
+			exit 1; \
+		done; \
+	fi
+
+run: check-bootstrap-env $(MO_FILES)
 	(cd bin; $(MONO) --debug $(BANSHEE_DEV_MONO_OPTIONS) Nereid.exe --debug --uninstalled $(BANSHEE_DEV_OPTIONS))
 
-run-logged: $(MO_FILES)
+run-logged: check-bootstrap-env $(MO_FILES)
 	(cd bin; $(MONO) --debug $(BANSHEE_DEV_MONO_OPTIONS) Nereid.exe --debug --uninstalled $(BANSHEE_DEV_OPTIONS) | tee last-run-log)
 
 run-perf: run-logged
diff --git a/build/bundle/bockbuild/profile.py b/build/bundle/bockbuild/profile.py
index 9957472..70176e5 100644
--- a/build/bundle/bockbuild/profile.py
+++ b/build/bundle/bockbuild/profile.py
@@ -11,6 +11,7 @@ class Profile:
 		self.prefix = os.path.join (self.build_root, '_install')
 		self.env = Environment (self)
 		self.env.set ('BUILD_PREFIX', self.prefix)
+		self.env.set ('BOCKBUILD_ENV', '1')
 		self.packages = []
 		self.cpu_count = get_cpu_count ()
 		self.host = get_host ()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]