4 ms·
It sounds like your build process is not well designed. Why would a build script need to generate a shell script to call? And why would a python script fork a p
by bjourne 9y ago
It sounds like your build process is not well designed. Why would a build script need to generate a shell script to call? And why would a python script fork a process for each plugin?
I think waf, which I've plugged before, would be a good choice for your project. Without knowing the details, your build script would look something like:
def configure(ctx):
# Load C compiler support
ctx.load('compiler_c compiler_cxx')
if ctx.env.DEST_OS == 'win32':
# Special thing for Windows
def build(ctx):
for plugin in ['a', 'b', ...]:
ctx.shlib(source=ctx.path.ant_glob('ext/'+plugin+'/*.c'), target=plugin)
You get cross-platform support for free. The code will create an 'a.dll' on Windows, 'a.so' on Linux and something else on OS X. Note that while the build function above looks like imperative code, it actually is not. Instead it is Python code to create a dependency graph which waf rebuilds for you when it is needed.