Hi!
I've been trying to package a library that uses makefiles but I can't find a way to specify the -f [file] flag for the make command.
I know that I can do self.run("make -f [file]) but it's a little hacky. is there a better way to do this using AutoToolsBuildEnvironment()?
Thanks!
Hi @ericshub
Unfortunately there is no option available to do that. The possible solutions would be:
self.run() as you commentedos.rename() of the file to name it "Makefile" before calling the AutoToolsBuildEnvironment. A bit of a workaround, but that might be very easy and effective.filename argument to AutoToolsBuildEnvironment.make() might make sense and be relatively easy. Would you like to contribute it yourself in a Pull Request?Thanks!
you may use:
env_build = AutoToolsBuildEnvironment(self.settings)
env_build.make(args=["-f", "custom_makefile"])
Oh, @SSE4 is right. I think that is a good solution, no need for the other workarounds or a custom parameter.
@ericshub please try it, and if it works, report and close this issue. Thanks!
I tried what @SSE4 suggested and it worked. Thanks!
you may use:
env_build = AutoToolsBuildEnvironment(self.settings) env_build.make(args=["-f", "custom_makefile"])
Good! Thanks for telling!