Subject: bin/2239: /src/usr.sbin/pppd/scanner.l includes y.tab.h which gets not found by
To: None <gnats-bugs@NetBSD.ORG>
From: Thorsten Frueauf <frueauf@ira.uka.de>
List: netbsd-bugs
Date: 03/18/1996 16:39:17
>Number:         2239
>Category:       bin
>Synopsis:       /src/usr.sbin/pppd/scanner.l includes y.tab.h which gets not found by 
         using BSDSRCDIR
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 18 11:05:03 1996
>Last-Modified:
>Originator:     Thorsten Frueauf
>Organization:
private
>Release:        <NetBSD-current source date> NetBSD current 17.03.1996
>Environment:
	
System: NetBSD di_frueauf 1.1A NetBSD 1.1A (CYBERDYNE) #2: Sat Mar 16 05:02:21 GMT 1996 milano@di_frueauf:/home/milano/source/netbsd-src/sys/arch/amiga/compile/CYBERDYNE amiga


>Description:
	
/src/usr.sbin/pppd/scanner.l includes y.tab.h which gets generated by lex.
If you set BSDSRCDIR and use `make obj` to get the object files to
/usr/obj/* y.tab.h is no longer found.

>How-To-Repeat:
	
Try the following on amiga/hp300:

cd /src/usr.sbin/pppd
setenv BSDSRCDIR `cd /usr/src; pwd`
make cleandir
make obj
make depend

Now watch:
mkdep -a -DHAVE_PATHS_H /src/usr.sbin/pppd/main.c /src/usr.sbin/pppd/magic.c /sr
c/usr.sbin/pppd/fsm.c /src/usr.sbin/pppd/lcp.c /src/usr.sbin/pppd/ipcp.c /src/us
r.sbin/pppd/upap.c /src/usr.sbin/pppd/chap.c /src/usr.sbin/pppd/md5.c /src/usr.s
bin/pppd/ccp.c /src/usr.sbin/pppd/auth.c /src/usr.sbin/pppd/options.c /src/usr.s
bin/pppd/sys-bsd.c /src/usr.sbin/pppd/demand.c /src/usr.sbin/pppd/gencode.c gram
mar.c scanner.c /src/usr.sbin/pppd/nametoaddr.c /src/usr.sbin/pppd/../../lib/lib
pcap/optimize.c /src/usr.sbin/pppd/../../sys/net/bpf_filter.c
/src/usr.sbin/pppd/scanner.l:40: y.tab.h: No such file or directory

make

Now watch:
cc -O -DHAVE_PATHS_H  -Werror  -c scanner.c
/src/usr.sbin/pppd/scanner.l:40: y.tab.h: No such file or directory

>Fix:
	
As a dirty hack include "obj/y.tab.h" instead of y.tab.h. I don't know
the proper fix, sorry.
>Audit-Trail:
>Unformatted:
/src/usr.sbin/pppd/scanner.l includes y.tab.h which gets not found by using BSDSRCDIR