[distcc] adding command-line parsing

Martin Pool mbp at samba.org
Thu Jul 17 12:06:04 GMT 2003


On 17 Jul 2003, Markus Werle <numerical.simulation at web.de> wrote:
> Martin Pool wrote:
> 
> > I suppose another reason I hesitate to add it is that most of the
> > time, users should not have to specify any options.
> 
> OTOH I have to. I have to call make from the same place.
> And I still do not know how to elegantly trigger environment
> var settings in autotool-generated Makefiles.

You can do this just by putting an assignment to the variable into the
Makefile.am or Makefile.in with  an export statement

  DISTCC_EXTRA_CC_FLAGS=-xc++
  export DISTCC_EXTRA_CC_FLAGS

> For me the best thing you can do is provide complete control via
> command-line, so I can run my
> configure CXX=... CXXFLAGS=...
> 
> But to obtain some convergence in this discussion:
> I propose the following, if you like:
> 
> You leave distcc as it is, but exhibit every little aspect of distcc
> behaviour to control via environment vars (especially the
> DISTCC_EXTRA_REMOTE_FLAGS, please).
> 
> I myself write a little C++ tool that can only be controlled
> via command-line options. This tool sets all environment vars
> according to the command-line and finally syscalls distcc.
> 
> You put that stuff into the contrib part of Your distribution,
> such that every C++-user can build it whenever she wants.
> 
> I just saw that most of my work has been redone within the
> boost library, the next releasse contains a command-line parser
> tool. Probably I should build my tool upon that lib instead
> of mine, we'll see.

OK.

> > Hosts are
> > probably better stored in a file for most cases, and most of the other
> > options should not need to be set except for debugging.  Is that true?
> > Do you find yourself using options often?

> I find command-line options rather useful (as you know by now)
> If I start my finite element solver, the call looks like this:
> 
> ./isothermal_solid -x 31 -y 31 --grid-extension-in-x=1.0 \
> --grid-extension-in-y=1.0 -t 1e-4 -n 100000000 \
> --newton-convergence-criterion=1e-10 \
> --load=1E-2 --load-time=10E-4

Yes, I know this is good for general programs.  This is how exactly
distccd works.

Regards,
--
Martin



More information about the distcc mailing list