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

Terry Newton wtn90125 at yahoo.com
Thu Sep 18 20:14:12 EDT 2008


--- On Thu, 9/18/08, Philipp Hachtmann <hachti at hachti.de> wrote:

> You can understand the head of the old makefile? I
> don't.

Actually, I think I do... just a few conditionals with
options for each environment. If I want to say add -O9
for my environment I can immediately see where to put it.
Not that I can't with the new proposal, was just all
the other stuff that threw me, especially the comments
about things needing to be redone, be careful, etc.

> >> Doing fancy stuff is asking for problems,
> Where is the fancy stuff?

The stuff the comments say to be careful with? (sorry:-)

> Everything is quite
> straightforward.

IF one understands a particular brand of make, and not
everyone is a make expert. So long as it "just works"
I don't really care one way or another. My main concern
was that the extra complication would result in cases
where it did not work, where before it worked, and in
such cases being confronted with a complex script the
user might not understand can be quite frustrating.

Not saying there's anything wrong with the proposed
makefile, but the makefile is one of the most important
pieces of infrastructure in a package and all things
and all platforms must be considered, and it must be
tested thoroughly on all platforms SimH is currently
used on. This is not a trivial matter!

> Yes, the Makefile is for GNU make. I could imagine that one
> could 
> provide the old makefile for compatibility with other
> makes.

That would be wise. GNU make is a popular version,
but does everyone use it? does every version of it
behave the same? What if someone wanted to compile
SimH for an embedded platform? Not that these are
real issues, but seems like the safer thing to do
(requiring FAR less testing) would be to leave the
existing makefile alone, and include or make available
the new makefile for programmers (as the reason for it
is a good one - if you're a programmer).

> With the old Makefile, there are no intermediate object
> files, leading 
> to the fact that if for example scp.c changes, everything
> has to be 
> rebuilt. That's time consuming and annoying.
> With the new Makefile, only the object files that are out
> of date are 
> rebuilt, and then make automatically rebuilds the affected
> applications.
> That's not magic, that's simply the correct use
> case for make.

Thanks, that is a good reason. At least for folks working
on the common code. I tend to only make changes to a
particular simulator so wasn't seeing the inefficiency.
For the default makefile though, I still have to question
the risk of depending on a particular kind of make until
it can be tested on every platform SimH is used on.
However it would be very useful as an option, then
no harm if it doesn't work.

> I wonder why my proposals are always rejected....

Not rejecting, was pointing out the risks of making
drastic changes to an important file - I may not know
much about make but I know all about things breaking
after "improving" them. I do it myself in my own
projects then it bites me later because I didn't
exercise every single code path. Which is usually
impossible to do with a single environment.

I'll try to fill in the details in the proposed
makefile and give it a shot.

Terry



      



More information about the Simh mailing list