mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add option to choose a specific make executable (#212)
* Add option to choose a specific make executable * Add changelog fragment * Fix pep8 issues * Add ending dot to make option description Co-Authored-By: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
cb535e9718
commit
546acdaac7
2 changed files with 16 additions and 6 deletions
2
changelogs/fragments/212-make-path-option.yml
Normal file
2
changelogs/fragments/212-make-path-option.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- "Add a make option to the make module to be able to choose a specific make executable"
|
|
@ -39,6 +39,10 @@ options:
|
|||
description:
|
||||
- Use a custom Makefile.
|
||||
type: path
|
||||
make:
|
||||
description:
|
||||
- Use a specific make binary.
|
||||
type: path
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
|
@ -109,9 +113,13 @@ def main():
|
|||
params=dict(type='dict'),
|
||||
chdir=dict(type='path', required=True),
|
||||
file=dict(type='path'),
|
||||
make=dict(type='path'),
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
|
||||
make_path = module.params['make']
|
||||
if make_path is None:
|
||||
# Build up the invocation of `make` we are going to use
|
||||
# For non-Linux OSes, prefer gmake (GNU make) over make
|
||||
make_path = module.get_bin_path('gmake', required=False)
|
||||
|
|
Loading…
Reference in a new issue