1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Prefer to use gmake (if available) on non linux OS (#51294)

* Prefer to use gmake (if available) on non linux OS

Fixes #26187

* Small cosmetic changes
This commit is contained in:
Anatoly Pugachev 2019-01-26 17:28:55 +03:00 committed by Dag Wieers
parent d2eb7a6cc1
commit 88dee04f66

View file

@ -114,7 +114,11 @@ def main():
),
)
# Build up the invocation of `make` we are going to use
make_path = module.get_bin_path('make', True)
# For non-Linux OSes, prefer gmake (GNU make) over make
make_path = module.get_bin_path('gmake', required=False)
if not make_path:
# Fall back to system make
make_path = module.get_bin_path('make', required=True)
make_target = module.params['target']
if module.params['params'] is not None:
make_parameters = [k + '=' + str(v) for k, v in iteritems(module.params['params'])]