Subject: Re: build.sh defaults file
To: Perry E. Metzger <perry@piermont.com>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: tech-toolchain
Date: 02/06/2003 15:18:57
"Perry E. Metzger" <perry@piermont.com> writes:

> How about if it prints out a nice "WARNING: using build.conf" at the start?

If the feature is enough of a problem that it needs this warning, then
it's enough of a problem that it shouldn't exist.

> Different people have different nice large bits of space mounted in
> different places where they want to put their build arenas, where they
> want their tar files stuffed when sets get built, etc. RELEASE,
> DESTDIR, whether they one objdirs, etc. Typing in all that data over
> and over and over again is silly.
> 
> However, one can't set it "just once" in our current setup.

I don't understand your objection to wrapper scripts. They're flexible
enough for the problem at hand, simple, and entirely
customizable. It's much better for people to use an existing tool and
language (sh) to adjust the behavior of a tool then to see "oh no, Yet
Another Configuration Language".

#!/bin/sh
exec build.sh -D /my/storage/space/dest "$@"

is no harder or more of a "waste" than having to find out that there
is a configuration file, find the name of the option or variable to
set, and create the file. It is, however, more flexible, in that it
lets you do things like:

#!/bin/sh
targarch=${1:-$(uname -m)}
arena=/nbsd/build/$targarch
rm -rf $arena/dest $arena/tools $arena/obj $arena/rel
mkdir -p $arena/dest $arena/tools $arena/obj $arena/rel
exec > $arena/build.log.$(date +%F) 2>&1
exec build.sh -D $arena/dest -R $arena/rel -T $arena/tools -O $arena/obj -U

i.e. tweak in really flexbile ways.

> Different machines probably have space in different places. This is
> really a question of stuff like DESTDIR.

Or different users. Or different build farms or CS labs. Should there
then be an /etc/build.conf, a ~/.build.conf, and a
/mytree/src/build.conf?

        - Nathan