VMMaker thoughts

Tim Rowledge tim at sumeru.stanford.edu
Tue Jan 1 00:37:46 UTC 2002


Lex Spoon wrote:
> 
> I've finally started playing with VMMaker, and have a few thoughts that
> might make it smoother, at least on Unix.
> 
> First, it doesn't really need to copy files around, does it?  It's no
> trouble to write the makefile, at least on Unix, to compile files
> directly from the two different locations.
This may well be true on unix, where the autoconf stuff allows the
makefile to be generated depending on the configuration. The hacking
about that I did basically made it look for any subdirectory of
'plugins' and compile each one as an external plugin. I imagine one
could make it find each 'plugin' sub-dir and then look back across to
the platforms/unix/plugins/{matching plugin name} in order to save
copying the files. Couldn't do it myself though! Other platforms do seem
to need the files copying, and thus making a special case for the unix
seemed pointless at the time. What I'd _really_ have liked is to use
links, but not many platforms do links in any sensible manner and there
is no Squeak interface to support them anyway.

If it seems worth the effort, it us possible to subclass VMMaker
(seeRiscOSVMMaker and MacOS....VMMaker for examples) and you could drop
the copying that way.
> 
> Finally, let's have some space in CVS for files that are shared among
> multiple platforms.
It's already there; it's called the 'Cross' platform in the tree. sq.h,
sqNamedPrims.c etc live there as do assorted plugin files like most of
the plugin.h files. Note that files in the Cross platform can be
overridden by the ones in the actual platform. As an example, there is a
default copy of sqConfig.h that would just make your compiler complain
if it were not overwritten. One thing I must try to get around to is
making an example platform loosely based on the old sqMacMinimal.c file. 

The nice part about copying files is that it results in a complete
source tree that you can pickle and save for archival purposes or send
to somebody else. The baddest part is that it is tempting to edit the
files in src/ and recompile rather than editingthe copy in /platforms
and rerunning VMMaker. I think there must be some decent heuristic to
check the datestamps and warn about overwritten files, maybe even suck
them back - but I haven't sat down and worked it through yet. Part of
the problem is that old bugbear of poor file access methods.

> In particular, libmpeg should be shared; it seems
> silly to copy all of libmpeg to each platform's MPEGPlugin subdirectory.
It is, and it isn't ....
>  Actually, from my quick glance, I don't see libmpeg in there at all.
> If it's not there, let's put it there!
... and it needs to be added to the SF repository and the unix makefile
stuff seems to need some update to make it make it. Lex, didn't you do a
hack to makefile.in that made it work for unix? Care to merge it into
the SF version of the make files?

tim

PS the explanation of the Cross platform etc is in the help window of
the VMMakerTool. Or at least, it should be.






More information about the Squeak-dev mailing list