Bug 614366 Separate binary discovery from automation-build.mk for easier reuse r=ted a=ted
authorJeff Hammel <jhammel@mozilla.com>
Thu, 09 Dec 2010 14:47:21 -0800
changeset 59033 4182651505fb36fcd9b3917dcbd535c08d09b6d7
parent 59032 74a3cd2a9ff546f430f0af5447c34988878e0c57
child 59034 0a9e64523c06816e77a59bcfd7b84c2802472bd3
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersted, ted
bugs614366
milestone2.0b8pre
Bug 614366 Separate binary discovery from automation-build.mk for easier reuse r=ted a=ted
build/automation-build.mk
build/binary-location.mk
--- a/build/automation-build.mk
+++ b/build/automation-build.mk
@@ -1,29 +1,11 @@
-ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
-PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX)
-else
-PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
-endif
-
-TARGET_DIST = $(TARGET_DEPTH)/dist
+include $(topsrcdir)/build/binary-location.mk
 
-ifeq ($(MOZ_BUILD_APP),camino)
-browser_path = \"$(TARGET_DIST)/Camino.app/Contents/MacOS/Camino\"
-else
-ifeq ($(OS_ARCH),Darwin)
-ifdef MOZ_DEBUG
-browser_path = \"$(TARGET_DIST)/$(MOZ_APP_DISPLAYNAME)Debug.app/Contents/MacOS/$(PROGRAM)\"
-else
-browser_path = \"$(TARGET_DIST)/$(MOZ_APP_DISPLAYNAME).app/Contents/MacOS/$(PROGRAM)\"
-endif
-else
-browser_path = \"$(TARGET_DIST)/bin/$(PROGRAM)\"
-endif
-endif
+browser_path := \"$(browser_path)\"
 
 _PROFILE_DIR = $(TARGET_DEPTH)/_profile/pgo
 
 ABSOLUTE_TOPSRCDIR = $(call core_abspath,$(MOZILLA_DIR))
 _CERTS_SRC_DIR = $(ABSOLUTE_TOPSRCDIR)/build/pgo/certs
 
 AUTOMATION_PPARGS = 	\
 			-DBROWSER_PATH=$(browser_path) \
new file mode 100644
--- /dev/null
+++ b/build/binary-location.mk
@@ -0,0 +1,23 @@
+# finds the location of the browser and puts it in the variable $(browser_path)
+
+ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
+PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX)
+else
+PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
+endif
+
+TARGET_DIST = $(TARGET_DEPTH)/dist
+
+ifeq ($(MOZ_BUILD_APP),camino)
+browser_path = $(TARGET_DIST)/Camino.app/Contents/MacOS/Camino
+else
+ifeq ($(OS_ARCH),Darwin)
+ifdef MOZ_DEBUG
+browser_path = $(TARGET_DIST)/$(MOZ_APP_DISPLAYNAME)Debug.app/Contents/MacOS/$(PROGRAM)
+else
+browser_path = $(TARGET_DIST)/$(MOZ_APP_DISPLAYNAME).app/Contents/MacOS/$(PROGRAM)
+endif
+else
+browser_path = $(TARGET_DIST)/bin/$(PROGRAM)
+endif
+endif