DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (5e26ffc6e887)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.

set_config('MOZ_THUNDERBIRD', True)
set_define('MOZ_THUNDERBIRD', True)

@depends(target_is_windows, target_is_linux)
def bundled_fonts(is_windows, is_linux):
    if is_windows or is_linux:
        return True

set_config('MOZ_BUNDLED_FONTS', bundled_fonts)
add_old_configure_assignment('MOZ_BUNDLED_FONTS', bundled_fonts)

@depends(check_build_environment, '--help')
def comm_paths(build_env, _):
    topsrcdir = build_env.topsrcdir
    topobjdir = build_env.topobjdir

    moztopsrcdir=topsrcdir
    commtopsrcdir='%s/comm' % topsrcdir
    mozreltopsrcdir='.'
    commreltopsrcdir='comm'
    commtopobjdir='%s/comm' % topobjdir

    return namespace(moztopsrcdir=moztopsrcdir,
                     commtopsrcdir=commtopsrcdir,
                     mozreltopsrcdir=mozreltopsrcdir,
                     commreltopsrcdir=commreltopsrcdir,
                     commtopobjdir=commtopobjdir)

@template
def set_defconf(k,v):
    set_config(k,v)
    set_define(k,v)
    add_old_configure_assignment(k,v)

set_defconf('moztopsrcdir', comm_paths.moztopsrcdir)
set_defconf('commtopsrcdir', comm_paths.commtopsrcdir)
set_defconf('mozreltopsrcdir', comm_paths.mozreltopsrcdir)
set_defconf('commreltopsrcdir', comm_paths.commreltopsrcdir)
set_defconf('commtopobjdir', comm_paths.commtopobjdir)


@depends(check_build_environment, application)
@imports(_from='os.path', _import='exists')
@imports(_from='__builtin__', _import='open')
def thunderbird_version(build_env, app_path):
    version_file = os.path.join(build_env.topsrcdir, app_path[0],
                                'config', 'version.txt')
    version_file_display = os.path.join(build_env.topsrcdir, app_path[0],
                                'config', 'version_display.txt')
    rv = []
    for f in [ version_file, version_file_display ]:
        if exists(f):
            f_value = open(f).read().strip()
        else:
            f_value = 'unknown'
        rv.append(f_value)

    return namespace(version=rv[0],
                     version_display=rv[1])

set_defconf('THUNDERBIRD_VERSION', thunderbird_version.version)
set_defconf('THUNDERBIRD_VERSION_DISPLAY', thunderbird_version.version_display)

set_define('MOZ_SEPARATE_MANIFEST_FOR_THEME_OVERRIDES', True)

imply_option('MOZ_PLACES', True)
imply_option('MOZ_ALLOW_LEGACY_EXTENSIONS', True)
imply_option('MOZ_DEDICATED_PROFILES', True)
imply_option('MOZ_BLOCK_PROFILE_DOWNGRADE', True)

with only_when(target_is_linux & compile_environment):
    option(env='MOZ_NO_PIE_COMPAT',
           help='Enable non-PIE wrapper')

    set_config('MOZ_NO_PIE_COMPAT',
               depends_if('MOZ_NO_PIE_COMPAT')(lambda _: True))

include('../mailnews/moz.configure')
include('../../toolkit/moz.configure')