Subject: port-mac68k/4476: dependencies aren't generated for kernel .s files
To: None <>
From: Dave Huang <>
List: netbsd-bugs
Date: 11/12/1997 20:23:20
>Number:         4476
>Category:       port-mac68k
>Synopsis:       dependencies aren't generated for kernel .s files
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 12 18:35:01 1997
>Originator:     Dave Huang
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet:   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 22 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
>Release:        NetBSD-1.3_ALPHA as of November 11, 1997
System: NetBSD 1.3_ALPHA NetBSD 1.3_ALPHA (SPIFF) #160: Sun Nov 9 01:36:40 CST 1997 i386

	When doing a "make depend" in the kernel compile directory, no
dependecies for the assembler (.s) files are generated. This makes
things like MRG_ADB being a defopt less than useful; files like
macromasm.s don't get reassembled. And of course, bad things may
happen if some other dependency of a .s file gets changed, but the .s
file doesn't get reassembled.

	I guess this is 'cuz mkdep does a cc -M to get the dependency
list, but cc sees the .s extension and doesn't want anything to do
with the file.
	cd into your kernel compile dir, make depend, grep \\.s .depend,
note lack of output.
	This is how the i386's Makefile does things, and it seems to
work for mac68k too:

--- /usr/src/sys/arch/mac68k/conf/Makefile.mac68k	Wed Oct  1 06:21:35 1997
+++ Makefile.mac68k	Wed Nov 12 20:19:19 1997
@@ -40,7 +40,7 @@
 		-Dmc68020 -Dmac68k
 CWARNFLAGS=	-Werror -Wall -Wstrict-prototypes -Wmissing-prototypes
 CFLAGS=		${DEBUG} ${COPTS} ${CWARNFLAGS} -msoft-float
-AFLAGS=		-traditional -D_LOCORE
+AFLAGS=		-x assembler-with-cpp -traditional-cpp -D_LOCORE
 LINKFLAGS=	-n -Ttext 0 -e start
@@ -67,7 +67,7 @@
 # HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
-NORMAL_S=	${CPP} ${AFLAGS} ${CPPFLAGS} $< | sed -e 's/^\#.*//' | ${AS} -o ${.TARGET}