Change config file location from ~/.bob.conf to ~/.bob/config.

I'm going to want to store other stuff in ~/.bob shortly, so it's time
to make this a config directory rather than a plain file.


git-svn-id: svn://svn.tartarus.org/sgt@10236 cda61777-01e9-0310-a592-d414129be87e
Refactor to pass 'cfg' in to the lexer.

This will allow $(!foo) type functions to use information from it,
such as cfg.mainmodule.


git-svn-id: svn://svn.tartarus.org/sgt@10237 cda61777-01e9-0310-a592-d414129be87e
Refactor handling of $(!foo) functions.

I now split the function name off from its arguments in a more
sensibly centralised way, which doesn't require me to count letters
correctly every time I invent a new function.


git-svn-id: svn://svn.tartarus.org/sgt@10238 cda61777-01e9-0310-a592-d414129be87e
Remove use of Subversion keyword expansion.

It'll be pointless when I migrate to git, so let's get rid of it right
now...


git-svn-id: svn://svn.tartarus.org/sgt@10239 cda61777-01e9-0310-a592-d414129be87e
Reinstate a vital missing error report.

The default behaviour of bob in the presence of an existing build
directory should be to refuse to run, requiring -F to wipe it out and
restart. One thing it should _never_ do is to overlay the new build on
top of the stuff in the old build directory - but that's exactly what
it was doing by default, due to a missing 'else raise'.


git-svn-id: svn://svn.tartarus.org/sgt@10240 cda61777-01e9-0310-a592-d414129be87e
Add the 'read' command, to read a file.

This permits build scripts to do more complicated thinking than bob
itself can cope with, and still retrieve the results into a build-
script variable. E.g. you might write

  in . do perl -e 'some complicated thinking' > tmpfile
  read Myvar tmpfile

and then use $(Myvar) in subsequent bob commands.


git-svn-id: svn://svn.tartarus.org/sgt@10241 cda61777-01e9-0310-a592-d414129be87e
New $(!builddate) mechanism for choosing a build date.

When I add support for git, in which a date cannot unambiguously
identify a commit because of the possibility of forking history, I
will need a new method of dating nightly snapshots. Since I know
people get annoyed at constant churn of new builds without any actual
changes, this also seems like a good idea to introduce a consistent
mechanism that lets me date builds consistently if no changes are
committed between them. I do this by caching revision information from
the last build of each project in ~/.bob/builddates.


git-svn-id: svn://svn.tartarus.org/sgt@10242 cda61777-01e9-0310-a592-d414129be87e
Add support for building from native git repositories.

Prior to this commit, bob was a Subversion-based build system; now it
copes with either svn or git (plus the special case where it will try
to autodetect some git checkouts as git-svn based and treat them as
morally svn checkouts). New facilities are available for retrieving
the git commit hashes of modules, and for retrieving source control
identification in a VCS-agnostic way so that the same build script can
work no matter which VCS you're checking out from.


git-svn-id: svn://svn.tartarus.org/sgt@10243 cda61777-01e9-0310-a592-d414129be87e