mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
Only build chrome jar files by default. Use either --enable-chrome-format (autoconf) or MOZ_CHROME_FILE_FORMAT (win32) to override.
Bug #72390 r=jag
This commit is contained in:
parent
1ad4817ab0
commit
6fdb98cd6c
@ -29,6 +29,7 @@ BUILD_MODULES = @BUILD_MODULES@
|
||||
DIST = $(DEPTH)/dist
|
||||
|
||||
MOZ_DISABLE_JAR_PACKAGING = @MOZ_DISABLE_JAR_PACKAGING@
|
||||
MOZ_CHROME_FILE_FORMAT = @MOZ_CHROME_FILE_FORMAT@
|
||||
MOZ_TRACK_MODULE_DEPS = @MOZ_TRACK_MODULE_DEPS@
|
||||
|
||||
MOZ_WIDGET_TOOLKIT = @MOZ_WIDGET_TOOLKIT@
|
||||
|
@ -16,7 +16,7 @@ use IO::File;
|
||||
|
||||
my $objdir = getcwd;
|
||||
|
||||
getopts("d:s:vfl");
|
||||
getopts("d:s:f:vl");
|
||||
|
||||
my $baseFilesDir = ".";
|
||||
if (defined($::opt_s)) {
|
||||
@ -33,9 +33,21 @@ if (defined($::opt_v)) {
|
||||
$verbose = 1;
|
||||
}
|
||||
|
||||
my $flatfilesonly = 0;
|
||||
my $fileformat = "jar";
|
||||
if (defined($::opt_f)) {
|
||||
$flatfilesonly = 1;
|
||||
($fileformat = $::opt_f) =~ tr/A-Z/a-z/;
|
||||
}
|
||||
|
||||
if ("$fileformat" ne "jar" &&
|
||||
"$fileformat" ne "flat" &&
|
||||
"$fileformat" ne "both") {
|
||||
print "File format specified by -f option must be one of: jar, flat, or both.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
my $zipmoveopt = "";
|
||||
if ("$fileformat" eq "jar") {
|
||||
$zipmoveopt = "-m";
|
||||
}
|
||||
|
||||
my $nofilelocks = 0;
|
||||
@ -46,7 +58,7 @@ if (defined($::opt_l)) {
|
||||
if ($verbose) {
|
||||
print "make-jars "
|
||||
. "-v -d $chromeDir "
|
||||
. ($flatfilesonly ? "-f " : "")
|
||||
. ($fileformat ? "-f $fileformat" : "")
|
||||
. ($nofilelocks ? "-l " : "")
|
||||
. ($baseFilesDir ? "-s $baseFilesDir " : "")
|
||||
. "\n";
|
||||
@ -66,13 +78,15 @@ sub zipErrorCheck($$$)
|
||||
sub JarIt
|
||||
{
|
||||
my ($destPath, $jarfile, $args, $overrides) = @_;
|
||||
my $oldDir = cwd();
|
||||
chdir("$destPath/$jarfile");
|
||||
|
||||
if ($flatfilesonly) {
|
||||
if ("$fileformat" eq "flat") {
|
||||
unlink("../$jarfile.jar") if ( -e "../$jarfile.jar");
|
||||
chdir($oldDir);
|
||||
return 0;
|
||||
}
|
||||
|
||||
my $oldDir = cwd();
|
||||
chdir("$destPath/$jarfile");
|
||||
#print "cd $destPath/$jarfile\n";
|
||||
|
||||
my $lockfile = "../$jarfile.lck";
|
||||
@ -87,7 +101,7 @@ sub JarIt
|
||||
my $cwd = getcwd;
|
||||
my $err = 0;
|
||||
|
||||
#print "zip -u ../$jarfile.jar $args\n";
|
||||
#print "zip $zipmoveopt -u ../$jarfile.jar $args\n";
|
||||
|
||||
# Handle posix cmdline limits (4096)
|
||||
while (length($args) > 4000) {
|
||||
@ -97,15 +111,15 @@ sub JarIt
|
||||
$subargs = substr($args, 0, $pos);
|
||||
$args = substr($args, $pos);
|
||||
|
||||
#print "zip -u ../$jarfile.jar $subargs\n";
|
||||
#print "zip $zipmoveopt -u ../$jarfile.jar $subargs\n";
|
||||
#print "Length of subargs: " . length($subargs) . "\n";
|
||||
system("zip -u ../$jarfile.jar $subargs") == 0 or
|
||||
system("zip $zipmoveopt -u ../$jarfile.jar $subargs") == 0 or
|
||||
$err = $? >> 8;
|
||||
zipErrorCheck($err,$lockfile,$lockhandle);
|
||||
}
|
||||
#print "Length of args: " . length($args) . "\n";
|
||||
#print "zip -u ../$jarfile.jar $args\n";
|
||||
system("zip -u ../$jarfile.jar $args") == 0 or
|
||||
#print "zip $zipmoveopt -u ../$jarfile.jar $args\n";
|
||||
system("zip $zipmoveopt -u ../$jarfile.jar $args") == 0 or
|
||||
$err = $? >> 8;
|
||||
zipErrorCheck($err,$lockfile,$lockhandle);
|
||||
}
|
||||
@ -121,14 +135,14 @@ sub JarIt
|
||||
$subargs = substr($args, 0, $pos);
|
||||
$args = substr($args, $pos);
|
||||
|
||||
#print "zip ../$jarfile.jar $subargs\n";
|
||||
#print "zip $zipmoveopt ../$jarfile.jar $subargs\n";
|
||||
#print "Length of subargs: " . length($subargs) . "\n";
|
||||
system("zip ../$jarfile.jar $subargs") == 0 or
|
||||
system("zip $zipmoveopt ../$jarfile.jar $subargs") == 0 or
|
||||
$err = $? >> 8;
|
||||
zipErrorCheck($err,$lockfile,$lockhandle);
|
||||
}
|
||||
#print "zip ../$jarfile.jar $overrides\n";
|
||||
system("zip ../$jarfile.jar $overrides\n") == 0 or
|
||||
#print "zip $zipmoveopt ../$jarfile.jar $overrides\n";
|
||||
system("zip $zipmoveopt ../$jarfile.jar $overrides\n") == 0 or
|
||||
$err = $? >> 8;
|
||||
zipErrorCheck($err,$lockfile,$lockhandle);
|
||||
}
|
||||
|
@ -591,12 +591,25 @@ chrome::
|
||||
|
||||
install:: chrome
|
||||
|
||||
!ifdef MOZ_DISABLE_JAR_PACKAGING
|
||||
_JAR_FLAT_FILES_ONLY=-f
|
||||
_JAR_REGCHROME_JAR=1
|
||||
!ifdef MOZ_CHROME_FILE_FORMAT
|
||||
_CHROME_FILE_FORMAT=$(MOZ_CHROME_FILE_FORMAT)
|
||||
|
||||
!if "$(_CHROME_FILE_FORMAT)" == "flat"
|
||||
_JAR_REGCHROME_DISABLE_JAR=1
|
||||
!else
|
||||
_JAR_FLAT_FILES_ONLY=
|
||||
_JAR_REGCHROME_JAR=0
|
||||
_JAR_REGCHROME_DISABLE_JAR=0
|
||||
!endif
|
||||
|
||||
!else
|
||||
|
||||
!ifdef MOZ_DISABLE_JAR_PACKAGING
|
||||
_CHROME_FILE_FORMAT=flat
|
||||
_JAR_REGCHROME_DISABLE_JAR=1
|
||||
!else
|
||||
_CHROME_FILE_FORMAT=jar
|
||||
_JAR_REGCHROME_DISABLE_JAR=0
|
||||
!endif
|
||||
|
||||
!endif
|
||||
|
||||
!if "$(OS_TARGET)" == "WIN95"
|
||||
@ -605,14 +618,14 @@ _NO_FLOCK=-l
|
||||
_NO_FLOCK=
|
||||
!endif
|
||||
|
||||
REGCHROME = @perl $(DEPTH)\config\add-chrome.pl $(_NO_FLOCK) $(DIST)\bin\chrome\installed-chrome.txt $(_JAR_REGCHROME_JAR)
|
||||
REGCHROME = @perl $(DEPTH)\config\add-chrome.pl $(_NO_FLOCK) $(DIST)\bin\chrome\installed-chrome.txt $(_JAR_REGCHROME_DISABLE_JAR)
|
||||
|
||||
!ifndef MOZ_OLD_JAR_PACKAGING
|
||||
|
||||
!if exist($(JAR_MANIFEST))
|
||||
|
||||
chrome:: $(CHROME_DEPS)
|
||||
$(PERL) $(DEPTH)\config\make-jars.pl $(_JAR_FLAT_FILES_ONLY) $(_NO_FLOCK) -d $(DIST)\bin\chrome < $(JAR_MANIFEST)
|
||||
$(PERL) $(DEPTH)\config\make-jars.pl -f $(_CHROME_FILE_FORMAT) $(_NO_FLOCK) -d $(DIST)\bin\chrome < $(JAR_MANIFEST)
|
||||
!endif
|
||||
|
||||
regchrome:
|
||||
|
@ -1179,20 +1179,18 @@ endif
|
||||
|
||||
JAR_MANIFEST := $(srcdir)/jar.mn
|
||||
|
||||
ifdef MOZ_DISABLE_JAR_PACKAGING
|
||||
_JAR_FLAT_FILES_ONLY=-f
|
||||
_JAR_REGCHROME_JAR=1
|
||||
ifeq (flat,$(MOZ_CHROME_FILE_FORMAT))
|
||||
_JAR_REGCHROME_DISABLE_JAR=1
|
||||
else
|
||||
_JAR_FLAT_FILES_ONLY=
|
||||
_JAR_REGCHROME_JAR=0
|
||||
_JAR_REGCHROME_DISABLE_JAR=0
|
||||
endif
|
||||
|
||||
chrome:: $(CHROME_DEPS)
|
||||
@if test -f $(JAR_MANIFEST); then $(PERL) $(MOZILLA_DIR)/config/make-jars.pl $(_JAR_FLAT_FILES_ONLY) -d $(DIST)/bin/chrome -s $(srcdir) < $(JAR_MANIFEST); fi
|
||||
@if test -f $(JAR_MANIFEST); then $(PERL) $(MOZILLA_DIR)/config/make-jars.pl -f $(MOZ_CHROME_FILE_FORMAT) -d $(DIST)/bin/chrome -s $(srcdir) < $(JAR_MANIFEST); fi
|
||||
|
||||
install:: chrome
|
||||
|
||||
REGCHROME = $(PERL) $(MOZILLA_DIR)/config/add-chrome.pl $(DIST)/bin/chrome/installed-chrome.txt $(_JAR_REGCHROME_JAR)
|
||||
REGCHROME = $(PERL) $(MOZILLA_DIR)/config/add-chrome.pl $(DIST)/bin/chrome/installed-chrome.txt $(_JAR_REGCHROME_DISABLE_JAR)
|
||||
|
||||
##############################################################################
|
||||
|
||||
|
32
configure.in
32
configure.in
@ -3428,6 +3428,31 @@ if test -z "$MOZ_ENABLE_GTK" && test `echo "$MOZ_EXTENSIONS" | grep -c xmlterm`;
|
||||
MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xmlterm||'`
|
||||
fi
|
||||
|
||||
dnl Disable jar packaging
|
||||
MOZ_ARG_DISABLE_BOOL(jar-packaging,
|
||||
[ --disable-jar-packaging Disable jar packaging of chrome (Deprecated) ],
|
||||
MOZ_DISABLE_JAR_PACKAGING=1
|
||||
)
|
||||
|
||||
MOZ_ARG_ENABLE_STRING(chrome-format,
|
||||
[ --enable-chrome-format=[jar|flat|both]
|
||||
Select format of chrome files (defaults to both)],
|
||||
MOZ_CHROME_FILE_FORMAT=`echo $enableval | tr A-Z a-z`)
|
||||
|
||||
if test -z "$MOZ_CHROME_FILE_FORMAT"; then
|
||||
if test -n "$MOZ_DISABLE_JAR_PACKAGING"; then
|
||||
MOZ_CHROME_FILE_FORMAT=flat
|
||||
else
|
||||
MOZ_CHROME_FILE_FORMAT=jar
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$MOZ_CHROME_FILE_FORMAT" != "jar" &&
|
||||
test "$MOZ_CHROME_FILE_FORMAT" != "flat" &&
|
||||
test "$MOZ_CHROME_FILE_FORMAT" != "both"; then
|
||||
AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat or both])
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
|
||||
_cpp_md_flag=
|
||||
@ -3541,12 +3566,6 @@ MOZ_ARG_ENABLE_BOOL(cpp-exceptions,
|
||||
[ _MOZ_EXCEPTIONS_FLAGS=-fexceptions ]
|
||||
)
|
||||
|
||||
dnl Disable jar packaging
|
||||
MOZ_ARG_DISABLE_BOOL(jar-packaging,
|
||||
[ --disable-jar-packaging Disable Jar packaging ],
|
||||
MOZ_DISABLE_JAR_PACKAGING=1
|
||||
)
|
||||
|
||||
dnl Enable Ultrasparc specific compiler options
|
||||
MOZ_ARG_ENABLE_BOOL(ultrasparc,
|
||||
[ --enable-ultrasparc Enable UltraSPARC specific compiler options ],
|
||||
@ -4313,6 +4332,7 @@ AC_SUBST(OS_TEST)
|
||||
|
||||
AC_SUBST(MOZ_DISABLE_DTD_DEBUG)
|
||||
AC_SUBST(MOZ_DISABLE_JAR_PACKAGING)
|
||||
AC_SUBST(MOZ_CHROME_FILE_FORMAT)
|
||||
|
||||
AC_SUBST(WRAP_MALLOC_CFLAGS)
|
||||
AC_SUBST(WRAP_MALLOC_LIB)
|
||||
|
Loading…
x
Reference in New Issue
Block a user