[gnu.g++.bug] 1.34.2 Makefile strangeness...

pardo@JUNE.CS.WASHINGTON.EDU (04/29/89)

The `Makefile' for 1.34.2 (and maybe others) figures out what flags to
use by doing extensive comparisons of machine-dependent files.  This
seems kludgy to me for two reasons: first, because it reqires a bunch
of machine dependencies to be scattered through the makefile, and
second because it looks strange when I run a `make'.  The second is a
problem, because I don't expect to see `68000' when I'm making for a
VAX!

I'll suggest that a bunch of these things could be packaged up in to a
single machine-dependent shell script, e.g., `config.flags'.  Much as
config.g++ takes a machine specifier, `config.flags' could take a
machine specifier and a flag name.

For maintainence reasons, it might be preferable to bundle config.g++
and config.flags together.

I could then do

	config.g++ `machine`
	make TARGET=`machine`

Hope this is useful!

	;-D on  ( A user's strangeness... )  Pardo

rfg@MCC.COM (Ron Guilmette) (04/29/89)

<pardo@june.cs.washington.edu> writes:
>The `Makefile' for 1.34.2 (and maybe others) figures out what flags to
>use by doing extensive comparisons of machine-dependent files.  This
>seems kludgy to me...

Are you saying that it is kludgy, or that it only seems to be?  If it
only seems to be (and if it works right anyway) then maybe you should
have addressed you comments to info-g++ rather that bug-g++.

>... first, because it reqires a bunch
>of machine dependencies to be scattered through the makefile...

True.

>second because it looks strange when I run a `make'.  The second is a
>problem, because I don't expect to see `68000' when I'm making for a
>VAX!

I suggest keeping your eyes closed during your makes ;-)

Believe it or not, this "kludge" is cleaner (well... more automated
anyway) than what preceeded it.

>I'll suggest that a bunch of these things could be packaged up in to a
>single machine-dependent shell script, e.g., `config.flags'.  Much as
>config.g++ takes a machine specifier, `config.flags' could take a
>machine specifier and a flag name.
>
>For maintainence reasons, it might be preferable to bundle config.g++
>and config.flags together.

The "right" way (and the simplest way) of getting all this stuff done more
cleanly would be to make crt0.c and ld.c include the config.h file (just like
all of the other source files for g++).  Then we could insert machine dependent
definitions into the appropriate xm-*.h or tm-*.h files.  That is how this
should have been done in the first place.  That is exactly what the xm-*.h
and tm-*.h files are for!

// Ron Guilmette  -  MCC  -  Experimental Systems Kit Project
// 3500 West Balcones Center Drive,  Austin, TX  78759  -  (512)338-3740
// ARPA: rfg@mcc.com
// UUCP: {rutgers,uunet,gatech,ames,pyramid}!cs.utexas.edu!pp!rfg