Delete reference without relevance.
[dragonfly.git] / sbin / route / Makefile
blob3a8cbf02fba2207a54c083c2b73b0752fab50ae9
1 # @(#)Makefile 8.1 (Berkeley) 6/5/93
2 # $FreeBSD: src/sbin/route/Makefile,v 1.11.2.3 2002/12/04 14:05:42 ru Exp $
3 # $DragonFly: src/sbin/route/Makefile,v 1.6 2006/10/17 00:55:43 pavalos Exp $
5 PROG= route
6 MAN= route.8
7 SRCS= route.c show.c keywords.h keywords.c
8 CFLAGS+=-I. -DNS
9 CFLAGS+=-DINET6
10 CLEANFILES+=keywords.h keywords.c _keywords.tmp
12 keywords.h:
13 echo -e "extern struct keytab {\n\tconst char\t*kt_cp;\n\tint\t\t kt_i;\n} keywords[];\n\n" > ${.TARGET}
14 sed -e '/^#/d' -e '/^$$/d' ${.CURDIR}/keywords > _keywords.tmp
15 tr a-z A-Z < _keywords.tmp | paste _keywords.tmp - | \
16 awk '{ \
17 if (NF > 1) \
18 printf "#define\tK_%s\t%d\n", $$2, NR }' \
19 >> ${.TARGET}
20 rm -f _keywords.tmp
22 keywords.c: keywords.h
23 echo -e "#include \"keywords.h\"\n\nstruct keytab keywords[] = {\n\n" \
24 > ${.TARGET}
25 sed -e '/^#/d' -e '/^$$/d' ${.CURDIR}/keywords > _keywords.tmp
26 tr a-z A-Z < _keywords.tmp | paste _keywords.tmp - | \
27 awk '{ \
28 if (NF > 1) \
29 printf "\t{\"%s\", K_%s},\n", $$1, $$2 }' \
30 >> ${.TARGET}
31 echo -e "\t{0, 0}\n};\n" >> ${.TARGET}
32 rm -f _keywords.tmp
34 .include <bsd.prog.mk>