Subject: Re: Build from Tues night fails ...
To: None <rvb@sicily.odyssey.cs.cmu.edu>
From: Bill Studenmund <skippy@macro.stanford.edu>
List: current-users
Date: 07/08/1998 20:10:14
On 8 Jul 1998 rvb@sicily.odyssey.cs.cmu.edu wrote:

> There are two problems:
> 
> 	The first has to do with building in an obj tree.  In
> /usr/src/gnu/usr.bin/gcc/cc1plus/Makefile, we have the 
> following dependency:
> lex.c pt.c spew.c: parse-h
> This works fine if you do not have an obj dir, but if you do
> it will try to find lex.c and friends in obj rather than ${.CURDIR}.
> The following will work:
> .if exists(obj)
> ./lex.c ./pt.c ./spew.c: parse-h
> .else
> lex.c pt.c spew.c: parse-h
> .endif
> But it's hardly, esthetic.  Is there a better solution.
> 	This same problem happens with:
> /usr2/src/usr.sbin/gspa/gspa/Makefile
> 
> I'll commit the suggested fix Friday, if nothing better gets
> discussed by then.

Please just make sure that this fix will work w/ OBJMACHINE setups, too.
I.E. obj.i386, obj.mac68k etc.

Wait. lex.c, pt.c, and spew.c get generated, don't they? If so, then they
SHOULD go in obj. If they are not generated by the Make system, then they
shouldn't depend on parse-h.

With OBJMACHINE setups, you can have multiple different architectures
living in the same source tree. Through either nfs mounts by different
ARCH hosts or cross-compiling, you can have differently-configured
compilers and linkers traversing the same source tree.

If these three files are generated, it's not certain that they should be
generated the same for the different architectures. Thus they should go in
obj's.

Or did I miss something.

Take care,

Bill