Subject: Re: Overriding /usr/share/mk/sys.mk in make ...
To: None <tech-ports@NetBSD.ORG>
From: Dale Rahn <drahn@pacific.urbana.mcd.mot.com>
List: tech-ports
Date: 10/04/1995 11:10:18
Forwarded message:
>From drahn Wed Oct  4 11:07:40 1995
Subject: Re: Overriding /usr/share/mk/sys.mk in make ...
To: dan@anarres.mame.mu.oz.au (Daniel Carosone)
Date: Wed, 4 Oct 1995 11:07:40 +0000 (CDT)
In-Reply-To: <199510030402.OAA06385@anarres> from "Daniel Carosone" at Oct 3, 95 02:02:05 pm
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 1474      

> 
> 
> > > i think that a flag (perhaps and environment variable) that allows
> > > one to specify the location of the default system make directory
> > > (i.e. use the value provided by the flag, or use /usr/share/mk) would
> > > be better.
> > 
> > Fine by me,  just can someone else nominate the flag (letter) I should
> > add (I'm not game to :-)
> 
> I can offer a suggestion of -F (by extension of "-f makefile") In a
> quick check, NetBSD, Solaris, and GNU make do not use this, or at
> least do not document it.
> 
> I thought of -P (for path), but Solaris uses that for something else.
> 
I recently ran into this problem attempting to create a cross compilation 
environment, I have the following simple fix. Just change the definition
for each of the programs in sys.mk
------
$  diff /usr/src/share/mk sys.mk
14c14
< AS=           as
---
> AS?=          as
21c21
< CC=           cc
---
> CC?=          cc
26c26
< CXX=          g++
---
> CXX?=         g++
31c31
< CPP=          cpp
---
> CPP?=         cpp
36c36
< FC=           f77
---
> FC?=          f77
46c46
< LEX=          lex
---
> LEX?=         lex
50c50
< LD=           ld
---
> LD?=          ld
53c53
< LINT=         lint
---
> LINT?=                lint
56c56
< MAKE=         make
---
> MAKE?=                make
58c58
< PC=           pc
---
> PC?=          pc
------

This is not necessarily all of the necessary changes.

I was thinking about send-pr'ing this, but have not done so yet.

Dale Rahn