Re: mrl installation and syntax question

Kurt Stirewalt ([email protected])
Thu, 25 May 1995 09:24:20 -0400

>We finally got gmake installed, but I am confused about what to do. I don't
>know how to use Imakefiles.

Yeah, it's a pain initially, but once the whole structure is built they're
very convenient.

>When I typed imake, I got an error message saying that imake.tmpl was not
>found. I assume that something is not right with my paths or the
>installation. Can you please send us am Email explaining how we are
>supposed to compile it?

Unfortunately, it is not that simple, at least not initially. You
need to follow these steps in order.

cd $(MMHOME)
create-structure
rccs get -package configure
rccs get -package object-system
rccs get -package rccs
cd $(MMHOME)/config
perl configure
cd ..
make World

This process will create Makefiles in all directories, sets up
the include files, runs makedepend, runs make all in all directories, and
finally installs binaries in $(MMHOME)/bin. After that you can just refer
to the binaries in $(MMHOME)/bin for "rccs", and "create-structure".
In the process of making these things, the mrl parser is also built, and
installed in $(MMHOME)/bin. Let me know if you have any problems.

The trick is that using this setup, you never have to call imake explicitly.
This is a good thing, as a typical invocation of imake involves command
line flags that point to these .tmpl files etc. Once you've done the
make World
step, all of the imake's in all of the subdirectories will have been invoked.
Should you ever change an Imakefile in the future (which is likely if you
add files to be compiled) you can do the following to re-run imake and bring
everything in sync:
- suppose you modified Imakefile in $MMHOME/src/Model/Object
- cd into the parent directory of Object ($MMHOME/src/Model)
- type
make Makefiles
this will go look at all of the subdirectories of the current
directory ($MMHOME/src/Model) one of which is Object and run
imake on the Imakefile in that directory.
So again, you never have to invoke imake explicitly. Really once you've done
the initial configuration steps, the whole thing runs smoothely.

>Regarding mrl syntax, do you have an example that shows how to include the
>documentation strings?

Oh sure. See below for the example (a snippet from the presentation mrl
with a Description paragraph that documents the attributes of object Guide).
Actually, I've modified the pres.mrl to reflect the syntactic changes that we
mentioned the other day (like using Sequence instead of collection). Since
you're about to remake the world, I will go ahead and distribute the new mrl
parser, and the new pres.mrl (appl.mrl and task.mrl will soon follow).

By the way. How's the object system coming along?

-- kurt.

Enum Direction {
Horizontal,
Vertical
};

Object Expression;

Object Guide {
attribute dir : Direction;
attribute position : Double /* Float */ ;
attribute margin1 : Double /* Float */;
attribute margin2 : Double /* Float */;

is_like inherits (dir,position,margin1,margin2);
};

Description Guide {
attribute dir "The direction";
attribute position "The position";
attribute margin1 "The first margin";
attribute margin2 "The second margin";
};