[Simh] Makefile conditionals.

Peter Lund firefly at vax64.dk
Tue Oct 2 22:25:02 EDT 2007


On Tue, 2007-10-02 at 19:22 -0600, Brett Bump wrote:

> Hey, if it works (and works for most platforms), great.  I've actually
> seen the makefile improving quite a bit from the V2-V3 releases, but I
> dare say "I" don't want to be the one to suggest Makefile changes if there
> are people more competent with the conditional guesswork than myself.

uname/grep is the best thing I've found so far for platform tests -- but
changing them to feature tests instead is the right thing to do.  One of
the next things on my list.

> <snip>
> > Furthermore, the default POSIX shell (the one you get when you
> > run /bin/sh) is dash, not bash.  Dash is also the default shell for
> > users.  Dash is both very minimal and very POSIX compliant.  It does not
> > have the OSSHELL variable at all.
> 
> That (again), depends on what your running:
> 
> bash-3.00$ whereis bash
> bash: /bin/bash /usr/bin/bash
> bash-3.00$ whereis sh
> sh: /bin/sh
> bash-3.00$ ls -al /bin/sh
> lrwxrwxrwx  1 root root 4 2005-06-29 16:58 /bin/sh -> bash
> 
> Oops. ;-)

Err... yes.  I meant "default POSIX shell on Ubuntu".

This is why the makefile in the "Platform tests" email I sent out on
September 23 had the line "- at ls -l /bin/sh" in it :)

> (But Bill Joy might never forgive you for your comment ;-)

I'll never forget him for vi ;)

(Escape :q! enter.  I mean, come on!)

> > An other improvement would be to include the directory in the zipfile,
> > preferably with the version number encoded in it:
> >
> > simh-3.7-3/scp.c
> > simh-3.7-3/scp.h
> > simh-3.7-3/Interdata
> >  ...
> 
> YES!!
> 
> And while we're just making constructive "brain-storming" here, how about
> (even just short and simple) README, INSTALL, COPYING (gnu?), a COPYRIGHT
> or LICENSE (Bob would have to write this) files and a changelog file?

Yes please.

And could the changelog please be moved out of the source files, then?

>   I
> don't want to get all *nix-ish here, but that IS something I have come to
> depend on when installing most other packages.  I really have no issues
> with the pdf manuals (discussed a while back), but a few of these simple
> files (which could refer back to a larger manual) could be benificial.

Yep.  A README file would be absolutely brilliant.

> > (simh-3.7.3/ with a correspondingly named simh-3.7.3.zip would of course
> > be better.)
> 
> The hyphens don't bother me near as much as a wanting a simh-3.7-3.tgz or
> simh-3.7-3.bz2 does.

I don't understand what you mean here -- some of us are not native
speakers.  Do you mean "I would like something that isn't a zip file"?
Or is it the way the version number is formated you refer to?

> > in the 'build' branch.  Since I build each simulator in its own
> > directory, I needed to create directories on the fly anyway.
> >
> > -Peter
> >
> 
> As long as this doesn't conflict with the ability to still make "option" I
> don't see any problem with that.  Most of us are probably only making for
> one emulator anyway.

It doesn't.  There is no difference there.  The result ends up in the
BIN directory as before.

Except that you can now override the compiler flags and the compiler on
the command line, which can be quite handy sometimes:

	make CC=gcc-2.96 CFLAGS=-Os
	make CC=gcc-4.0.1 CFLAGS='-W -Wall'

The compiler can also be a wrapper program.  It doesn't have to support
compiling many source files and linking them in a single invocation like
the current makefile does.  Every source file is compiled once per
emulator (because they need to be compiled with different predefined
macros) and then linked together with a separate compiler invocation
each time.  That means that simpler wrapper scripts can be used.
The wrapper script (apgcc) that autopackage uses needs this.

-Peter




More information about the Simh mailing list