25815941 Userland builds should set up their own $HOME
authorJohn Beck <John.Beck@Oracle.COM>
Tue, 04 Apr 2017 13:18:05 -0700
changeset 7834 4c899d201870
parent 7833 6897c8ca8807
child 7835 20c33a4fd225
25815941 Userland builds should set up their own $HOME
components/Makefile
make-rules/shared-macros.mk
--- a/components/Makefile	Wed Apr 05 13:44:03 2017 -0700
+++ b/components/Makefile	Tue Apr 04 13:18:05 2017 -0700
@@ -116,13 +116,13 @@
 
 clobber:	$(COMPONENT_DIRS.nosetup) clean
 	@cd ../tools ; echo "clobbering tools..." ; $(GMAKE) clobber
-	$(RM) -r $(WS_REPO) $(WS_LOGS) $(WS_LINT_CACHE) \
+	$(RM) -r $(WS_REPO) $(WS_HOME) $(WS_LOGS) $(WS_LINT_CACHE) \
 	    $(shell find . -name 'manifest-*.published')
 
 
-setup:	$(WS_MACH) $(WS_LOGS) $(WS_REPO) tools $(WS_LINT_CACHE)
+setup:	$(WS_MACH) $(WS_LOGS) $(WS_HOME) $(WS_REPO) tools $(WS_LINT_CACHE)
 
-$(WS_MACH) $(WS_LOGS):
+$(WS_MACH) $(WS_LOGS) $(WS_HOME):
 	$(MKDIR) $@
 
 $(WS_REPO):
--- a/make-rules/shared-macros.mk	Wed Apr 05 13:44:03 2017 -0700
+++ b/make-rules/shared-macros.mk	Tue Apr 04 13:18:05 2017 -0700
@@ -52,6 +52,7 @@
 
 WS_MACH =	$(WS_TOP)/$(MACH)
 WS_LOGS =	$(WS_MACH)/logs
+WS_HOME =	$(WS_MACH)/home
 WS_REPO =	$(WS_MACH)/repo
 WS_TOOLS =	$(WS_TOP)/tools
 WS_MAKE_RULES =	$(WS_TOP)/make-rules
@@ -79,6 +80,10 @@
 # so lets stay there
 export LC_ALL=C
 
+# Some things look for files under $HOME, such as git looking for ~/.gitconfig
+# which can have unexpected results.  Use our minimal $HOME instead.
+export HOME=$(WS_HOME)
+
 SHELL=	/bin/bash
 
 # We want "nightly" as our publisher, to match other consolidations and