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