Subject: bin/3556: make depend of bc fails if there is obj directory
To: None <>
From: None <>
List: netbsd-bugs
Date: 04/30/1997 08:04:17
>Number:         3556
>Category:       bin
>Synopsis:       make depend of bc fails if there is obj directory
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 29 16:20:01 1997
>Originator:     enami tsugutomo
	an individual
>Release:        NetBSD-current 1997 Apr 28
System: NetBSD 1.2D NetBSD 1.2D (PAVLOV) #241: Tue Apr 29 11:00:42 JST 1997 i386

	`make depend' of bc fails if there is obj directory.  It fails
	to create bc.c and/or bc.h.


Script started on Wed Apr 30 07:44:42 1997
enami@pavlov% cd /usr/src/gnu/usr.bin/bc
enami@pavlov% ls -ld obj/
drwxr-xr-x   2 enami    wheel         512 Apr 29 12:04 obj/
enami@pavlov% /usr/bin/make depend
yacc -d bc.y
yacc: f - cannot open "bc.y"
*** Error code 2

enami@pavlov% exit

Script done on Wed Apr 30 07:45:04 1997

	Here is my fix (why ${.IMPSRC} is expaneded to null string if
	bc.c exists but bc.h doesn't exists?  That's why I used
	.ALLSRC instead).

Index: Makefile
RCS file: /a/cvsroot/NetBSD/src/gnu/usr.bin/bc/Makefile,v
retrieving revision
diff -u -r1.1.1.2 Makefile
--- Makefile	1997/04/29 12:34:12
+++ Makefile	1997/04/29 22:42:41
@@ -11,8 +11,9 @@
 CLEANFILES+= bc.c scan.c bc.h
+beforedepend: bc.h
 bc.c bc.h: bc.y
-	$(YACC) -d bc.y
+	${YACC} -d ${.ALLSRC}
 	mv bc.c
 	mv bc.h