# -*- Mode: python; 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/. SPHINX_TREES["/toolkit/components/glean"] = "docs" # Must be defined unconditionally since the tasks on TC don't know MOZ_GLEAN. # (and the tests don't depend on MOZ_GLEAN to run). PYTHON_UNITTEST_MANIFESTS += [ "pytest/python.ini", ] if CONFIG["MOZ_GLEAN"]: # Needed so that we can include IPC things. include("/ipc/chromium/chromium-config.mozbuild") FINAL_LIBRARY = "xul" EXPORTS.mozilla += [ "ipc/FOGIPC.h", ] EXPORTS.mozilla.glean += [ "!GleanMetrics.h", "!GleanPings.h", ] EXPORTS.mozilla.glean.bindings += [ "!GleanJSMetricsLookup.h", "!GleanJSPingsLookup.h", "bindings/Category.h", "bindings/Glean.h", "bindings/GleanPings.h", "bindings/MetricTypes.h", "bindings/private/Boolean.h", "bindings/private/Counter.h", "bindings/private/Datetime.h", "bindings/private/DistributionData.h", "bindings/private/Event.h", "bindings/private/MemoryDistribution.h", "bindings/private/Ping.h", "bindings/private/String.h", "bindings/private/StringList.h", "bindings/private/Timespan.h", "bindings/private/TimingDistribution.h", "bindings/private/Uuid.h", ] if CONFIG["COMPILE_ENVIRONMENT"]: EXPORTS.mozilla.glean += [ "!fog_ffi_generated.h", ] CbindgenHeader("fog_ffi_generated.h", inputs=["/toolkit/components/glean"]) UNIFIED_SOURCES += [ "bindings/Category.cpp", "bindings/Glean.cpp", "bindings/GleanPings.cpp", "bindings/private/Boolean.cpp", "bindings/private/Common.cpp", "bindings/private/Counter.cpp", "bindings/private/Datetime.cpp", "bindings/private/Event.cpp", "bindings/private/MemoryDistribution.cpp", "bindings/private/Ping.cpp", "bindings/private/String.cpp", "bindings/private/StringList.cpp", "bindings/private/Timespan.cpp", "bindings/private/TimingDistribution.cpp", "bindings/private/Uuid.cpp", "ipc/FOGIPC.cpp", ] TEST_DIRS += [ "gtest", ] XPCSHELL_TESTS_MANIFESTS += ["xpcshell/xpcshell.ini"] # Provides us the list of dependent metrics|pings.yaml. include("metrics_index.py") # GeneratedFile's `inputs` are relative to our dir. # The yamls arrays are relative to topsrcdir, so we need to transform: metrics_yamls = ["../../../" + x for x in metrics_yamls] pings_yamls = ["../../../" + x for x in pings_yamls] # If you change the length of this deps list, update DEPS_LEN in run_glean_parser.py deps = [ "metrics_index.py", "build_scripts/glean_parser_ext/cpp.py", "build_scripts/glean_parser_ext/js.py", "build_scripts/glean_parser_ext/run_glean_parser.py", "build_scripts/glean_parser_ext/rust.py", "build_scripts/glean_parser_ext/string_table.py", "build_scripts/glean_parser_ext/util.py", "build_scripts/glean_parser_ext/templates/cpp.jinja2", "build_scripts/glean_parser_ext/templates/cpp_pings.jinja2", "build_scripts/glean_parser_ext/templates/js.jinja2", "build_scripts/glean_parser_ext/templates/js_pings.jinja2", "build_scripts/glean_parser_ext/templates/rust.jinja2", "build_scripts/glean_parser_ext/templates/rust_pings.jinja2", ] GeneratedFile( "api/src/metrics.rs", script="build_scripts/glean_parser_ext/run_glean_parser.py", flags=[CONFIG["MOZ_APP_VERSION"]], inputs=deps + metrics_yamls, ) GeneratedFile( "GleanMetrics.h", script="build_scripts/glean_parser_ext/run_glean_parser.py", entry_point="cpp_metrics", flags=[CONFIG["MOZ_APP_VERSION"]], inputs=deps + metrics_yamls, ) GeneratedFile( "GleanJSMetricsLookup.h", script="build_scripts/glean_parser_ext/run_glean_parser.py", entry_point="js_metrics", flags=[CONFIG["MOZ_APP_VERSION"]], inputs=deps + metrics_yamls, ) GeneratedFile( "api/src/pings.rs", script="build_scripts/glean_parser_ext/run_glean_parser.py", flags=[CONFIG["MOZ_APP_VERSION"]], inputs=deps + pings_yamls, ) GeneratedFile( "GleanPings.h", script="build_scripts/glean_parser_ext/run_glean_parser.py", entry_point="cpp_metrics", flags=[CONFIG["MOZ_APP_VERSION"]], inputs=deps + pings_yamls, ) GeneratedFile( "GleanJSPingsLookup.h", script="build_scripts/glean_parser_ext/run_glean_parser.py", entry_point="js_metrics", flags=[CONFIG["MOZ_APP_VERSION"]], inputs=deps + pings_yamls, ) DIRS += [ "xpcom", ] with Files("docs/**"): SCHEDULES.exclusive = ["docs"] with Files("**"): BUG_COMPONENT = ("Toolkit", "Telemetry")