VMMaker thoughts

Lex Spoon lex at cc.gatech.edu
Wed Jan 2 03:58:34 UTC 2002


> > 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. 

Yes, this is what I meant.  I've uploaded a new copy of SHA now that
works like this, i.e., files are pulled directly from platforms/unix and
platforms/Cross.

Also, if you have files "intplugins" and "extplugins", the script will
use those to decide which plugins to compile internally and externally. 
I haven't heavily tested the internal case, but it looks at least close.

By the way, SurfacePlugin has SurfacePlugin.c in the Cross directory. 
This fouled up my script, which isn't smart enough to deal with files
being overridden....



> 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.

I don't understand why any platform would care whether the
subdirectories were all merged together, but I'll admit, it's not a
terribly big deal.  The Unix port's makefile can just ignore the copied
files and use the originals directly, and the other ports can use the
copied files, and everyone can be happy.


> > 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. 

Ah, indeed libmpeg is in there.  Silly me.



> 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. 

Good point, that's kinda nice....


> 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.

You know, make is pretty good about this kind of thing.  Let it know the
original location, and the copied location, and if the timestamps of the
original is newer, then do a fresh copy.  Then again, if ou could figure
a way to tell make where the original file was, then you  wouldn't need
the copy, anyway.  :)


> 
> > 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 ....

I don't understand.  The files in platforms/Cross/Mpeg3Plugin *don't*
get copied?  Or is it only subdirectories that don't get copied?  Or
what?  My picture was that src/Mpeg3Plugin would be the union of:

	1. Mpeg3Plugin.[ch], generated from the image
	2. platforms/Cross/Mpeg3Plugin/*
	2. platforms/foo/Mpeg3Plugin/*


What am I missing?


> ... 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?

I'll do it whenever I find a few spare minutes; it should be pretty
close already....  I wouldn't mind being beaten to it, either, by the
way.  It'll take updating the mkMakefile scripts and re-running them.


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

I was reading the swiki page, and running VMMaker by hand.  I'll have to
grab VMMakerTool, but the swiki it is on seems to be unavailable right
now.


-Lex




More information about the Squeak-dev mailing list