[distcc] adding command-line parsing

Markus Werle numerical.simulation at web.de
Thu Jul 10 07:47:27 GMT 2003


Wayne Davison wrote:

> On Wed, Jul 09, 2003 at 10:09:26AM +0200, Markus Werle wrote:
> > I already showed in this thread that it is quite simple to
> > just use the convention that only args after
> > --compiler=<somecompiler> are treated as compiler options.
>
> Unfortunately that would make it incompatible with both of it's oldest
> calling syntaxes:
>
>     CC=distcc
>     CC="distcc gcc"

No, because of the proxy script I proposed which preserves backward
compatibility.

CC=distcc_env
CC="distcc_env gcc"

> I personally think that the --compiler option is overkill, and having
> distcc treat the first (non-distcc-option) word on the line as the
> compiler name is a good idiom to preserve.

That's a matter of taste. I can live with both versions if we have
command line control for any other aspect.
Probably "--compiler" still is a good idea, because the day may come
when Martin's dream comes true and someone uses this tool
for something else than compilation:

distcc --exec=SomeTool --remote-extra-flags=-d 3.0

I prefer if order does not matter.
distcc --compiler=gcc --remote-extra-cflags=-xc++ \
--verbose --debug --debug-file=gaga.txt

> I can also see that having
> the ability to control distcc through options would be a nice addition
> to the various existing ways to control distcc, but not as a replacement
> for them (e.g. I would continue to use masquerade mode in my setup).

Agreed, therefore I think a small tool which is either a script or
a binary that reads in environment vars via getenv and translates this to a
system call to distcc --with-options is appropriate.

/opt/distcc-2.9.1/bin/distcc_env reads in environment vars and calls
/opt/distcc-2.9.1/bin/distcc --


Markus








More information about the distcc mailing list