1# -*- Mode: python; 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
7option("--enable-hoge", help="enable hoge")
8
9
10@depends("--enable-hoge")
11def hoge(value):
12    return value
13
14
15option("--enable-foo", help="enable foo")
16
17
18@depends("--enable-foo", hoge)
19def foo(value, hoge):
20    if value:
21        return True
22
23
24imply_option("--enable-bar", foo)
25
26
27option("--enable-bar", help="enable bar")
28
29
30@depends("--enable-bar")
31def bar(value):
32    if value:
33        return value
34
35
36set_config("BAR", bar)
37