prefix gets removed when adding additional configure options (#16335)

* prefix gets removed when adding additional configure options

* Update waf documentation to reflect the new change
This commit is contained in:
Nathan 2020-04-29 08:52:23 -07:00 committed by GitHub
parent 42d7fd30c4
commit b6b44948b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -47,8 +47,9 @@ Each phase provides a ``<phase>`` function that runs:
where ``<jobs>`` is the number of parallel jobs to build with. Each phase
also has a ``<phase_args>`` function that can pass arguments to this call.
All of these functions are empty except for the ``configure_args``
function, which passes ``--prefix=/path/to/installation/prefix``.
All of these functions are empty. The ``configure`` phase
automatically adds ``--prefix=/path/to/installation/prefix``, so you
don't need to add that in the ``configure_args``.
^^^^^^^
Testing

View File

@ -75,13 +75,14 @@ def waf(self, *args, **kwargs):
def configure(self, spec, prefix):
"""Configures the project."""
args = self.configure_args()
args = ['--prefix={0}'.format(self.prefix)]
args += self.configure_args()
self.waf('configure', *args)
def configure_args(self):
"""Arguments to pass to configure."""
return ['--prefix={0}'.format(self.prefix)]
return []
def build(self, spec, prefix):
"""Executes the build."""