This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Makefile patch for BSD make
- From: Krister Walfridsson <cato at df dot lth dot se>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 Aug 2002 01:07:46 +0200 (MEST)
- Subject: Re: Makefile patch for BSD make
On Tue, 30 Jul 2002, DJ Delorie wrote:
> > -gengtype-lex.o : gengtype-lex.c gengtype.h gengtype-yacc.c \
> > +gengtype-lex.o : $(srcdir)/gengtype-lex.c gengtype.h $(srcdir)/gengtype-yacc.c \
>
> What happens when those files are generated in the build directory
> instead of the source directory? Many people argue against needing
> the source directory to be writable; any solutions they come up with
> will require that the vpath be used to find generated files like
> these.
Yes, this will need to be changed, but so will other similar lines in the
makefiles. But I think there are multiple ways of solving this in a
BSD make-friendly way (although I haven't dug into the files to determine
exactly which way is the best.)
What my patch does is making the Makefile consistent, in what I think
is a minimally intrusive way.
(Btw. I don't think vpath is needed to implemnt build with read-only
source directory; we could copy the file from $(srcdir) to the build
directory when it doesn't need to be re-generated...)
/Krister