Subject: bin/3436: dhcp doesn't build if OBJMACHINE is defined in /etc/mk.conf
To: None <gnats-bugs@gnats.netbsd.org>
From: Dave Huang <khym@bga.com>
List: netbsd-bugs
Date: 04/01/1997 19:43:35
>Number:         3436
>Category:       bin
>Synopsis:       dhcp doesn't build if OBJMACHINE is defined in /etc/mk.conf
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr  1 17:50:02 1997
>Last-Modified:
>Originator:     Dave Huang
>Organization:
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet: khym@bga.com   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 21 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
>Release:        NetBSD-current as of March 31, 1997
>Environment:
	
System: NetBSD dahan.metonymy.com 1.2D NetBSD 1.2D (SPIFF) #30: Mon Mar 31 23:09:08 CST 1997 khym@dahan.metonymy.com:/usr/src.local/sys/arch/i386/compile/SPIFF i386


>Description:
If OBJMACHINE is defined in /etc/mk.conf (to get per-machine object
directories, such as obj.i386, obj.mac68k, etc...), the link of dhcpd
will not get the correct path to libdhcp.a.

usr.sbin/dhcp/Makefile.inc includes bsd.obj.mk, but bsd.own.mk, which
includes /etc/mk.conf, hasn't been read in yet.

>How-To-Repeat:
define OBJMACHINE in /etc/mk.conf, make obj in usr.sbin/dhcp, make
depend, then make.

>Fix:
The following works for me... although perhaps bsd.prog.mk should be
changed to include bsd.own.mk before Makefile.inc?

--- /usr/src/usr.sbin/dhcp/Makefile.inc	Tue Apr  1 06:25:17 1997
+++ Makefile.inc	Tue Apr  1 19:32:40 1997
@@ -30,6 +30,7 @@
 # OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
+.include <bsd.own.mk>
 .include <bsd.obj.mk>
 
 .if exists(${.CURDIR}/../common/${__objdir})

>Audit-Trail:
>Unformatted: