Re: Bug in make(1)?

2003-04-04 Thread Pawel Jakub Dawidek
On Thu, Apr 03, 2003 at 11:43:39PM -0800, Terry Lambert wrote: +> IMO, it's better to use ".PATH:", which makes the problem go away, +> by making the linker look for the objects where the compiler put +> them (instead of making the compiler put them where the linker is +> looking). See previous me

Re: Bug in make(1)?

2003-04-04 Thread Ruslan Ermilov
On Thu, Apr 03, 2003 at 11:43:39PM -0800, Terry Lambert wrote: [...] > IMO, it's better to use ".PATH:", which makes the problem go away, > by making the linker look for the objects where the compiler put > them (instead of making the compiler put them where the linker is > looking). See previous

Re: Bug in make(1)?

2003-04-03 Thread Terry Lambert
Pawel Jakub Dawidek wrote: > On Fri, Apr 04, 2003 at 02:03:35AM +0200, Dimitry Andric wrote: > +> Therefore, the simplest solution is to specify -o options everywhere. > +> I've attached a patch for /usr/share/mk/sys.mk that does this, but > +> please beware, it might break stuff which *expects* ou

Re: Bug in make(1)?

2003-04-03 Thread Terry Lambert
Pawel Jakub Dawidek wrote: > On Thu, Apr 03, 2003 at 01:50:59PM -0800, Marcel Moolenaar wrote: > +> Because you told make(1) to by virtue of including bsd.prog.mk > +> > +> OBJS is derived from SRCS by replacing the extension. If SRCS > +> contains foo/bar.c, OBJS will contain foo/bar.o... > > Yes

Re: Bug in make(1)?

2003-04-03 Thread Pawel Jakub Dawidek
On Fri, Apr 04, 2003 at 02:03:35AM +0200, Dimitry Andric wrote: +> Therefore, the simplest solution is to specify -o options everywhere. +> I've attached a patch for /usr/share/mk/sys.mk that does this, but +> please beware, it might break stuff which *expects* output files to +> always be put in t

Re: Bug in make(1)?

2003-04-03 Thread Pawel Jakub Dawidek
On Thu, Apr 03, 2003 at 01:50:59PM -0800, Marcel Moolenaar wrote: +> Because you told make(1) to by virtue of including bsd.prog.mk +> +> OBJS is derived from SRCS by replacing the extension. If SRCS +> contains foo/bar.c, OBJS will contain foo/bar.o... Yes, but take a look on compilation process

Re: Bug in make(1)?

2003-04-03 Thread Dimitry Andric
On 2003-04-03 at 23:23:00 Pawel Jakub Dawidek wrote: > IMHO make(1) should put .o files in current directory _and_ look for > them there when producing an executable file. Right? I think this is more of a gcc/g++ problem/feature. :) The info page says: If `-o' is not specified, the default

Re: Bug in make(1)?

2003-04-03 Thread Marcel Moolenaar
On Thu, Apr 03, 2003 at 11:23:00PM +0200, Pawel Jakub Dawidek wrote: > > Could someone please explain such make(1) behaviour: Because you told make(1) to by virtue of including bsd.prog.mk OBJS is derived from SRCS by replacing the extension. If SRCS contains foo/bar.c, OBJS will contain foo/bar

Bug in make(1)?

2003-04-03 Thread Pawel Jakub Dawidek
Hello hackers... Could someone please explain such make(1) behaviour: % pwd % /home/nick/src/testdir % find . . ./test ./test/tst.c ./Makefile % cat Makefile PROG= tst SRCS= test/tst.c .include