Subject: bin/3071: make's makefile.boot needs .c.o rule
To: None <gnats-bugs@gnats.netbsd.org>
From: Rolf Grossmann <grossman@securitas.net>
List: netbsd-bugs
Date: 12/29/1996 21:45:36
>Number:         3071
>Category:       bin
>Synopsis:       make's makefile.boot needs .c.o rule
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 29 12:50:01 1996
>Last-Modified:
>Originator:     Rolf Grossmann
>Organization:
	
>Release:        NetBSD-current as of today
>Environment:
	
System: BSD/OS blue 2.1 BSDI BSD/OS 2.1 Kernel #8: Mon Oct 21 11:18:11 MET DST 1996 grossman@blue:/.amd/cassiopeia/export/src/BSDI/sys/compile/BLUE i386


>Description:
	The makefile.boot used to bootstrap BSD make expects the lst libray
	objects in the library subdirectory. However the default make rules
	on the systems I've encountered (which I think even includes NetBSD,
	but I can't test it at the moment) simply call the compiler with -c,
	leaving object files in the current directory.

>How-To-Repeat:
	In the make directory type make -f Makefile.boot and watch the
	linker not find the files.

>Fix:
	Add a .c.o rule that explicitly directs the compliler to put object 
	files into the directory the source was, like with this patch:
*** make/Makefile.boot	Mon Oct 14 18:55:48 1996
--- Makefile.boot	Sun Dec 29 21:30:08 1996
***************
*** 32,35 ****
--- 32,38 ----
  #	nroff -h -man make.1 > make.0
  #	@echo 'make of make and make.0 completed.'
+ 
+ .c.o:
+ 	${CC} ${CFLAGS} ${CPPFLAGS} -o $@ -c $<
  
  clean:

>Audit-Trail:
>Unformatted: