Skip to content

Commit

Permalink
Bug 1677775 - reformat .mozbuild files with Black r=linter-reviewers,…
Browse files Browse the repository at this point in the history
…geckoview-reviewers,firefox-build-system-reviewers,ahal,glandium,owlish,sylvestre

#ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D193007
  • Loading branch information
loganrosen committed Dec 8, 2023
1 parent e61d06e commit 141305b
Show file tree
Hide file tree
Showing 42 changed files with 2,672 additions and 2,633 deletions.
6 changes: 3 additions & 3 deletions browser/app.mozbuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# 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/.

include('/toolkit/toolkit.mozbuild')
include("/toolkit/toolkit.mozbuild")

DIRS += ['/%s' % CONFIG['MOZ_BRANDING_DIRECTORY']]
DIRS += ["/%s" % CONFIG["MOZ_BRANDING_DIRECTORY"]]

# Never add dirs after browser because they apparently won't get
# packaged properly on Mac.
DIRS += ['/browser']
DIRS += ["/browser"]
35 changes: 18 additions & 17 deletions browser/branding/branding-common.mozbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,34 @@
# 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/.


@template
def FirefoxBranding():
if CONFIG['MOZ_BRANDING_DIRECTORY'] == 'browser/branding/official':
if CONFIG["MOZ_BRANDING_DIRECTORY"] == "browser/branding/official":
JS_PREFERENCE_PP_FILES += [
'pref/firefox-branding.js',
"pref/firefox-branding.js",
]
else:
JS_PREFERENCE_FILES += [
'pref/firefox-branding.js',
"pref/firefox-branding.js",
]

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
FINAL_TARGET_FILES['..'] += [
'firefox.VisualElementsManifest.xml',
'private_browsing.VisualElementsManifest.xml',
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
FINAL_TARGET_FILES[".."] += [
"firefox.VisualElementsManifest.xml",
"private_browsing.VisualElementsManifest.xml",
]
FINAL_TARGET_FILES.VisualElements += [
'PrivateBrowsing_150.png',
'PrivateBrowsing_70.png',
'VisualElements_150.png',
'VisualElements_70.png',
"PrivateBrowsing_150.png",
"PrivateBrowsing_70.png",
"VisualElements_150.png",
"VisualElements_70.png",
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
FINAL_TARGET_FILES.chrome.icons.default += [
'default128.png',
'default16.png',
'default32.png',
'default48.png',
'default64.png',
"default128.png",
"default16.png",
"default32.png",
"default48.png",
"default64.png",
]
3 changes: 1 addition & 2 deletions build/clang-plugin/alpha/sources.mozbuild
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

HOST_SOURCES += [
# 'AlphaChecker.cpp',
"NonStdMoveChecker.cpp",
'TempRefPtrChecker.cpp',
"TempRefPtrChecker.cpp",
]
3 changes: 1 addition & 2 deletions build/clang-plugin/alpha/tests/sources.mozbuild
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

SOURCES += [
# 'AlphaTest.cpp',
"TestNonStdMove.cpp",
'TestTempRefPtr.cpp',
"TestTempRefPtr.cpp",
]
69 changes: 35 additions & 34 deletions build/gecko_templates.mozbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
# 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/.


@template
def GeckoBinary(linkage='dependent', mozglue=None):
'''Template for Gecko-related binaries.
def GeckoBinary(linkage="dependent", mozglue=None):
"""Template for Gecko-related binaries.
This template is meant to be used in other templates.
Expand All @@ -21,104 +22,104 @@ def GeckoBinary(linkage='dependent', mozglue=None):
so, what linkage to apply. Valid values are None (mozglue not linked),
'program' (mozglue linked to an executable program), or 'library' (mozglue
linked to a shared library).
'''
if linkage == 'dependent':
"""
if linkage == "dependent":
USE_LIBS += [
'nspr',
'xul-real',
"nspr",
"xul-real",
]
elif linkage == 'standalone':
DEFINES['XPCOM_GLUE'] = True
elif linkage == "standalone":
DEFINES["XPCOM_GLUE"] = True

USE_LIBS += [
'xpcomglue',
"xpcomglue",
]
elif linkage != None:
error('`linkage` must be "dependent", "standalone" or None')

if mozglue:
if mozglue == 'program':
USE_LIBS += ['mozglue']
DEFINES['MOZ_HAS_MOZGLUE'] = True
if CONFIG['MOZ_GLUE_IN_PROGRAM'] and CONFIG['CC_TYPE'] in ('clang', 'gcc'):
LDFLAGS += ['-rdynamic']
elif mozglue == 'library':
LIBRARY_DEFINES['MOZ_HAS_MOZGLUE'] = True
if not CONFIG['MOZ_GLUE_IN_PROGRAM']:
USE_LIBS += ['mozglue']
if mozglue == "program":
USE_LIBS += ["mozglue"]
DEFINES["MOZ_HAS_MOZGLUE"] = True
if CONFIG["MOZ_GLUE_IN_PROGRAM"] and CONFIG["CC_TYPE"] in ("clang", "gcc"):
LDFLAGS += ["-rdynamic"]
elif mozglue == "library":
LIBRARY_DEFINES["MOZ_HAS_MOZGLUE"] = True
if not CONFIG["MOZ_GLUE_IN_PROGRAM"]:
USE_LIBS += ["mozglue"]
else:
error('`mozglue` must be "program" or "library"')


@template
def GeckoProgram(name, linkage='standalone', **kwargs):
'''Template for program executables related to Gecko.
def GeckoProgram(name, linkage="standalone", **kwargs):
"""Template for program executables related to Gecko.
`name` identifies the executable base name.
See the documentation for `GeckoBinary` for other possible arguments,
with the notable difference that the default for `linkage` is 'standalone'.
'''
"""
Program(name)

kwargs.setdefault('mozglue', 'program')
kwargs.setdefault("mozglue", "program")

GeckoBinary(linkage=linkage, **kwargs)


@template
def GeckoSimplePrograms(names, **kwargs):
'''Template for simple program executables related to Gecko.
"""Template for simple program executables related to Gecko.
`names` identifies the executable base names for each executable.
See the documentation for `GeckoBinary` for other possible arguments.
'''
"""
SimplePrograms(names)

kwargs.setdefault('mozglue', 'program')
kwargs.setdefault("mozglue", "program")

GeckoBinary(**kwargs)


@template
def GeckoCppUnitTests(names, **kwargs):
'''Template for C++ unit tests related to Gecko.
"""Template for C++ unit tests related to Gecko.
`names` identifies the executable base names for each executable.
See the documentation for `GeckoBinary` for other possible arguments.
'''
"""
CppUnitTests(names)

kwargs.setdefault('mozglue', 'program')
kwargs.setdefault("mozglue", "program")

GeckoBinary(**kwargs)


@template
def GeckoSharedLibrary(name, output_category=None, **kwargs):
'''Template for shared libraries related to Gecko.
"""Template for shared libraries related to Gecko.
`name` identifies the library base name.
See the documentation for `GeckoBinary` for other possible arguments.
'''
"""
SharedLibrary(name, output_category)

kwargs.setdefault('mozglue', 'library')
kwargs.setdefault("mozglue", "library")

GeckoBinary(**kwargs)


@template
def GeckoFramework(name, output_category=None, **kwargs):
'''Template for OSX frameworks related to Gecko.
"""Template for OSX frameworks related to Gecko.
`name` identifies the library base name.
See the documentation for `GeckoBinary` for other possible arguments.
'''
"""
Framework(name, output_category)

kwargs.setdefault('mozglue', 'library')
kwargs.setdefault("mozglue", "library")

GeckoBinary(**kwargs)
Loading

0 comments on commit 141305b

Please sign in to comment.