in reply to Re: Re: Sourcing Dot Config Files and Monitoring Make Processes
in thread Sourcing Dot Config Files and Monitoring Make Processes

You can find examples of this type of thing all over the place, but a notable one is with the Apache Web server. When compiling, there is a program called apaci which is a wrapper that works just like you want. It is simply a sh script. Here's a theoretical approximation:
#!/bin/sh # Set Variables FOO="bar" CC="gcc" COPTS="-l -q -r" # Execute whatever $*
All it does is set a few variables and then run whatever commands you give it. This also means that make doesn't "talk" as much during compiles since the commands are shorter. I'm not a fan of Makefiles which spew out reams of useless "-I../../../../../src -DSOMETHING -DSOMETHING_ELSE ..." type parameters since it is harder to casually spot warnings, and harder still to parse what is actually going on.

As a note, though, you may not want to use Perl to actually execute the make process(es) as it is fairly heavy compared to a shell, something that might slow down your build. It might be advantageous for Perl to generate the required shell scripts and then kick off the whole process with a single exec call.