Re: gmake SUCCEEDED

Kurt Stirewalt ([email protected])
Tue, 27 Jun 1995 15:52:29 -0400

>Kurt,
>I think we reached a milestone. gmake worked, I think.

Excellent! Good timing too (see below).

>it did make a lot of stuff. I noticed it didn't make rccs on the HP. I guess
>it was not supposed to, or was it?

Yes, there are still some errors in the build on both sides but these are
*real* errors - things that are not implemented yet. We currently don't make
rccs on the HPs. To be honest with you I'm not sure why, but the configuration
scripts explicitly prohibit building it on the HP's. Could it be because there
is no SCCS on the HPs? I had punted on it since you said you use the Sun
for all that stuff anyway, but will look at it again if you like.

>Now I have a question about setting up the HTML converter with an Imakefile.
>How do I do it. I noticed that some libraries were generated, so I assume I
>should be using them. I have no idea what to do.

Ok, there are two questions here and I'll answer them in sequence.
The procedure for building Makefiles from Imakefiles is as follows:
1) Create the Imakefile and put it in src/Clients (or wherever).
2) It's a pain to invoke imake by hand, so in this system we always
invoke imake through make. The idea is that there is a Makefile
in every directory that knows how to create the Makefiles in each
of its subdirectories. So to bootstrap the Makefile in src/Clients,
cd into src and type:
gmake Makefiles
which will make invoke imake to make the Makefiles of each
subdirectory. Now, this assumes that the Makefile in src knows
that Clients is a subdirectory (which at the moment it doesn't).
To tell it, you must edit the Imakefile in src from
MMSubdirs(Model)
to
MMSubdirs(Model Clients)
Now in src type:
gmake Makefile
gmake Makefiles
The 'gmake Makefile' recreated the Makefile in src by invoking
imake on the Imakefile that you just edited, and the
'gmake Makefiles' then goes into the subdirectories
creating Makefiles from Imakefiles as described above.
3) Test your Imakefile by doing:
gmake all
and editing the Imakefile to reflect errors. Remember that everytime
you change the Imakefile in src/Client you have to type
gmake Makefile
in src/Client

Now, as for what your Imakefile should look like, consider the following
template Imakefile:

SourceFiles(foo.c bar.c, bletch.cc fubar.cc)
MMDependTarget()
MMProgramTarget(mrl2html,
$(OBJS),
NullParameter,
-lobject_cpp -lamulet -lL -lm -lX11,
NullParameter)
AllTarget(mrl2html)
InstallFiles(mrl2html,$(MMHOME)/bin)

Your Imakefile will look very similar. To simplify, let's assume that this
client links with the CPP version as opposed to CORBA. The 2 macros that
you might change here are SourceFiles() and MMProgramTarget()
[also possibly AllTarget() and InstallFiles() if you want to name the tool
something other than mrl2html].

The SourceFiles macro takes 2 parameters seperated by a comma. The first
parameter is a space delimeted list of the .c files that compose your
system and the second parameter is a space delimited list of the .cc files
that compose your system. If you have no .c files then the 1st parameter needs
to be the macro NullParameter. No .cc files then the 2nd parameter needs
to be NullParameter. As an example, assume you had no .c files, then
your declaration would be:
SourceFiles(NullParameter, bletch.cc fubar.cc)

The MMProgramTarget macro takes 5 parameters:
1) The name of the executable to build
2) The name of the objects to use in the build (the .o files that
are created from the source files that you listed).
3) the library dependencies [ignore this for now (NullParameter)]
4) the local libraries [you shouldn't have to change these unless
I've forgotten one or you need to add another]
5) the system libraries [ignore this for now too (NullParameter)]

Hopefully this is everything. If something goes wrong, please ask, as you might
get cryptic error messages from imake.

>I distributed package html so you can look at the source code. I think the
>Imakefile should be pretty simple. I need the object system, and all the mrl
>generated files. Can you please set up an Imakefile for it? Also, after the
>Imakefile is set up, what do I do to compile it?

Do you really need the mrl generated files? Or the libraries that are created
when these generated files are compiled? Hopefully the latter.

>Also, I noticed you didn't change the name of the Clients directory. Let's
>hold off on that for a bit until we get all our people here working with the
>gmake setup and things work for everyone.

Yeah, I've been busy today trying to build Imakefiles and all that jazz for
the MTF parser. It still needs some cleaning up, but I'd like to have an
initial release out for people to start using...

>Thanks for getting this stuff to work!

No problem. Sorry it's taken so long. Talk to you tomorrow.

--kurt.