Subject: misc/1546: Bug in /usr/share/mk/ when compiling *.cc to *.o
To: None <>
From: None <>
List: netbsd-bugs
Date: 09/29/1995 13:23:18
>Number:         1546
>Category:       misc
>Synopsis:       Missing ".o" in line 46 of /usr/share/mk/
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 29 15:50:04 1995
>Originator:     Martin Cracauer
>Release:        sup 19950927
System: NetBSD 1.0A NetBSD 1.0A (KNIGHT) #0: Thu Sep 28 14:53:29 MET 1995 i386


When compiling g++ libraries, the sequence
$ g++ -c -o target.o.o
$ ld -x -r target.o.o -o target.o
fails because the rule states 

@${LD} -x -r ${.TARGET} -o ${.TARGET}

instead of

@${LD} -x -r ${.TARGET}.o -o ${.TARGET}

which evaluates to:
$ g++ -c -o target.o.o
$ ld -x -r target.o -o target.o


cd /usr/src/gnu/lib/libg++/libg++

cd /usr/src/gnu/usr.bin/groff


For /usr/share/mk/

<       @${LD} -x -r ${.TARGET} -o ${.TARGET}
>       @${LD} -x -r ${.TARGET}.o -o ${.TARGET}