зеркало из https://github.com/mozilla/pjs.git
Merge b-s to m-c.
This commit is contained in:
Коммит
dabb0c8bae
|
@ -193,9 +193,8 @@ class SortFunction(Function):
|
|||
__slots__ = Function.__slots__
|
||||
|
||||
def resolve(self, makefile, variables, fd, setting):
|
||||
d = list(self._arguments[0].resolvesplit(makefile, variables, setting))
|
||||
d.sort()
|
||||
util.joiniter(fd, d)
|
||||
d = set(self._arguments[0].resolvesplit(makefile, variables, setting))
|
||||
util.joiniter(fd, sorted(d))
|
||||
|
||||
class WordFunction(Function):
|
||||
name = 'word'
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
# sort should remove duplicates
|
||||
all:
|
||||
@test "$(sort x a y b z c a z b x c y)" = "a b c x y z"
|
||||
@echo "TEST-PASS"
|
|
@ -370,6 +370,7 @@ HAVE_64BIT_OS = @HAVE_64BIT_OS@
|
|||
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
CPP = @CPP@
|
||||
|
||||
CC_VERSION = @CC_VERSION@
|
||||
CXX_VERSION = @CXX_VERSION@
|
||||
|
|
|
@ -192,6 +192,7 @@ HAVE_64BIT_OS = @HAVE_64BIT_OS@
|
|||
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
CPP = @CPP@
|
||||
|
||||
CC_VERSION = @CC_VERSION@
|
||||
CXX_VERSION = @CXX_VERSION@
|
||||
|
|
|
@ -37,9 +37,11 @@ my($lineno) = 0; # line # of package file for error text
|
|||
my($debug) = 0; # controls amount of debug output
|
||||
my($dirflag) = 0; # flag: are we copying a directory?
|
||||
my($help) = 0; # flag: if set, print usage
|
||||
my($fatal_warnings) = 0; # flag: whether package warnings (missing files or invalid entries) are fatal
|
||||
my($flat) = 0; # copy everything into the package dir, not into separate
|
||||
# component dirs
|
||||
|
||||
my($delayed_error) = 0; # flag: whether an error was found while reading the manifest but we still
|
||||
# chose to finish reading it
|
||||
#
|
||||
# Copy
|
||||
#
|
||||
|
@ -47,7 +49,7 @@ my($flat) = 0; # copy everything into the package dir, not into s
|
|||
#
|
||||
|
||||
sub Copy {
|
||||
($srcdir, $destdir, $package, $os, $flat, $help, $debug, @components) = @_;
|
||||
($srcdir, $destdir, $package, $os, $flat, $fatal_warnings, $help, $debug, @components) = @_;
|
||||
|
||||
check_arguments();
|
||||
|
||||
|
@ -147,13 +149,15 @@ sub Copy {
|
|||
|
||||
# if we hit this, it's either a file in the package file that is
|
||||
# not in the src directory, or it is not a valid entry.
|
||||
print "Warning: package error or possible missing or unnecessary file: $line ($package, $lineno).\n";
|
||||
delayed_die_or_warn("package error or possible missing or unnecessary file: $line ($package, $lineno).");
|
||||
|
||||
} # LINE
|
||||
|
||||
close (MANIFEST);
|
||||
chdir ($saved_cwd);
|
||||
|
||||
if ($delayed_error) {
|
||||
die "Error: found error(s) while packaging, see above for details.\n"
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -440,6 +444,20 @@ sub do_component
|
|||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Print error (and die later) or warn, based on whether $fatal_warnings is set.
|
||||
#
|
||||
sub delayed_die_or_warn
|
||||
{
|
||||
my ($msg) = $_[0];
|
||||
|
||||
if ($fatal_warnings) {
|
||||
warn "Error: $msg\n";
|
||||
$delayed_error = 1;
|
||||
} else {
|
||||
warn "Warning: $msg\n";
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Check that arguments to script are valid.
|
||||
|
|
|
@ -658,9 +658,15 @@ endif
|
|||
PKG_ARG = , "$(pkg)"
|
||||
|
||||
# Define packager macro to work around make 3.81 backslash issue (bug #339933)
|
||||
|
||||
# Controls whether missing file warnings should be fatal
|
||||
ifndef MOZ_PKG_FATAL_WARNINGS
|
||||
MOZ_PKG_FATAL_WARNINGS = 0
|
||||
endif
|
||||
|
||||
define PACKAGER_COPY
|
||||
$(PERL) -I$(MOZILLA_DIR)/toolkit/mozapps/installer -e 'use Packager; \
|
||||
Packager::Copy($1,$2,$3,$4,$5,$6,$7);'
|
||||
Packager::Copy($1,$2,$3,$4,$5,$(MOZ_PKG_FATAL_WARNINGS),$6,$7);'
|
||||
endef
|
||||
|
||||
installer-stage: stage-package
|
||||
|
|
Загрузка…
Ссылка в новой задаче