[Ur] PATCH: -version flags for urweb compiler

austin seipp as at hacks.yi.org
Sun Jul 24 17:38:35 EDT 2011


The compiler has never had a version flag, so attached is a patch that
adds some support for build/compiler versions. It roughly adds:

* a new configure.ac variable, RELEASE, which is set to either YES or
NO to indicate that
  "this is a stable version." Cutting releases then requires setting
RELEASE=YES in configure.ac
  and committing that + regeneration of autoconf files (probably a
separate release that happens after
  a commit detailing release notes.)
* a new configure.ac variable VERSION which is put into Makefile.am
and src/config.{sig,sml}
  this flag is generated at compile time based on the date, since
that's basically the current version scheme.
  So you can now at least keep track of when you built the compiler
(roughly speaking)
* version identifiers in src/config.{sig.sml}
* two new flags, -version, which outputs:

./build/bin/urweb -version
The Unbelievable Ur/Web compiler, version 20110724 (stable release = NO)

and -numeric-version:

./build/bin/urweb -numeric-version
20110724

The default mode of the compiler with no options is equivalent to
passing the -version flag, which is similar to the default mode of
operation for MLton.

Oh, and 'make package' both takes RELEASE and VERSION into account
when creating a tarball (just a nice touch.)

RELEASE could maybe be moved into an environment variable, but I just
took the structure of it from GHC as it does something similar in its
own configure.ac

Adam, I'll leave the regeneration of configure.ac if you want these
patches to you. These just touch the files to keep it small.

-- 
Regards,
Austin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compiler_version.patch
Type: application/octet-stream
Size: 3147 bytes
Desc: not available
URL: <http://www.impredicative.com/pipermail/ur/attachments/20110724/73e329cd/attachment.obj>


More information about the Ur mailing list