Bug 780159 - Remove obsolete REGCHROME. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 04 Aug 2012 08:55:00 +0200
changeset 101422 a8c1c8501141ea8e36d2f0e9de0c9507231c1691
parent 101421 040c3b5a99d09e1017d221fe3dfb24dfa92f3ec0
child 101423 c9564834bfe1183d537b445b86b25e348043b02a
push id23232
push useremorley@mozilla.com
push dateSat, 04 Aug 2012 18:12:50 +0000
treeherdermozilla-central@0a17cde2a4b6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs780159
milestone17.0a1
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 780159 - Remove obsolete REGCHROME. r=ted
config/add-chrome.pl
config/rules.mk
js/src/config/rules.mk
deleted file mode 100644
--- a/config/add-chrome.pl
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/perl
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-
-use File::Path;
-use Getopt::Std;
-use IO::File;
-use mozLock;
-
-getopts("lxo:");
-
-my $installedChromeFile = $ARGV[0];
-my $disableJarPackaging = $ARGV[1];
-my $chromeType = $ARGV[2];
-my $pkgName = $ARGV[3];
-my $jarFileName = $ARGV[4];
-
-my $win32 = ($^O =~ /((MS)?win32)|msys|cygwin|os2/i) ? 1 : 0;
-my $macos = ($^O =~ /MacOS|darwin/i) ? 1 : 0;
-my $unix  = !($win32 || $macos) ? 1 : 0;
-
-sub foreignPlatformFile
-{
-   my ($jarfile) = @_;
-   
-   if (!$win32 && index($jarfile, "-win") != -1) {
-     return 1;
-   }
-   
-   if (!$unix && index($jarfile, "-unix") != -1) {
-     return 1; 
-   }
-
-   if (!$macos && index($jarfile, "-mac") != -1) {
-     return 1;
-   }
-
-   return 0;
-}
-
-sub foreignPlatformPath
-{
-   my ($jarpath) = @_;
-   
-   if (!$win32 && index($jarpath, "-platform/win") != -1) {
-     return 1;
-   }
-   
-   if (!$unix && index($jarpath, "-platform/unix") != -1) {
-     return 1; 
-   }
-
-   if (!$macos && index($jarpath, "-platform/mac") != -1) {
-     return 1;
-   }
-
-   return 0;
-}
-
-#print "add-chrome $installedChromeFile $disableJarPackaging $chromeType $pkgName $jarFileName\n";
-
-my $nofilelocks = 0;
-if (defined($::opt_l)) {
-    $nofilelocks = 1;
-}
-
-if (defined($::opt_x)) {
-    $win32 = 0;
-    $macos = 0;
-    $unix = 1;
-}
-
-my $force_os;
-if (defined($::opt_o)) {
-    $force_os = $::opt_o;
-}
-
-if (defined($force_os)) {
-    $win32 = 0;
-    $macos = 0;
-    $unix = 0;
-    if ($force_os eq "WINNT") {
-	$win32 = 1;
-    } elsif ($force_os eq "OS2") {
-	$win32 = 1;
-    } elsif ($force_os eq "Darwin") {
-	$macos = 1;
-    } else {
-	$unix = 1;
-    }
-}
-
-if ($jarFileName =~ /(.*)\.jar/) {
-    $jarFileName = $1;
-}
-
-if (!foreignPlatformFile($jarFileName) && !foreignPlatformPath($pkgName)) {
-
-my $line;
-if ($disableJarPackaging) {
-    $line = "$chromeType,install,url,resource:/chrome/$jarFileName/$chromeType/$pkgName/";
-}
-else {
-    $line = "$chromeType,install,url,jar:resource:/chrome/$jarFileName.jar!/$chromeType/$pkgName/";
-}
-
-my $lockfile = "$installedChromeFile.lck";
-my $err;
-
-mozLock($lockfile) if (!$nofilelocks);
-$err = 0;
-if (open(FILE, "<$installedChromeFile")) {
-    while (<FILE>) {
-        chomp;
-        if ($_ eq $line) {
-            # line already appears in installed-chrome.txt file
-            # just update the mod date
-            close(FILE) or $err = 1; 
-	    if ($err) {
-		mozUnlock($lockfile) if (!$nofilelocks);
-		die "error: can't close $installedChromeFile: $!";
-	    }
-            my $now = time;
-            utime($now, $now, $installedChromeFile) or $err = 1;
-	    mozUnlock($lockfile) if (!$nofilelocks);
-	    if ($err) {
-		die "couldn't touch $installedChromeFile";
-	    }
-            print "+++ updating chrome $installedChromeFile\n+++\t$line\n";
-            exit;
-        }
-    }
-    close(FILE) or $err = 1;
-    if ($err) {
-	mozUnlock($lockfile) if (!$nofilelocks);
-	die "error: can't close $installedChromeFile: $!";
-    }
-}
-mozUnlock($lockfile) if (!$nofilelocks);
-
-my $dir = $installedChromeFile;
-if ("$dir" =~ /([\w\d.\-\\\/]+)[\\\/]([\w\d.\-]+)/) {
-    $dir = $1;
-}
-mkpath($dir, 0, 0755);
-
-mozLock($lockfile) if (!$nofilelocks);
-$err = 0;
-open(FILE, ">>$installedChromeFile") or $err = 1;
-if ($err) {
-    mozUnlock($lockfile) if (!$nofilelocks);
-    die "can't open $installedChromeFile: $!";
-}
-print FILE "$line\n";
-close(FILE) or $err = 1;
-mozUnlock($lockfile) if (!$nofilelocks);
-if ($err) {
-    die "error: can't close $installedChromeFile: $!";
-}
-print "+++ adding chrome $installedChromeFile\n+++\t$line\n";
-}
-
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -1544,33 +1544,16 @@ endif
 
 libs::
 	$(RM) -r "$(DIST)/bin/extensions/$(INSTALL_EXTENSION_ID)"
 	$(NSINSTALL) -D "$(DIST)/bin/extensions/$(INSTALL_EXTENSION_ID)"
 	cd $(FINAL_TARGET) && tar $(TAR_CREATE_FLAGS) - . | (cd "../../bin/extensions/$(INSTALL_EXTENSION_ID)" && tar -xf -)
 
 endif
 
