Bug 474703 - mochitest broken when TOPSRCDIR is relative. r=ted
authorDave Camp <dcamp@mozilla.com>
Sun, 22 Feb 2009 11:09:09 -0800
changeset 25374 9f3f8b980b7a2db22664f63866434ff8abc2027a
parent 25373 0f51447d7424ea1c5241bfaf4664fbf610667a6f
child 25375 cd7eadaaccc2ba8d14b41e94ca721e1c0d7e6d8f
push idunknown
push userunknown
push dateunknown
reviewersted
bugs474703
milestone1.9.2a1pre
Bug 474703 - mochitest broken when TOPSRCDIR is relative. r=ted
build/automation-build.mk
--- a/build/automation-build.mk
+++ b/build/automation-build.mk
@@ -17,17 +17,25 @@ else
 browser_path = \"$(TARGET_DIST)/$(MOZ_APP_DISPLAYNAME).app/Contents/MacOS/$(PROGRAM)\"
 endif
 else
 browser_path = \"$(TARGET_DIST)/bin/$(PROGRAM)\"
 endif
 endif
 
 _PROFILE_DIR = $(TARGET_DEPTH)/_profile/pgo
-_CERTS_SRC_DIR = $(topsrcdir)/build/pgo/certs
+
+ifneq (,$(filter /%,$(topsrcdir)))
+# $(topsrcdir) is already an absolute pathname.
+ABSOLUTE_TOPSRCDIR = $(topsrcdir)
+else
+# $(topsrcdir) is a relative pathname: prepend the current directory.
+ABSOLUTE_TOPSRCDIR = $(CURDIR)/$(topsrcdir)
+endif
+_CERTS_SRC_DIR = $(ABSOLUTE_TOPSRCDIR)/build/pgo/certs
 
 AUTOMATION_PPARGS = 	\
 			-DBROWSER_PATH=$(browser_path) \
 			-DXPC_BIN_PATH=\"$(LIBXUL_DIST)/bin\" \
 			-DBIN_SUFFIX=\"$(BIN_SUFFIX)\" \
 			-DPROFILE_DIR=\"$(_PROFILE_DIR)\" \
 			-DCERTS_SRC_DIR=\"$(_CERTS_SRC_DIR)\" \
 			$(NULL)