Subject: misc/2141: make rule for the assembler
To: None <gnats-bugs@NetBSD.ORG>
From: Lloyd Parkes <lloyd@pohutukawa.its.vuw.ac.nz>
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
>Last-Modified:
>Originator:     Lloyd Parkes
>Organization:
Victoria University of Wellington
Te Whare Wananga o te Upoko o te Ika a Maui
>Release:        NetBSD-current (but not very current)
>Environment:
System: NetBSD pohutukawa.its.vuw.ac.nz 1.1 NetBSD 1.1 (POHUTUKAWA) #6: Fri Feb 2 09:46:09 NZDT 1996 lloyd@pohutukawa.its.vuw.ac.nz:/usr/src/sys-1.1/arch/sparc/compile/POHUTUKAWA sparc


>Description:
	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
output").
>How-To-Repeat:
	% rm a.out sparc.o
	% touch sparc.s
	% make sparc.o
	% ls
>Fix:
To fix the problem, apply the following patch to /usr/share/mk/sys.mk.

*** sys.mk.orig Wed Feb 28 13:33:09 1996
--- sys.mk      Wed Feb 28 13:33:28 1996
***************
*** 139,145 ****
  .s:
        ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
  .s.o:
!       ${COMPILE.s} ${.IMPSRC}
  .s.a:
        ${COMPILE.s} ${.IMPSRC}
        ${AR} ${ARFLAGS} $@ $*.o
--- 139,145 ----
  .s:
        ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
  .s.o:
!       ${COMPILE.s} ${.IMPSRC} -o $@
  .s.a:
        ${COMPILE.s} ${.IMPSRC}
        ${AR} ${ARFLAGS} $@ $*.o
>Audit-Trail:
>Unformatted: