Files
mercury/tools/make_arena
Zoltan Somogyi c0293832b7 Allow "mmc -C foo.m" when file.m contains module bar ...
... provided the source file map in Mercury.modules records this fact.

compiler/read_modules.m:
    When asked to compile a given file, look up the name of the module
    that we expect to find in that file in Mercury.modules, if it exists,
    instead of just assuming that it corresponds *exactly* to the filename.

compiler/source_file_map.m:
    Provide a predicate to provide the filename-to-modulename lookup
    now needed by read_modules.m. (Previously, we had only modulename-to-
    filename lookup.)

    Make the code constructing some error messages easier to read.

tools/make_arena:
    Copy compiler/Mercury.modules to the arena along with compiler/*.m.
    (The motivation for this change was that I wanted to profile the
    .profdeep compiler in workspace N by simply invoking "lmcN -C *.m"
    in the arena directory.)
2020-03-12 13:53:19 +11:00

33 lines
641 B
Bash
Executable File

#!/bin/sh
#
# Create and populate an arena directory for use in speed tests.
if test ! -d boehm_gc
then
echo "make_arena should be executed at the top level of a workspace"
exit 1
fi
if test -d arena
then
echo "make_arena: arena directory already exists"
exit 1
fi
mkdir arena
# Copy all the compiler source files into the arena.
cp compiler/*.m arena
# Copy the interface files and possibly optimization files they will need.
for dir in library mdbcomp compiler
do
cp $dir/*.int* arena
cp $dir/*.*opt arena > /dev/null 2>&1
done
# Copy all the auxiliary files.
cp compiler/Mercury.modules compiler/Mercury.options arena
exit 0