-ifneq (,$(filter flat symlink,$(MOZ_CHROME_FILE_FORMAT)))
-_JAR_REGCHROME_DISABLE_JAR=1
-else
-_JAR_REGCHROME_DISABLE_JAR=0
-endif
-
-REGCHROME = $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/add-chrome.pl \
-	$(if $(filter gtk2,$(MOZ_WIDGET_TOOLKIT)),-x) \
-	$(if $(CROSS_COMPILE),-o $(OS_ARCH)) $(FINAL_TARGET)/chrome/installed-chrome.txt \
-	$(_JAR_REGCHROME_DISABLE_JAR)
-
-REGCHROME_INSTALL = $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/add-chrome.pl \
-	$(if $(filter gtk2,$(MOZ_WIDGET_TOOLKIT)),-x) \
-	$(if $(CROSS_COMPILE),-o $(OS_ARCH)) $(DESTDIR)$(mozappdir)/chrome/installed-chrome.txt \
-	$(_JAR_REGCHROME_DISABLE_JAR)
-
-
 #############################################################################
 # Dependency system
 #############################################################################
 ifdef COMPILER_DEPEND
 depend::
 	@echo "$(MAKE): No need to run depend target.\
 			Using compiler-based depend." 1>&2
 ifeq ($(GNU_CC)$(GNU_CXX),)
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -1544,33 +1544,16 @@ endif
 
 libs::
 	$(RM) -r "$(DIST)/bin/extensions/$(INSTALL_EXTENSION_ID)"
 	$(NSINSTALL) -D "$(DIST)/bin/extensions/$(INSTALL_EXTENSION_ID)"
 	cd $(FINAL_TARGET) && tar $(TAR_CREATE_FLAGS) - . | (cd "../../bin/extensions/$(INSTALL_EXTENSION_ID)" && tar -xf -)
 
 endif
 
-ifneq (,$(filter flat symlink,$(MOZ_CHROME_FILE_FORMAT)))
-_JAR_REGCHROME_DISABLE_JAR=1
-else
-_JAR_REGCHROME_DISABLE_JAR=0
-endif
-
-REGCHROME = $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/add-chrome.pl \
-	$(if $(filter gtk2,$(MOZ_WIDGET_TOOLKIT)),-x) \
-	$(if $(CROSS_COMPILE),-o $(OS_ARCH)) $(FINAL_TARGET)/chrome/installed-chrome.txt \
-	$(_JAR_REGCHROME_DISABLE_JAR)
-
-REGCHROME_INSTALL = $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/add-chrome.pl \
-	$(if $(filter gtk2,$(MOZ_WIDGET_TOOLKIT)),-x) \
-	$(if $(CROSS_COMPILE),-o $(OS_ARCH)) $(DESTDIR)$(mozappdir)/chrome/installed-chrome.txt \
-	$(_JAR_REGCHROME_DISABLE_JAR)
-
-
 #############################################################################
 # Dependency system
 #############################################################################
 ifdef COMPILER_DEPEND
 depend::
 	@echo "$(MAKE): No need to run depend target.\
 			Using compiler-based depend." 1>&2
 ifeq ($(GNU_CC)$(GNU_CXX),)