aboutsummaryrefslogtreecommitdiff
path: root/lib/libpcap
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>1997-01-05 18:25:53 +0000
committerGarrett Wollman <wollman@FreeBSD.org>1997-01-05 18:25:53 +0000
commit01754f11597ef6edb8f58f38260eb260b1fb91fe (patch)
treeac3d71e1f15c654dab2acb97eb48e78ca6e86e35 /lib/libpcap
parentca6642fc764025dd0938bbc55559c562ecd73742 (diff)
downloadsrc-01754f11597ef6edb8f58f38260eb260b1fb91fe.tar.gz
src-01754f11597ef6edb8f58f38260eb260b1fb91fe.zip
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.
Notes
Notes: svn path=/head/; revision=21345
Diffstat (limited to 'lib/libpcap')
-rw-r--r--lib/libpcap/Makefile16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libpcap/Makefile b/lib/libpcap/Makefile
index 52deb1a4973b..6937205676fa 100644
--- a/lib/libpcap/Makefile
+++ b/lib/libpcap/Makefile
@@ -1,13 +1,13 @@
# Makefile for libpcap
-# $Id: Makefile,v 1.11 1996/08/21 16:50:08 pst Exp $
+# $Id: Makefile,v 1.12 1996/08/30 01:59:46 peter Exp $
LIB= pcap
-SRCS= pcap-bpf.c \
+SRCS= grammar.c tokdefs.h pcap-bpf.c \
pcap.c inet.c gencode.c optimize.c nametoaddr.c \
etherent.c savefile.c bpf_filter.c bpf_image.c \
- grammar.y scanner.l
+ scanner.c
MAN3= pcap.3
-CLEANFILES+= lex.yy.c tokdefs.h grammar.c scanner.c
+CLEANFILES+= tokdefs.h grammar.c scanner.c y.tab.c y.tab.h
DEFS= -DHAVE_SYS_IOCCOM_H=1 -DHAVE_SYS_SOCKIO_H=1 \
-DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 \
@@ -32,9 +32,9 @@ beforeinstall:
${DESTDIR}/usr/include
.endfor
-scanner.o: tokdefs.h
-
-tokdefs.h: grammar.c
- mv -f y.tab.h tokdefs.h
+tokdefs.h grammar.c: grammar.y
+ ${YACC} ${YACCFLAGS} -d ${PCAP_DISTDIR}/grammar.y
+ mv y.tab.c grammar.c
+ mv y.tab.h tokdefs.h
.include <bsd.lib.mk>