make: use -f instead of --file to aid in portability (#65880)

`make` on FreeBSD (and others) has support for an option `-f` to specify a `Makefile`, whereas GNU make uses `--file` or `-f`. In the interest of portability use `-f` which covers both.
This commit is contained in:
JP Mens 2020-01-14 12:01:13 +01:00 committed by ansibot
parent 6f04f87a13
commit b06e78c16c

View file

@ -127,7 +127,7 @@ def main():
make_parameters = []
if module.params['file'] is not None:
base_command = [make_path, "--file", module.params['file'], make_target]
base_command = [make_path, "-f", module.params['file'], make_target]
else:
base_command = [make_path, make_target]
base_command.extend(make_parameters)