xref: /freebsd/usr.bin/vi/Makefile (revision 884a2a699669ec61e2366e3e358342dbc94be24a)
1#
2# $FreeBSD$
3#
4
5SRCDIR=		${.CURDIR}/../../contrib/nvi
6
7CFLAGS+=	-DGTAGS
8
9#if using ncurses:
10CFLAGS+=	-DSYSV_CURSES
11
12WARNS?=	0
13
14VI=	nvi
15EX=	nex
16VIEW=	nview
17
18PROG=	nvi
19
20LINKS=	${BINDIR}/${VI} ${BINDIR}/${EX} ${BINDIR}/${VI} ${BINDIR}/${VIEW}
21LINKS+= ${BINDIR}/${VI} ${BINDIR}/vi ${BINDIR}/${EX} ${BINDIR}/ex
22LINKS+= ${BINDIR}/${VI} ${BINDIR}/view
23
24MAN=	${SRCDIR}/docs/USD.doc/vi.man/vi.1
25MLINKS+=vi.1 ex.1 vi.1 view.1
26MLINKS+=vi.1 nex.1 vi.1 nview.1 vi.1 nvi.1
27
28CATALOGS= dutch english french german polish ru_RU.KOI8-R spanish swedish \
29          uk_UA.KOI8-U
30NLLINKS= nl_NL
31ENLINKS= en_AU en_CA en_GB en_NZ en_US
32FRLINKS= fr_BE fr_CA fr_CH fr_FR
33DELINKS= de_AT de_CH de_DE
34ESLINKS= es_ES
35SVLINKS= sv_SE
36PLLINKS= pl_PL
37
38.PATH:	${SRCDIR}/common
39.PATH:	${SRCDIR}/ex
40.PATH:	${SRCDIR}/cl
41.PATH:	${SRCDIR}/vi
42
43CFLAGS+=-I${.CURDIR} -I${SRCDIR} -I${SRCDIR}/include
44
45DPADD=		${LIBNCURSES}
46LDADD=		-lncurses
47
48CLEANFILES+=${EX}
49
50# Vi curses sources
51SRCS+=	cl_bsd.c cl_funcs.c cl_main.c cl_read.c cl_screen.c cl_term.c
52
53# General sources.
54SRCS+=	cut.c delete.c exf.c key.c line.c log.c main.c mark.c msg.c options.c \
55	options_f.c put.c screen.c search.c seq.c recover.c util.c
56
57# Ex source.
58SRCS+=	ex.c ex_abbrev.c ex_append.c ex_args.c ex_argv.c ex_at.c ex_bang.c \
59	ex_cd.c ex_cmd.c ex_cscope.c ex_delete.c ex_display.c \
60	ex_edit.c ex_equal.c ex_file.c ex_filter.c ex_global.c \
61	ex_init.c ex_join.c ex_map.c ex_mark.c ex_mkexrc.c ex_move.c \
62	ex_open.c ex_preserve.c ex_print.c ex_put.c ex_quit.c \
63	ex_read.c ex_screen.c ex_script.c ex_set.c ex_shell.c \
64	ex_shift.c ex_source.c ex_stop.c ex_subst.c ex_tag.c \
65	ex_txt.c ex_undo.c ex_usage.c ex_util.c ex_version.c ex_visual.c \
66	ex_write.c ex_yank.c ex_z.c ex_tcl.c ex_perl.c
67
68# Vi source.
69SRCS+=	getc.c v_at.c v_ch.c v_cmd.c v_delete.c v_ex.c v_increment.c v_init.c \
70	v_itxt.c v_left.c v_mark.c v_match.c v_paragraph.c v_put.c v_redraw.c \
71	v_replace.c v_right.c v_screen.c v_scroll.c v_search.c v_section.c \
72	v_sentence.c v_status.c v_txt.c v_ulcase.c v_undo.c \
73	v_util.c v_word.c v_xchar.c v_yank.c v_z.c v_zexit.c vi.c
74
75# Vi screen source.
76SRCS+=	vs_line.c vs_msg.c vs_refresh.c vs_relative.c vs_smap.c vs_split.c
77
78FILES=	${CATALOGS:S;^;${SRCDIR}/catalog/;}
79FILESDIR= /usr/share/vi/catalog
80SYMLINKS=
81.for l in ${NLLINKS}
82SYMLINKS+= dutch ${FILESDIR}/$l.ISO8859-1
83SYMLINKS+= dutch ${FILESDIR}/$l.ISO8859-15
84.endfor
85.for l in ${ENLINKS}
86SYMLINKS+= english ${FILESDIR}/$l.ISO8859-1
87SYMLINKS+= english ${FILESDIR}/$l.ISO8859-15
88SYMLINKS+= english ${FILESDIR}/$l.US-ASCII
89.endfor
90SYMLINKS+= english ${FILESDIR}/POSIX
91SYMLINKS+= english ${FILESDIR}/C
92.for l in ${FRLINKS}
93SYMLINKS+= french ${FILESDIR}/$l.ISO8859-1
94SYMLINKS+= french ${FILESDIR}/$l.ISO8859-15
95.endfor
96.for l in ${DELINKS}
97SYMLINKS+= german ${FILESDIR}/$l.ISO8859-1
98SYMLINKS+= german ${FILESDIR}/$l.ISO8859-15
99.endfor
100.for l in ${ESLINKS}
101SYMLINKS+= spanish ${FILESDIR}/$l.ISO8859-1
102SYMLINKS+= spanish ${FILESDIR}/$l.ISO8859-15
103.endfor
104.for l in ${SVLINKS}
105SYMLINKS+= swedish ${FILESDIR}/$l.ISO8859-1
106SYMLINKS+= swedish ${FILESDIR}/$l.ISO8859-15
107.endfor
108.for l in ${PLLINKS}
109SYMLINKS+= polish ${FILESDIR}/$l.ISO8859-2
110.endfor
111
112.include <bsd.prog.mk>
113