Notes on Mac.  version of ILU

   From: Antony Courtney <courtney@parc.xerox.com> 
   Date: Fri, 10 Sep 1993 16:54:01 -0700 
   To: ilu-core.PARC@xerox.com 


This is a short "as-is" guide to the Mac. port of ILU.  I would have liked to
have gotten a more substantial "release" done which resolved some of the
thorny release engineering issues (like some mechanism for locating the
SunRPCRegistry file), but c'est la vie...

On Fellini, things are organised under the directory
Fellini:Antonys source:ILU:.  (The ':' is the pathname seperator under MPW,
just to be different from Unix).  In each directory, there exists an MPW 
Makefile, named xxx.make.  To build any of the libraries or applications:
        1. start the MPW shell
        2. do a "Set Directory" from the "Directory" menu to the appropriate
        directory
        3. do a "buildprogram xxxx"<enter>, where xxxx corresponds to the
        file names xxxx.make in that directory.  Note that the <enter> key
        is distinct from the <return> key, and is located in the lower-right
        hand corner of the keyboard, in the numeric keypad.

That's basically all that's required for building tools.

Makefiles:

Note that there is no "imake" on the Mac, so all of the Makefiles in these
directories were generated by hand.  To make matters worse, the Mac uses weird
characters like <option>-f to specify dependencies, so it's probably not really
possible to create them using an editor on the Unix side.  (I've often thought
it would be nice to have some sort of Unix utility which automatically
generates these, but never got round to it...)

Bison dependency:

I obtained the Mac. port of GNU bison in order to compile and build the C++
stubber.  This is already installed on Fellini, and is integrated into the
configuration there.  (That is, bison works as an MPW tool, and the path is
set up by the MPW startup scripts).

C++ Stubber:

The makefiles as they stand now do not automatically run the C++ stubber which
has been ported to the Mac.  In addition, the directory where the binary for
the C++ stubber lives is not automatically added to the path variable (called
the Commands variable in MPW, once again just to be different and annoying).
To run the C++ stubber from MPW do the following:

        1. Start the MPW shell
        2. Set the directory to the location of foo.isl
        3. type: Set Commands "{Commands},Fellini:Antonys source:ILU:C++ stubber:"<enter>.  Remember that <enter> is different from <return>.  Be careful to
        include the double quotes.  If the double quotes don't work, try some
        weird combination of double and single quotes, quotes within quotes,
        or anything else that works.  Or find someone who can comprehend the
        MPW rules on how quoting is supposed to work; I sure couldn't.
        4. type:  'c++-stubber' foo.isl<enter>.  Note the single quotes around
        c++-stubber.

Sun RPC Registry:

Fortunately, MPW has environment variables.  Unfortunately, the rest of the
Mac. doesn't.  Therefore, there is no nice, portable way to decide where the
SunRPCRegistry file is to be found.  (In a proper release for the Mac, the
user should be able to install ILU, including the registry, anywhere on the
system.)  It might be a thought to hard-code a location for the SunRPCRegistry
file, except hard-coding a pathname starting with Fellini: is highly
non-portable.  For now, I punted on the issues, and it just looks in the
current workding directory.  In addition, I never ported the
sunrpc-register-interface tool, so there is no way to add interfaces to the
registry short of ftp'ing them or cut-n'-paste'ing them.  This is all highly
suboptimal and should be cleaned up.

ILU NMS library:

The ilunms.cp is a bit of a mess.  It is currently hacked (for my Where Were 
We / Marquee) demo to use ilu-1.0 style naming even though it uses the guts
of the /project/rpc/current sources.  This should be updated to use the
updated form of naming.  Note that it is only ilunms.cp which has to be brought
over again.  Note also that this should just be a simple recompile.  Note also
that Macintosh C++ sources must end with the suffix ".cp" just to be different
and annoying, and make it so you can't just batch transfer all the source with
ftp.  That'd be far too easy.  To change the filenames, just do:
        rename foo.cc foo.cp<enter>
from the MPW shell.

ILU_DEBUG environment variable:

For those ILU clients which run as MPW tools, it is possible to turn on ILU
debugging.  Do the following:
        1. type: Set ILU_DEBUG ALL<enter>
        2. type: export ILU_DEBUG<enter>
        3. run the MPW tool.  Allow several minutes for the debugging
        information to scroll by.  Don't expect this to help much in the face
        of a crash, as the debug information might not have scrolled up enough
        to be visible before a crash.


That's a pretty good braindump of all the weird Mac. dependencies I can think
of for now.  About the only things that should be done before a proper
"release" happens, are that an auto-install script should be created which
installs a startup script in the MPW shell "startup scripts" directory which
adds the location of the C++ stubber to the Commands variable, the location
of the SunRPCRegistry should be "cleaned up", and sunrpc-register-interface
should be ported.

Note that there is a single source base for all of ILU which serves both the
Sun and the Mac.  The Mac. Makefiles #define the right symbol (MACOS), so it
should be possible to just ftp and compile the sources, with the caveat that
C++ sources must be renamed from ".cc" to ".cp".

        -antony

