Bug in make(1)?

Pawel Jakub Dawidek nick at garage.freebsd.pl
Thu Apr 3 23:11:39 PST 2003


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. When file is compilated
'-o' isn't specified (gcc -c test/tst.c), but when executable file is
produced, gcc looks for tst.o in test directory (gcc -o tst test/tst.o).
And IMHO if gcc want to look for objects somewhere it should put them
there, so: gcc -o test/tst.o -c test/tst.c. Sometimes it is hard to
change.

-- 
Pawel Jakub Dawidek                       pawel at dawidek.net
UNIX Systems Programmer/Administrator     http://garage.freebsd.pl
Am I Evil? Yes, I Am!                     http://cerber.sourceforge.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 305 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20030404/a0d41802/attachment.bin


More information about the freebsd-hackers mailing list