Subject: Makefile.sparc unhelpful for Sun4 builds
To: NetBSD port-sparc mailing list <port-sparc@netbsd.org>
From: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
List: port-sparc
Date: 06/12/1999 19:02:16
Just trying to compile a new kernel for a 4/300.  Makefile.sparc has a file
list SFILES that contains (for GENERIC) :

  SFILES= $S/arch/sparc/sparc/bsd_fdintr.s \
          $S/arch/sparc/sparc/amd7930intr.s

If you try to configure a machine with neither floppy nor audio, you will end
up with an empty SFILES definition, and make depend will be unhappy.

Is the appended patch a reasonable solution?

J

-- 
          NetBSD - the most widely ported operating system available
 ---8<---------------------------- Cut here ---------------------------->8---
*** Makefile.sparc.dist Tue May 18 17:02:58 1999
--- Makefile.sparc      Sat Jun 12 15:50:47 1999
***************
*** 173,179 ****
  .depend: ${SRCS} assym.h param.c
	${MKDEP} ${AFLAGS} ${CPPFLAGS} ${SPARC}/sparc/locore.s
	${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
!	${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
	sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
	  ${CPPFLAGS} < ${SPARC}/sparc/genassym.cf
	@sed -e 's/.*\.o:.*\.c/assym.h:/' < assym.dep >> .depend
--- 173,181 ----
  .depend: ${SRCS} assym.h param.c
	${MKDEP} ${AFLAGS} ${CPPFLAGS} ${SPARC}/sparc/locore.s
	${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
! .ifdef ${SFILES}
!		${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
! .endif
	sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
	  ${CPPFLAGS} < ${SPARC}/sparc/genassym.cf
	@sed -e 's/.*\.o:.*\.c/assym.h:/' < assym.dep >> .depend