Re: Gaining control of build dependency...

From: John Santos (JOHN_at_egh.com)
Date: 08/06/03


Date: Wed, 6 Aug 2003 16:11:47 -0400

On 6 Aug 2003, Bob Koehler wrote:

> In article <4ea25e04.0308051640.153088e4@posting.google.com>, brendan@scanoptics.com.au (Brendan Tregear) writes:
>
> > Sorry for the long post... Any ideas?
>
> Can't you do this with nested MMS files?
>
> descrip.mms:
> local_include_file DEPENDS_ON global_include_file
> RUN UTILITY COM FILE
> MMS/DESCRIPTION=descrip2.mms
>
> descrip2.mms:
> my_source_file DEPENDS_ON local_include_file

I'm not an MMS expert by any means, but I think it boils down to
the question: Does MMS assume that if there is a chain of dependencies,
it needs to rebuild everything, or does it re-evaluate the need to
rebuild at each step?

In other words, your utility that creates the local_include_file
could build it in a scratch area, compare the new version to the
existing version, and only replace the existing one with the new
one if they are materially different (where the utility determines
which differences are material.)

However, if MMS still insists on rebuilding the app because the
local_include_file must have changed since it is dependent on the
global include file, then it will still rebuild everything. On
the other hand, if MMS re-evaluates at each step, it will say
"okay, local depends on global, global is newer, rebuild local.
Next, app depends on local, local is older than app, no need to
rebuild." You still need to run your utility each time, so we
are assuming this is much faster then actually compiling and
linking.

Another possibility, does MMS allow you to define a callout to
determine "older"? Or is it just based on file creation/modification
dates? If it allows you to define a method to determine which
is older, you could use your utility to create a test version
of local_include_file from global_include_file, compare the test
version to the current version, and if identical, then return
the appropriate status to MMS.

HTH.

-- 
John Santos
Evans Griffiths & Hart, Inc.
781-861-0670 ext 539