[Ur] PATCH: -version flags for urweb compiler

austin seipp as at hacks.yi.org
Sun Jul 24 17:44:41 EDT 2011


Damn, sorry for the atrocious formatting of the last email. I'll just
be sure to trust the autoformatting next time instead of second
guessing it.

Also, I neglected to mention the patch is just a simple diff that can
be applied by:

$ patch -p1 < /path/to/compiler_version.patch

(needs -p1 since it was generated by hg and adds someting to the path inside)

On Sun, Jul 24, 2011 at 4:38 PM, austin seipp <as at hacks.yi.org> wrote:
> 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
>



-- 
Regards,
Austin



More information about the Ur mailing list