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 id17498
push userctalbert@mozilla.com
push dateThu, 09 Dec 2010 22:48:12 +0000
treeherdermozilla-central@4182651505fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted, ted
bugs614366
milestone2.0b8pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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