Revision control

Other Tools

1
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
2
# vim: set filetype=python:
3
# This Source Code Form is subject to the terms of the Mozilla Public
4
# License, v. 2.0. If a copy of the MPL was not distributed with this
5
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7
set_config('MOZ_SUITE', True)
8
set_define('MOZ_SUITE', True)
9
10
11
@depends(target_is_windows, target_is_linux)
12
def bundled_fonts(is_windows, is_linux):
13
if is_windows or is_linux:
14
return True
15
16
set_config('MOZ_BUNDLED_FONTS', bundled_fonts)
17
add_old_configure_assignment('MOZ_BUNDLED_FONTS', bundled_fonts)
18
19
@depends(check_build_environment, '--help')
20
def comm_paths(build_env, _):
21
topsrcdir = build_env.topsrcdir
22
topobjdir = build_env.topobjdir
23
24
moztopsrcdir=topsrcdir
25
commtopsrcdir='%s/comm' % topsrcdir
26
mozreltopsrcdir='.'
27
commreltopsrcdir='comm'
28
commtopobjdir='%s/comm' % topobjdir
29
30
return namespace(moztopsrcdir=moztopsrcdir,
31
commtopsrcdir=commtopsrcdir,
32
mozreltopsrcdir=mozreltopsrcdir,
33
commreltopsrcdir=commreltopsrcdir,
34
commtopobjdir=commtopobjdir)
35
36
@template
37
def set_defconf(k,v):
38
set_config(k,v)
39
set_define(k,v)
40
add_old_configure_assignment(k,v)
41
42
set_defconf('moztopsrcdir', comm_paths.moztopsrcdir)
43
set_defconf('commtopsrcdir', comm_paths.commtopsrcdir)
44
set_defconf('mozreltopsrcdir', comm_paths.mozreltopsrcdir)
45
set_defconf('commreltopsrcdir', comm_paths.commreltopsrcdir)
46
set_defconf('commtopobjdir', comm_paths.commtopobjdir)
47
48
49
@depends(check_build_environment, application)
50
@imports(_from='os.path', _import='exists')
51
@imports(_from='__builtin__', _import='open')
52
def seamonkey_version(build_env, app_path):
53
version_file = os.path.join(build_env.topsrcdir, app_path[0],
54
'config', 'version.txt')
55
version_file_display = os.path.join(build_env.topsrcdir, app_path[0],
56
'config', 'version_display.txt')
57
rv = []
58
for f in [ version_file, version_file_display ]:
59
if exists(f):
60
f_value = open(f).read().strip()
61
else:
62
f_value = 'unknown'
63
rv.append(f_value)
64
65
return namespace(version=rv[0],
66
version_display=rv[1])
67
68
set_defconf('SEAMONKEY_VERSION', seamonkey_version.version)
69
set_defconf('SEAMONKEY_VERSION_DISPLAY', seamonkey_version.version_display)
70
71
@depends(check_build_environment)
72
@imports(_from='os.path', _import='exists')
73
@imports(_from='__builtin__', _import='open')
74
def thunderbird_version(build_env):
75
version_file = os.path.join(build_env.topsrcdir, 'comm/mail',
76
'config', 'version.txt')
77
version_file_display = os.path.join(build_env.topsrcdir, 'comm/mail',
78
'config', 'version_display.txt')
79
rv = []
80
for f in [ version_file, version_file_display ]:
81
if exists(f):
82
f_value = open(f).read().strip()
83
else:
84
f_value = 'unknown'
85
rv.append(f_value)
86
87
return namespace(version=rv[0],
88
version_display=rv[1])
89
90
set_defconf('THUNDERBIRD_VERSION', thunderbird_version.version)
91
set_defconf('THUNDERBIRD_VERSION_DISPLAY', thunderbird_version.version_display)
92
93
set_define('MOZ_SEPARATE_MANIFEST_FOR_THEME_OVERRIDES', True)
94
95
imply_option('MOZ_PLACES', True)
96
imply_option('MOZ_SERVICES_SYNC', False)
97
imply_option('MOZ_ALLOW_LEGACY_EXTENSIONS', True)
98
99
# Building extensions is disabled by default.
100
# Bug 1231349 needs to be fixed first for l10n builds.
101
# Set desired defaults to True from False when the l10n bug is fixed.
102
103
# =========================================================
104
# = ChatZilla extension
105
# =========================================================
106
option('--enable-irc', default=False,
107
help='Enable building of the ChatZilla IRC extension')
108
109
@depends_if('--enable-irc')
110
def irc(arg):
111
return True
112
113
set_config('MOZ_IRC', irc)
114
115
# =========================================================
116
# = DOM Inspector extension
117
# =========================================================
118
option('--enable-dominspector', default=False,
119
help='Enable building of the DOM Inspector extension')
120
121
@depends_if('--enable-dominspector')
122
def dominspector(arg):
123
return True
124
125
set_config('MOZ_DOMINSPECTOR', dominspector)
126
127
# =========================================================
128
# = DebugQA extension
129
# =========================================================
130
option('--enable-debugqa', default=False,
131
help='Enable building of the DebugQA extension')
132
133
@depends_if('--enable-debugqa')
134
def debugqa(arg):
135
return True
136
137
set_config('MOZ_DEBUGQA', debugqa)
138
139
include('../mailnews/moz.configure')
140
include('../../toolkit/moz.configure')