Subject: misc/2141: make rule for the assembler
To: None <gnats-bugs@NetBSD.ORG>
From: Lloyd Parkes <>
List: netbsd-bugs
Date: 02/28/1996 13:37:43
>Number:         2141
>Category:       misc
>Synopsis:       Make doesn't cause assembler source to be assembled properly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 27 20:05:00 1996
>Originator:     Lloyd Parkes
Victoria University of Wellington
Te Whare Wananga o te Upoko o te Ika a Maui
>Release:        NetBSD-current (but not very current)
System: NetBSD 1.1 NetBSD 1.1 (POHUTUKAWA) #6: Fri Feb 2 09:46:09 NZDT 1996 sparc

	If I have a file called sparc.s and I type 'make sparc.o', I
get a file called a.out rather than a file called sparc.o. This is
because the rule for .s files invokes as rather minimally, and the
default output filename is a.out (which is short for "assembler
	% rm a.out sparc.o
	% touch sparc.s
	% make sparc.o
	% ls
To fix the problem, apply the following patch to /usr/share/mk/

*** Wed Feb 28 13:33:09 1996
---      Wed Feb 28 13:33:28 1996
*** 139,145 ****
        ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
!       ${COMPILE.s} ${.IMPSRC}
        ${COMPILE.s} ${.IMPSRC}
        ${AR} ${ARFLAGS} $@ $*.o
--- 139,145 ----
        ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
!       ${COMPILE.s} ${.IMPSRC} -o $@
        ${COMPILE.s} ${.IMPSRC}
        ${AR} ${ARFLAGS} $@ $*.o