[m-rev.] for review: derive getopt.m and getopt_io.m from same template

Julien Fischer jfischer at opturion.com
Sat Sep 19 13:53:40 AEST 2020

Hi Zoltan,

On Sat, 19 Sep 2020, Zoltan Somogyi wrote:

> 2020-09-18 17:08 GMT+10:00 "Julien Fischer" <jfischer at opturion.com>:

> I did the cleanups to compiler/notes when I went there in search of
> documentation about how to build the source distribution.
> I didn't find anything relevant.

I don't recall there ever being such documentation; back in the day I
think there was a flag in one of the scripts that caused one of the
servers doing the nightly test to build and upload the source
distribution and then regnerate that portion of the web page.

> I did remember tools/test_mercury, but that script was last updated in 2013,
> and I have strong doubts as to whether it still works, since it contains
> the hard-coded names of machines that haven't existed for years :-(

After we moved to git I kept the test_mercury script around for
reference purposes; it can probably be deleted now as the stuff managing
the test server is in now in the mercury-testing repository.

> I did find build_srcdist, updated its style (see attached diff), but found it
> quite hard to use, partly because of the lack of documentation,

That diff looks fine.

> but partly also because its job seems to be unnecessarily error prone.
> For example, doing "build_srcdist ... > errs" will delete the errs
> file before you can look at it.

> What would be wrong with changing things so that build_srcdist
> - takes three arguments:
>  - the name of a directory containing a checked-out git workspace,
>  - the name of a temporary directory such as /tmp or /var/tmp, and
>  - something that specifies name of the final .tar.gz file, either directly,
>    or by specifying a version name.

It should specify the base name of the final _files_.  If XZ=xz is defined
in the environment then build_srcdist will also build .tar.xz file.

> - build_srcdist would then *copy* the named workspace to the tmp directory,
>  do its work *there*, *without* affecting the original workspace,
>  and then delete the copied workspace after it built the tar file,
>  unless a debugging flag asked for it to be retained for inspection.

I have no objections to that proposal


> If you think the idea is sound, I could change build_srcdist along the above
> lines, though you would have to do the final commit, since you would
> need to adjust the code invoking build_srcdist first.

It should be a small adjustment, so just give me a heads up when you


More information about the reviews mailing list