From owner-cvs-lib Sun Jan 5 14:23:42 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id OAA17580 for cvs-lib-outgoing; Sun, 5 Jan 1997 14:23:42 -0800 (PST) Received: from spinner.DIALix.COM (root@spinner.DIALix.COM [192.203.228.67]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id OAA17575; Sun, 5 Jan 1997 14:23:28 -0800 (PST) Received: from spinner.DIALix.COM (peter@localhost.DIALix.oz.au [127.0.0.1]) by spinner.DIALix.COM (8.8.4/8.8.4) with ESMTP id GAA24323; Mon, 6 Jan 1997 06:22:39 +0800 (WST) Message-Id: <199701052222.GAA24323@spinner.DIALix.COM> X-Mailer: exmh version 2.0beta 12/23/96 To: Garrett Wollman cc: Nate Williams , Garrett Wollman , CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-lib@freefall.freebsd.org Subject: Re: cvs commit: src/lib/libpcap Makefile In-reply-to: Your message of "Sun, 05 Jan 1997 16:46:44 EST." <9701052146.AA15506@halloran-eldar.lcs.mit.edu> Date: Mon, 06 Jan 1997 06:22:38 +0800 From: Peter Wemm Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Garrett Wollman wrote: > < sa id: > > >> Fix Makefile so that dependencies are actually right this time. > >> It is almost always the wrong thing to put .y and .l files directly > >> into the SRCS. > > > The original CSRG Makefiles always did this, so why do you consider it a > > bad thing? > > Because dependencies don't work (and can't work without extra effort). > > -GAWollman Yes. As Garrett says, if one has a source "scan.y", the SRCS entry should be "scan.c", not scan.y! Perhaps one day the 'make depend' might learn how to deal with .y files, but that's not real simple. The make rules know how to deal with this, but 'make depend' skips all the dependency info for scan.* if it's listed as 'scan.c'. When SRCS=scan.c, a 'make depend' runs yacc, generates scan.c and does a depend on it which picks up all the dependencies. scan.o depends on scan.c, and scan.c depends on scan.y. Cheers, -Peter