bug 493837, JarMaker fails when using ../configure directly, r=ted

--HG--
extra : rebase_source : cedc1321589efd50f6635c3a7cf9a420805ef6a4
This commit is contained in:
Axel Hecht 2009-06-15 16:16:40 +02:00
parent 057b61a337
commit 7557ec3dc7

View File

@ -429,14 +429,14 @@ def main():
else:
logging.basicConfig()
logging.getLogger().setLevel(noise)
topsrc = options.t
topsrc = os.path.normpath(os.path.abspath(topsrc))
if not args:
jm.makeJar(infile=sys.stdin,
sourcedirs=options.s, topsourcedir=options.t,
sourcedirs=options.s, topsourcedir=topsrc,
localedirs=options.l10n_src,
jardir=options.j)
return
topsrc = options.t
topsrc = os.path.normpath(os.path.abspath(topsrc))
for infile in args:
# guess srcdir and l10n dirs from jar.mn path and topsrcdir
# srcdir is the dir of the jar.mn and
@ -450,10 +450,12 @@ def main():
rell10ndir = l10ndir[len(topsrc):].lstrip(os.sep)
l10ndirs = map(lambda d: os.path.join(d, rell10ndir), options.l10n_base)
if options.l10n_src is not None:
l10ndirs += options.l10n_src
srcdirs = options.s + [srcdir]
l10ndirs += map(lambda s: os.path.normpath(os.path.abspath(s)),
options.l10n_src)
srcdirs = map(lambda s: os.path.normpath(os.path.abspath(s)), options.s) + \
[srcdir]
jm.makeJar(infile=infile,
sourcedirs=srcdirs, topsourcedir=options.t,
sourcedirs=srcdirs, topsourcedir=topsrc,
localedirs=l10ndirs,
jardir=options.j)