Bug 451466 - wget target to get en-US binary, r=ted
authorArmen Zambrano Gasparnian <armenzg@mozilla.com>
Wed, 27 Aug 2008 11:02:33 -0400
changeset 18450 25b909ce268c5d914302ff112a13a2aca893cc9a
parent 18449 6437cdc9973e4517f42cc0c38a5af1165a816e83
child 18451 b4c2e3d7f6ed4cfaca91118eeffdea036afcb04d
push idunknown
push userunknown
push dateunknown
reviewersted
bugs451466
milestone1.9.1a2pre
Bug 451466 - wget target to get en-US binary, r=ted
browser/locales/Makefile.in
config/autoconf.mk.in
configure.in
--- a/browser/locales/Makefile.in
+++ b/browser/locales/Makefile.in
@@ -314,8 +314,28 @@ else
 	  sed -e "s/%AB_CD%/$(AB_CD)/" > $(FINAL_TARGET)/updater.ini
 endif
 endif
 
 ifdef MOZ_CRASHREPORTER
 libs:: $(addprefix $(LOCALE_SRCDIR)/,crashreporter/crashreporter-override.ini)
 	$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
 endif
+
+# This variable is to allow the wget-en-US target to know which ftp server to download from
+ifndef EN_US_BINARY_URL 
+EN_US_BINARY_URL = $(error You must set EN_US_BINARY_URL)
+endif
+
+# This make target allows us to wget the latest en-US binary from a specified website
+# The make installers-% target needs the en-US binary in dist/
+# and for the windows repackages we need the .installer.exe in dist/sea
+wget-en-US:
+ifndef WGET
+	$(error Wget not installed)
+endif
+	@$(WGET) -nv --output-document $(_ABS_DIST)/$(PACKAGE) $(EN_US_BINARY_URL)/$(PACKAGE)
+	@echo "Downloaded $(EN_US_BINARY_URL)/$(PACKAGE) to $(_ABS_DIST)/$(PACKAGE)"
+ifeq ($(OS_ARCH), WINNT)
+	$(NSINSTALL) -D $(_ABS_DIST)/install/sea
+	@$(WGET) -nv --output-document $(_ABS_DIST)/install/sea/$(PKG_BASENAME).installer.exe $(EN_US_BINARY_URL)/$(PKG_BASENAME).installer.exe
+	@echo "Downloaded $(EN_US_BINARY_URL)/$(PKG_BASENAME).installer.exe to $(_ABS_DIST)/install/sea/$(PKG_BASENAME)"
+endif
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -390,16 +390,17 @@ UNZIP		= @UNZIP@
 ZIP		= @ZIP@
 XARGS		= @XARGS@
 STRIP		= @STRIP@
 DOXYGEN		= @DOXYGEN@
 MAKE		= @MAKE@
 PBBUILD_BIN	= @PBBUILD@
 SDP		= @SDP@
 NSINSTALL_BIN	= @NSINSTALL_BIN@
+WGET		= @WGET@
 
 ifdef MOZ_NATIVE_JPEG
 JPEG_CFLAGS	= @JPEG_CFLAGS@
 JPEG_LIBS	= @JPEG_LIBS@
 JPEG_REQUIRES	=
 else
 JPEG_CFLAGS	= @MOZ_JPEG_CFLAGS@
 JPEG_LIBS	= @MOZ_JPEG_LIBS@
--- a/configure.in
+++ b/configure.in
@@ -5774,16 +5774,21 @@ AC_SUBST(MOZ_INSTALLER)
 AC_MSG_CHECKING([for tar archiver])
 AC_CHECK_PROGS(TAR, gnutar gtar tar, "")
 if test -z "$TAR"; then
     AC_MSG_ERROR([no tar archiver found in \$PATH])
 fi
 AC_MSG_RESULT([$TAR])
 AC_SUBST(TAR)
 
+AC_MSG_CHECKING([for wget])
+AC_CHECK_PROGS(WGET, wget, "")
+AC_MSG_RESULT([$WGET])
+AC_SUBST(WGET)
+
 dnl ========================================================
 dnl Updater
 dnl ========================================================
 
 MOZ_ARG_DISABLE_BOOL(updater,
 [  --disable-updater       Disable building of updater],
     MOZ_UPDATER=,
     MOZ_UPDATER=1 )