Subject: port-i386/4013: i386/stand doesn't like objdirs
To: None <gnats-bugs@gnats.netbsd.org>
From: None <lm@cs.rmit.edu.au>
List: netbsd-bugs
Date: 08/19/1997 19:34:55
>Number:         4013
>Category:       port-i386
>Synopsis:       i386/stand doesn't work with objdirs
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 19 02:50:02 1997
>Last-Modified:
>Originator:     Luke Mewburn
>Organization:
>Release:        current-970716
>Environment:
System: NetBSD karybdis 1.2G NetBSD 1.2G (LUKEM) #7: Sun Aug 17 14:04:56 EST 1997 lukem@karybdis:/z/src/current/src/sys/arch/i386/compile/LUKEM i386

>Description:
	whilst experimenting around with the new i386 boot code i
	discovered that the netboot stuff won't compile (if you
	uncomment out the relevant line in sys/arch/i386/stand/Makefile)
	if you're using objdirs

>How-To-Repeat:
	cd /sys/arch/i386/stand
	(edit Makefile so that "SUBDIRS=genprom netboot" is uncommented)
	make obj
	make

>Fix:
	apply this patch to sys/arch/i386/stand/Makefile.booters,
	based on the solution I saw in usr.sbin/amd/Makefile.inc.

*** Makefile.booters.orig	Tue Aug 19 19:18:44 1997
--- Makefile.booters	Tue Aug 19 19:22:23 1997
***************
*** 8,18 ****
  BSSTART= start_bootsect.o fraglist.o bootsectmain.o biosdisk_ll.o bios_disk.o diskbuf.o
  .PATH: ${.CURDIR}/../lib/crt/rom
  ROMSTART= start_rom.o
! .if exists(${.CURDIR}/../genprom/obj)
! GENPROM= ${.CURDIR}/../genprom/obj/genprom
! .else
! GENPROM= ${.CURDIR}/../genprom/genprom
! .endif
  .PATH: ${.CURDIR}/../lib/crt/dos
  DOSSTART= start_dos.o doscommain.o exec_fromdos.o
  
--- 8,15 ----
  BSSTART= start_bootsect.o fraglist.o bootsectmain.o biosdisk_ll.o bios_disk.o diskbuf.o
  .PATH: ${.CURDIR}/../lib/crt/rom
  ROMSTART= start_rom.o
! GENPROM!= cd ${.CURDIR}/../genprom;\
!     printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/genprom\n" | ${MAKE} -s -f-
  .PATH: ${.CURDIR}/../lib/crt/dos
  DOSSTART= start_dos.o doscommain.o exec_fromdos.o
  
>Audit-Trail:
>Unformatted: