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

[tor-commits] [torbrowser/maint-2.3] W32: Use pymake instead of gnu make for FF



commit bce5beb1bd94ec73852df04b9d3ee975f3f7a133
Author: Sebastian Hahn <sebastian@xxxxxxxxxxxxxx>
Date:   Thu Feb 9 03:00:30 2012 +0100

    W32: Use pymake instead of gnu make for FF
    
    This dramatically reduces compile time and also allows us to do parallel
    builds, reducing compile time further.
---
 build-scripts/versions.mk                          |   12 ++++++++++++
 build-scripts/windows.mk                           |    5 +++--
 src/current-patches/mozilla-build/start-msvc.patch |    2 +-
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/build-scripts/versions.mk b/build-scripts/versions.mk
index 6024b6c..58d2df7 100644
--- a/build-scripts/versions.mk
+++ b/build-scripts/versions.mk
@@ -16,6 +16,7 @@ TORBUTTON_VER=1.4.5.1
 VIDALIA_VER=0.2.17
 ZLIB_VER=1.2.6
 MOZBUILD_VER=1.5.1
+PYMAKE_VER=87d436cd8974
 
 ## Extension IDs
 FF_VENDOR_ID:=\{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
@@ -31,6 +32,7 @@ TOR_PACKAGE=tor-$(TOR_VER).tar.gz
 PIDGIN_PACKAGE=pidgin-$(PIDGIN_VER).tar.bz2
 FIREFOX_PACKAGE=firefox-$(FIREFOX_VER).source.tar.bz2
 MOZBUILD_PACKAGE=MozillaBuildSetup-$(MOZBUILD_VER).exe
+PYMAKE_PACKAGE=$(PYMAKE_VER).tar.bz2
 TORBUTTON_PACKAGE=torbutton-$(TORBUTTON_VER).xpi
 NOSCRIPT_PACKAGE=addon-722-latest.xpi
 HTTPSEVERYWHERE_PACKAGE=https-everywhere-$(HTTPSEVERYWHERE_VER).xpi
@@ -47,6 +49,7 @@ TOR_URL=http://www.torproject.org/dist/$(TOR_PACKAGE)
 PIDGIN_URL=http://sourceforge.net/projects/pidgin/files/Pidgin/$(PIDGIN_PACKAGE)
 FIREFOX_URL=http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$(FIREFOX_VER)/source/$(FIREFOX_PACKAGE)
 MOZBUILD_URL=https://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/$(MOZBUILD_PACKAGE)
+PYMAKE_URL=https://hg.mozilla.org/users/bsmedberg_mozilla.com/pymake/archive/$(PYMAKE_PACKAGE)
 TORBUTTON_URL=https://www.torproject.org/dist/torbutton/$(TORBUTTON_PACKAGE)
 NOSCRIPT_URL=https://addons.mozilla.org/firefox/downloads/latest/722/$(NOSCRIPT_PACKAGE)
 HTTPSEVERYWHERE_URL=https://eff.org/files/$(HTTPSEVERYWHERE_PACKAGE)
@@ -64,6 +67,7 @@ tor=TOR
 firefox=FIREFOX
 pidgin=PIDGIN
 mozbuild=MOZBUILD
+pymake=PYMAKE
 
 # The locations of the unpacked tarballs
 ZLIB_DIR=$(FETCH_DIR)/zlib-$(ZLIB_VER)
@@ -75,6 +79,7 @@ LIBEVENT_DIR=$(FETCH_DIR)/libevent-$(LIBEVENT_VER)
 TOR_DIR=$(FETCH_DIR)/tor-$(TOR_VER)
 FIREFOX_DIR=$(FETCH_DIR)/firefox-$(FIREFOX_VER)
 MOZBUILD_DIR=$(FETCH_DIR)/mozilla-build
+PYMAKE_DIR=$(FETCH_DIR)/pymake-$(PYMAKE_VER)
 
 
 fetch-source: $(FETCH_DIR)/$(ZLIB_PACKAGE) $(FETCH_DIR)/$(LIBPNG_PACKAGE) $(FETCH_DIR)/$(QT_PACKAGE) $(FETCH_DIR)/$(OPENSSL_PACKAGE) $(FETCH_DIR)/$(VIDALIA_PACKAGE) $(FETCH_DIR)/$(LIBEVENT_PACKAGE) $(FETCH_DIR)/$(TOR_PACKAGE) $(FETCH_DIR)/$(FIREFOX_PACKAGE) | $(FETCH_DIR) ;
@@ -113,6 +118,9 @@ $(FETCH_DIR)/$(FIREFOX_PACKAGE): | $(FETCH_DIR)
 $(FETCH_DIR)/$(MOZBUILD_PACKAGE): | $(FETCH_DIR)
 	$(WGET) --no-check-certificate --directory-prefix=$(FETCH_DIR) $(MOZBUILD_URL)
 
+$(FETCH_DIR)/$(PYMAKE_PACKAGE): | $(FETCH_DIR)
+	$(WGET) --no-check-certificate --directory-prefix=$(FETCH_DIR) $(PYMAKE_URL)
+
 torbutton.xpi:
 	$(WGET) --no-check-certificate -O $@ $(TORBUTTON_URL)
 
@@ -183,6 +191,10 @@ $(MOZBUILD_DIR): $(FETCH_DIR)/$(MOZBUILD_PACKAGE) ../src/current-patches/mozilla
 	cp patch-mozilla-build.sh $(MOZBUILD_DIR)
 	cd $(MOZBUILD_DIR) && ./patch-mozilla-build.sh $(MSVC_VER)
 
+$(PYMAKE_DIR): $(FETCH_DIR)/$(PYMAKE_PACKAGE)
+	rm -rf $(PYMAKE_DIR)
+	cd $(FETCH_DIR) && tar -xmf $(PYMAKE_PACKAGE)
+
 
 clean-fetch-%:
 	rm -rf $(FETCH_DIR)/$($($*)_PACKAGE)
diff --git a/build-scripts/windows.mk b/build-scripts/windows.mk
index ee6daf6..7d13eb3 100644
--- a/build-scripts/windows.mk
+++ b/build-scripts/windows.mk
@@ -47,6 +47,7 @@ PIDGIN=$(FETCH_DIR)/PidginPortable-$(PIDGIN_VER)
 ## Location of utility applications
 PWD:=$(shell pwd)
 PYTHON=$(MOZBUILD_DIR)/python/python.exe
+PYMAKE=$(PYMAKE_DIR)/make.py
 SEVENZIP="/c/Program Files/7-Zip/7z.exe"
 PYGET=$(PYTHON) $(PWD)/pyget.py
 WGET=wget
@@ -113,9 +114,9 @@ build-tor: build-zlib build-openssl build-libevent $(TOR_DIR)
 	cd $(TOR_DIR) && make install
 	touch build-tor
 
-build-firefox: $(FIREFOX_DIR) config/dot_mozconfig $(MOZBUILD_DIR) $(MOZBUILD_DIR)/start-msvc$(MSVC_VER).bat
+build-firefox: $(FIREFOX_DIR) config/dot_mozconfig $(MOZBUILD_DIR) $(MOZBUILD_DIR)/start-msvc$(MSVC_VER).bat | $(PYTHON) $(PYMAKE_DIR)
 	cp config/dot_mozconfig $(FIREFOX_DIR)/mozconfig
-	cd $(MOZBUILD_DIR) && cmd.exe /c "start-msvc$(MSVC_VER).bat $(FIREFOX_DIR)"
+	cd $(MOZBUILD_DIR) && cmd.exe /c "start-msvc$(MSVC_VER).bat $(FIREFOX_DIR) $(PYTHON) $(PYMAKE)"
 	touch build-firefox
 
 copy-firefox:
diff --git a/src/current-patches/mozilla-build/start-msvc.patch b/src/current-patches/mozilla-build/start-msvc.patch
index 6d70b86..fcd3664 100644
--- a/src/current-patches/mozilla-build/start-msvc.patch
+++ b/src/current-patches/mozilla-build/start-msvc.patch
@@ -17,5 +17,5 @@
 +if "%1"=="" (
 +	start /d "%USERPROFILE%" "" "%MOZILLABUILD%"\msys\bin\bash --login -i"
 +) else (
-+	cd "%USERPROFILE%" && "%MOZILLABUILD%"\msys\bin\bash --login -i -c "cd "%1" && make -f client.mk"
++	cd "%USERPROFILE%" && "%MOZILLABUILD%"\msys\bin\bash --login -i -c "cd "%1" && "%2" "%3" -f client.mk"
 +)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits