[Simh] A new version...

Philipp Hachtmann hachti at hachti.de
Fri Sep 19 12:18:24 EDT 2008


Hi,

> I tried the new makefile, the only edit I made to it was
> changing "bin" to "BIN".

That is just a question of flavor - I will change it. The Makefile 
generates the directory if it isn't there.
The directory can also be overridden on the command line.
Makes sense for constructs like:
make CC=gcc-x.y TARGET_DIR=something clean all
make CC=gcc-y.z TARGET_DIR=something_else clean all
etc.
> 
> With Ubuntu 8.04 w/ about 440 megs ram and about 900 megs swap
> the makefile works perfectly. Thanks for addressing the concern
> over recompiling, make hp2100clean hp2100 seems to work fine
> and solves that "problem" nicely. 

But attention, look at this:
make clean all    -- Build everything with "gcc".
make novaclean nova CC=gcc-x.y -- Refresh everything needed for nova

Now you have the following situation: All Nova files have been compiled 
with your desired compiler - as the common files, TOO! So your Nova is 
100% correct. If you now run a "make all" or "make" or "make pdp8", the 
other simulator is relinked with the new common objects - which are made 
by another compiler version.
That's the only issue you have to keep in mind.

 > I was surprised that the new
> make is much faster than using the stock makefile.

Didn't I tell? Try it out with "-j4" on a quad core machine - On my PC
the whole stuff builds in less tan 10s that way.

> The binaries
> came out yet another size by a fraction of a K or so but by now
> I'm used to that, compilers are just weird that way.

Yes, don't ask :)

> The only
> thing I need to do that I didn't have to do before is manually
> remove the object files... (very carefully) rm *.o followed by
> rm */*.o - this is acceptable since it gives the choice to
> leave them and speed up recompiles.. 

Why do you do that manually? "make clean" does that for you.
Or "novaclean" etc.
"clean" will delete: All generated build directories (for vax780 for 
example), the bin directory and all generated .o files.
"novaclean" will delete all object files needed to build nova. Including 
the common objects, if they're included in the Makefile.

Btw, there is a newer version of the Makefile bundled with the
libreadline-hack on http//hachti.de/simh.

> noted when I removed
> the "bin" dir and binaries and edited for BIN instead, took
> just a second to recreate all the binaries.

:-)

> Ok for use under Linux I'm sold, the new makefile appears
> to be better. But only for use under *nix environments...

Freely speeking, I have to admit that it's a *nix Makefile, yes. I don't 
even have a suitable WIN* box to test ist.

> Under Windows XP running in VirtualBox with 192MB ram and
> a 512MB swap file, all I get is:
> 
> C:\simh380test>build_mingw.bat
> mingw32-make: *** virtual memory exhausted.  Stop.

Hm hm... Perhaps he wants MORE memory? Perhaps there's another problem? 
Would be cool to know the file working under Windows as well. What about 
cygwin? That's what I used under Windows.
I have heard that people managed to build a Linux kernel under cygwin...!

> This is with v3.80 of mingw32-make. The error occurs immediately
> with no other output, I rather doubt it actually used all of
> virtual memory (but maybe tried to grab more than was available).
> Working out the dependencies should require nowhere near the
> amount of memory available, although on the small side, I use
> this system to run fairly intense apps including 3D viewers so
> I suspect an incompatibility with the MinGW make program.
> Build_mingw.bat works fine with the stock makefile.

That's strange. As the present Makefile isn't really complex.
The Macros generate a lot of rules (one for each object file), that 
could be an issue. I have done this to be able to flexibly build objects 
in different dirs as their sources. This is needed because some sources 
are used several times for several simulators - but with different 
#define statements.

>>> The problem turned out to be the makefile requires
>> tabs
>> That's a common mistake. You should simply use the
>> "save as" command
> 
> Not an option with Yahoo mail, text attachments are converted
> to in-line and characters replaced as the service sees fit.
> And I sure don't want mailing lists etc taking up room on my
> hard drive so I'd rather not use a regular email client.

Ok, I understand. I use a "real client" with IMAP running on my 
hachti.de server. Mailing list postings are automatically sorted into 
folders and stored for the future. I have the last years of the simh 
list complete. And Classiccmp, too...

> OK folks I'm done with the makefile business for now (yay!),
> although educational I might have learned more than I wanted
> to know about make :-) if you want me to retest a different
> version under VirtualBox/XP let me know but for now it's back
> to HP21MX hacking - got a Z-Machine to try to write.

Thanks for giving it a try! Have fun with HP21MX! Eh, what are you doing 
for the HP? I have two E-Series machines without any idea what to do 
with them...

Best wishes,

Philipp :-)

-- 
http://www.hachti.de



More information about the Simh mailing list