This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]