[Simh] Here comes a new Makefile - please try it and enhance it!

Terry Newton wtn90125 at yahoo.com
Fri Sep 19 01:58:21 EDT 2008


Followup on the followup...

--- On Thu, 9/18/08, Terry Newton <wtn90125 at yahoo.com> wrote:
> makefile:244: *** missing separator.  Stop.

The problem turned out to be the makefile requires tabs
preceding the indented make rules, when copy/pasted from
an email posting the tabs were converted to spaces.
Once I fixed that (and changing -I common to include .)
the test makefile worked perfectly.

Thanks to Linux_Prog_Environment.pdf from...
http://www.cs.txstate.edu/labs/tutorials/tut_docs/

And yes... make clean is supposed to remove the exe,
I was totally mistaken in thinking it only removed objects,
Once SimH is compiled it *is* installed, leading to my
incorrect assumption of thinking only the intermediate
objects should be removed.

A side note regarding "installation" - all my oldcomp
scripts point to [simh dir]/BIN (uppercase) so if that
changed, dozens of my shell scripts would also have to
change (but won't, I'd just have to edit the makefile
to make BIN uppercase again).

One implication of a proper makefile is with the old
"dumb" makefile I can force a recompilation of a single
binary (say to compile with a different gcc version)
by simply renaming or removing it, all objects it uses
will blindly be rebuilt. With the new makefile I have
to manually remove every object in the root and the
corresponding sim dir, or after making manually copy all
the binaries to another directory. But can't move them or
it'd rebuild (relink) everything again. As far as I can
tell there's no way to automate this - the "better" way
makes it more difficult to recompile a single sim using a
different gcc version (which due to the major differences
between different compilers happens quite often - I just
did to test the vax and I often recompile different sims
with different compilers in search of the one that works
the best). Also I can't help but wonder what would happen
if I forgot an object and mixed versions. Maybe nothing but
sounds risky, or at least would give misleading results.

This is a relatively minor hassle, but perfectly illustrates
how changing something like the makefile can have unintended
consequences. The stock makefile may be dumb but it is very
reliable, easy to understand and hack if needed.

A "proper" makefile is useful and should be available for
those that need it, but the way I see it, it only provides
a significant advantage if working on scp.c or one of the
other common source files, otherwise it gets in the way of
more down-to-earth usages by make/C dummies like me.
Consider the intended audience - oldcomp hackers. I'm into
HP21MX programming and exploring other old computers, NOT
PC programming. I just tolerate it long enough to make it
do what I want, then try to forget all that stuff (well not
totally, next time I have a malfunctioning makefile I'll
try to remember to check the tabs...).

Re: testing makefiles - please send to my email address
as an attached zip and I'll give it a try under Linux
and Windows to see how it does.

Terry



      



More information about the Simh mailing list