Debian Codegraph @

src/buildstream_plugins/elements/autotools.py

raw
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at
5 #
6 # http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13 #
14 # Authors:
15 # Tristan Van Berkom <[email protected]>
16
17 #
18 # This plugin was originally developped in the https://github.com/apache/buildstream/
19 # repository and was copied from 1a3c707a6c46573ab159de64ac9cd92e7f6027e6
20 #
21
22
23 """
24 autotools - Autotools build element
25 ===================================
26 This is a :mod:`BuildElement <buildstream.buildelement>` implementation for
27 using Autotools build scripts (also known as the `GNU Build System
28 <https://en.wikipedia.org/wiki/GNU_Build_System>`_).
29
30 You will often want to pass additional arguments to ``configure``. This should
31 be done on a per-element basis by setting the ``conf-local`` variable. Here is
32 an example:
33
34 .. code:: yaml
35
36 variables:
37 conf-local: |
38 --disable-foo --enable-bar
39
40 If you want to pass extra options to ``configure`` for every element in your
41 project, set the ``conf-global`` variable in your project.conf file. Here is
42 an example of that:
43
44 .. code:: yaml
45
46 elements:
47 autotools:
48 variables:
49 conf-global: |
50 --disable-gtk-doc --disable-static
51
52 Here is the default configuration for the ``autotools`` element in full:
53
54 .. literalinclude:: ../../../src/buildstream_plugins/elements/autotools.yaml
55 :language: yaml
56
57 See `built-in functionality documentation
58 <https://docs.buildstream.build/master/buildstream.buildelement.html#core-buildelement-builtins>`_ for
59 details on common configuration options for build elements.
60 """
61
62 from buildstream import BuildElement
63
64
65 # Element implementation for the 'autotools' kind.
66 class AutotoolsElement(BuildElement):
67 # pylint: disable=attribute-defined-outside-init
68
69 BST_MIN_VERSION = "2.0"
70
71
72 # Plugin entry point
73 def setup():
74 return AutotoolsElement