Commit Graph

2 Commits

Author SHA1 Message Date
Julien Fischer
8e732885ff Rename the top-level of the compiler.
Currently, the compiler's top-level module is the module 'top_level'.  This
means that the executable (or Java archive, or assembly) we generate is named
after that.  However, the rest of the system requires that the compiler
executable be named 'mercury_compile', so we currently rename it after it is
generated.  (At least, we do in C grades, in non-C grades the compiler
"executable" currently has the "wrong" name.)  Making this scheme work across
multiple backends and platforms leads to quite a bit of complication in the
build system.  This change simplifies matters by repurposing the
'mercury_compile' module to be the new top-level module; this means that the
executable is generated with the correct name to begin with.

compiler/mercury_compile.m:
     Shift the existing contents of this module to  new module,
     mercury_compile_main.

     Shift this module out of the top_level package and export main/2 from it.

compiler/mercury_compile_main.m:
     New module that contains the old contents of mercury_compile.m.

compiler/top_level.m:
     Conform to the above changes.

     Delete the definition of main/2 from this module.

compiler/make.m:
compiler/make.module_target.m:
     Conform to the above changes.

compiler/Mmakefile:
     Conform to the change in the name of the top-level module.

    Delete the rule for renaming the compiler executable.

Mmakefile:
    Update the dep_compiler target.

compiler/notes/compiler_design.html:
    Update this document.

scripts/mercury_compile.sh-csharp:
scripts/mercury_compile.sh-java:
    Update these scripts.

compiler/.gitignore:
    Conform to the above changes and generally update
    this file.

configure.ac:
tools/binary_step:
tools/bootcheck:
    Update the top-level module.
2016-02-17 20:13:33 +11:00
Julien Fischer
18c9eecbce Make it possible to run an installed compiler built in the C# grade.
scripts/mercury_compile.sh-csharp:
   Add a script script that runs an installed compiler built in the C#
   grade using Mono.  As with compilers built in the Java grade, the
   wrapper script we generate in the compiler directory only works
   in situ and we require a separate script for the installed version.

   XXX TODO: we will need to handle .NET differently, probably by simply
   renaming top_level.exe -> mercury_compile.exe.

scripts/Mmakefile:
    Install the new script if the compiler was built in the C# grade.
2015-12-18 00:04:05 +11:00