Makefile revision 103966
1139735Simp# $FreeBSD: head/lib/ncurses/ncurses/Makefile 103966 2002-09-25 14:19:51Z markm $
2129198Scognet
3129198ScognetNCURSES=${.CURDIR}/../../contrib/ncurses
4129198Scognet
5129198ScognetLIB=	ncurses
6129198ScognetSHLIB_MAJOR=5
7129198ScognetSHLIB_MINOR=0
8129198Scognet
9129198Scognet# Should be elsewhere
10129198ScognetAWK?=	awk
11129198ScognetTERMINFODIR?=	${SHAREDIR}/misc
12129198Scognet
13129198ScognetNCURSES_MAJOR!=egrep 'NCURSES_MAJOR[ 	]*=' ${NCURSES}/dist.mk | sed -e 's%^[^0-9]*%%'
14129198ScognetNCURSES_MINOR!=egrep 'NCURSES_MINOR[ 	]*=' ${NCURSES}/dist.mk | sed -e 's%^[^0-9]*%%'
15129198ScognetNCURSES_PATCH!=egrep 'NCURSES_PATCH[ 	]*=' ${NCURSES}/dist.mk | sed -e 's%^[^0-9]*%%'
16129198Scognet
17129198Scognet# From autoconf (!)
18129198ScognetNCURSES_CONST=		const
19129198ScognetNCURSES_XNAMES=		1
20129198ScognetNCURSES_OSPEED=		short
21129198ScognetNCURSES_CH_T=		chtype
22129198ScognetNCURSES_EXT_FUNCS=	1
23129198ScognetNCURSES_LIBUTF8=	0
24129198ScognetNCURSES_MBSTATE_T=	0
25129198ScognetBROKEN_LINKER=		0
26129198ScognetBUILTIN_BOOL=		1
27129198ScognetBOOL_TYPE=		0
28129198ScognetHAVE_VSSCANF=		1
29129198ScognetHEADER_STDBOOL=		1
30129198ScognetTYPE_OF_BOOL=		unsigned char
31129198ScognetTYPEOF_CHTYPE=		long
32129198ScognetWIDEC_SHIFT=		8
33129198ScognetSHIFT_LIMIT=		32
34129198ScognetONEUL=			1UL
35129198Scognet
36129198Scognet.PATH:  ${NCURSES}/ncurses
37129198Scognet.PATH:  ${NCURSES}/ncurses/base
38129198Scognet.PATH:  ${NCURSES}/ncurses/tinfo
39129198Scognet.PATH:  ${NCURSES}/ncurses/tty
40129198Scognet.PATH:  ${NCURSES}/ncurses/trace
41129198Scognet.PATH:  ${NCURSES}/include
42129198Scognet.PATH:  ${NCURSES}/man
43129198Scognet
44129198ScognetCFLAGS+=-I. -I${.CURDIR} -I${NCURSES}/ncurses -I${NCURSES}/include
45129198ScognetCFLAGS+=-Wall -DFREEBSD_NATIVE -DNDEBUG -DHAVE_CONFIG_H -DTERMIOS
46129198Scognet
47129198ScognetGENSRC= \
48129198Scognet	codes.c \
49129198Scognet	expanded.c \
50129198Scognet	fallback.c \
51129198Scognet	lib_gen.c \
52129198Scognet	lib_keyname.c \
53129198Scognet	names.c \
54159100Scognet	unctrl.c
55129198Scognet
56129198ScognetGENHDR= \
57129198Scognet	curses.h \
58239268Sgonzo	hashsize.h \
59239268Sgonzo	init_keytry.h \
60239268Sgonzo	ncurses_def.h \
61239268Sgonzo	nomacros.h \
62239268Sgonzo	parametrized.h \
63239268Sgonzo	term.h \
64245147Sgonzo	termcap.h \
65239268Sgonzo	unctrl.h
66239268Sgonzo
67239268Sgonzo# Installed
68239268SgonzoHEADERS=curses.h term.h termcap.h unctrl.h
69239268SgonzoSRCHDRS=ncurses_dll.h
70239268SgonzoINCS=	${HEADERS} ${SRCHDRS}
71239268SgonzoINCSLINKS= curses.h ${INCLUDEDIR}/ncurses.h
72236992Simp
73239268Sgonzo# Components of names.c and codes.c
74239268SgonzoNAMESRC=boolnames boolfnames numnames numfnames strnames strfnames
75239268SgonzoCODESRC=boolcodes numcodes strcodes
76239268Sgonzo
77239268SgonzoSRCS=	${GENHDR} ${GENSRC} \
78239268Sgonzo	access.c \
79239268Sgonzo	add_tries.c \
80239268Sgonzo	alloc_entry.c \
81239268Sgonzo	alloc_ttype.c \
82239268Sgonzo	captoinfo.c \
83129198Scognet	comp_captab.c \
84129198Scognet	comp_error.c \
85129198Scognet	comp_expand.c \
86222813Sattilio	comp_hash.c \
87159325Salc	comp_parse.c \
88159325Salc	comp_scan.c \
89129198Scognet	define_key.c \
90129198Scognet	doalloc.c \
91129198Scognet	free_ttype.c \
92129198Scognet	getenv_num.c \
93129198Scognet	hardscroll.c \
94129198Scognet	hashmap.c \
95240983Salc	home_terminfo.c \
96129198Scognet	init_keytry.c \
97129198Scognet	keybound.c \
98129198Scognet	keyok.c \
99244414Scognet	lib_acs.c \
100135641Scognet	lib_addch.c \
101237168Salc	lib_addstr.c \
102244414Scognet	lib_baudrate.c \
103195649Salc	lib_beep.c \
104129198Scognet	lib_bkgd.c \
105137362Scognet	lib_box.c \
106129198Scognet	lib_chgat.c \
107129198Scognet	lib_clear.c \
108129198Scognet	lib_clearok.c \
109129198Scognet	lib_clrbot.c \
110129198Scognet	lib_clreol.c \
111129198Scognet	lib_color.c \
112129198Scognet	lib_colorset.c \
113129198Scognet	lib_cur_term.c \
114129198Scognet	lib_data.c \
115129198Scognet	lib_delch.c \
116129198Scognet	lib_delwin.c \
117129198Scognet	lib_dft_fgbg.c \
118129198Scognet	lib_echo.c \
119250634Sgber	lib_endwin.c \
120129198Scognet	lib_erase.c \
121129198Scognet	lib_flash.c \
122129198Scognet	lib_freeall.c \
123244414Scognet	lib_getch.c \
124194459Sthompsa	lib_getstr.c \
125129198Scognet	lib_has_cap.c \
126129198Scognet	lib_hline.c \
127129198Scognet	lib_immedok.c \
128129198Scognet	lib_inchstr.c \
129129198Scognet	lib_initscr.c \
130129198Scognet	lib_insch.c \
131129198Scognet	lib_insdel.c \
132129198Scognet	lib_insstr.c \
133129198Scognet	lib_instr.c \
134129198Scognet	lib_isendwin.c \
135129198Scognet	lib_kernel.c \
136129198Scognet	lib_leaveok.c \
137129198Scognet	lib_longname.c \
138129198Scognet	lib_mouse.c \
139129198Scognet	lib_move.c \
140129198Scognet	lib_mvcur.c \
141129198Scognet	lib_mvwin.c \
142129198Scognet	lib_napms.c \
143129198Scognet	lib_newterm.c \
144129198Scognet	lib_newwin.c \
145129198Scognet	lib_nl.c \
146129198Scognet	lib_options.c \
147129198Scognet	lib_overlay.c \
148129198Scognet	lib_pad.c \
149159325Salc	lib_print.c \
150129198Scognet	lib_printw.c \
151129198Scognet	lib_raw.c \
152129198Scognet	lib_redrawln.c \
153129198Scognet	lib_refresh.c \
154222813Sattilio	lib_restart.c \
155129198Scognet	lib_scanw.c \
156250634Sgber	lib_screen.c \
157250634Sgber	lib_scroll.c \
158250634Sgber	lib_scrollok.c \
159144760Scognet	lib_scrreg.c \
160250634Sgber	lib_set_term.c \
161129198Scognet	lib_setup.c \
162129198Scognet	lib_slk.c \
163129198Scognet	lib_slkatr_set.c \
164129198Scognet	lib_slkatrof.c \
165129198Scognet	lib_slkatron.c \
166191873Salc	lib_slkatrset.c \
167191873Salc	lib_slkattr.c \
168129198Scognet	lib_slkclear.c \
169137362Scognet	lib_slkcolor.c \
170159325Salc	lib_slkinit.c \
171159325Salc	lib_slklab.c \
172159325Salc	lib_slkrefr.c \
173159325Salc	lib_slkset.c \
174159325Salc	lib_slktouch.c \
175159325Salc	lib_termcap.c \
176159325Salc	lib_termname.c \
177159325Salc	lib_tgoto.c \
178159325Salc	lib_ti.c \
179159325Salc	lib_touch.c \
180129198Scognet	lib_tparm.c \
181129198Scognet	lib_tputs.c \
182135641Scognet	lib_trace.c \
183129198Scognet	lib_tstp.c \
184129198Scognet	lib_ttyflags.c \
185164250Sru	lib_twait.c \
186129198Scognet	lib_ungetch.c \
187129198Scognet	lib_vidattr.c \
188138413Scognet	lib_vline.c \
189138413Scognet	lib_wattroff.c \
190250634Sgber	lib_wattron.c \
191250634Sgber	lib_winch.c \
192250634Sgber	lib_window.c \
193144760Scognet	memmove.c \
194250634Sgber	name_match.c \
195129198Scognet	nc_panel.c \
196129198Scognet	parse_entry.c \
197250634Sgber	read_entry.c \
198250634Sgber	resizeterm.c \
199250634Sgber	safe_sprintf.c \
200250634Sgber	setbuf.c \
201250634Sgber	sigaction.c \
202250634Sgber	strings.c \
203250634Sgber	tries.c \
204250634Sgber	tty_update.c \
205250634Sgber	varargs.c \
206250634Sgber	version.c \
207250634Sgber	visbuf.c \
208250634Sgber	vsscanf.c \
209250634Sgber	wresize.c \
210250634Sgber	write_entry.c
211250634Sgber
212250634Sgber# Currently unused, for debugging libncurses itself.
213129198ScognetDBGSRCS=lib_traceatr.c \
214129198Scognet	lib_tracebits.c \
215129198Scognet	lib_tracechr.c \
216129198Scognet	lib_tracedmp.c \
217129198Scognet	lib_tracemse.c \
218129198Scognet	trace_buf.c \
219129198Scognet	trace_tries.c \
220129198Scognet	trace_xnames.c
221129198Scognet
222129198Scognet# From our old libtermcap.
223129198Scognet# Used instead of the hideous read_termcap.c abomination.
224135641ScognetSRCS+=	termcap.c
225135641Scognet
226135641ScognetCLEANFILES+=	${GENSRC} ${GENHDR} keys.tries make_hash term.h.new \
227135641Scognet	make_keys MKterm.h.awk comp_captab.c curses.head \
228135641Scognet	namehdr nameftr codeftr ${NAMESRC} ${CODESRC}
229132056Scognet
230132056ScognetSYMLINKS+=libncurses.a ${LIBDIR}/libcurses.a
231129198ScognetSYMLINKS+=libncurses.a ${LIBDIR}/libtermcap.a
232129198ScognetSYMLINKS+=libncurses.a ${LIBDIR}/libtermlib.a
233129198ScognetSYMLINKS+=libncurses.a ${LIBDIR}/libmytinfo.a
234129198ScognetSYMLINKS+=libncurses.a ${LIBDIR}/libtinfo.a
235129198Scognet.if !defined(NOPIC)
236129198Scognet# no need for major at all, it's an ld-time redirection only
237129198ScognetSYMLINKS+=libncurses.so ${SHLIBDIR}/libcurses.so
238129198ScognetSYMLINKS+=libncurses.so ${SHLIBDIR}/libtermcap.so
239129198ScognetSYMLINKS+=libncurses.so ${SHLIBDIR}/libtermlib.so
240129198ScognetSYMLINKS+=libncurses.so ${SHLIBDIR}/libmytinfo.so
241129198ScognetSYMLINKS+=libncurses.so ${SHLIBDIR}/libtinfo.so
242129198Scognet.endif
243129198Scognet.if !defined(NOPROFILE)
244218311SimpSYMLINKS+=libncurses_p.a ${LIBDIR}/libcurses_p.a
245129198ScognetSYMLINKS+=libncurses_p.a ${LIBDIR}/libtermcap_p.a
246129198ScognetSYMLINKS+=libncurses_p.a ${LIBDIR}/libtermlib_p.a
247129198ScognetSYMLINKS+=libncurses_p.a ${LIBDIR}/libmytinfo_p.a
248247046SalcSYMLINKS+=libncurses_p.a ${LIBDIR}/libtinfo_p.a
249239268Sgonzo.endif
250129198Scognet
251156191ScognetDOCSDIR= /usr/share/doc/ncurses
252184728SrajDOCS=	ncurses-intro.html hackguide.html
253142570Scognet
254240983Salc.if !defined(NOHTML)
255129198Scognetafterinstall:
256129198Scognet.for file in ${DOCS}
257129198Scognet	cd ${.CURDIR}/../../contrib/ncurses/doc/html ; \
258129198Scognet	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 ${file} \
259129198Scognet		${DESTDIR}${DOCSDIR}
260129198Scognet.endfor
261129198Scognet.endif
262129198Scognet
263129198Scognet# Generated source
264129198Scognetnamehdr nameftr codeftr ${NAMESRC} ${CODESRC}: MKnames.awk Caps
265129198Scognet	${AWK} -f ${NCURSES}/ncurses/tinfo/MKnames.awk ${NCURSES}/include/Caps
266129198Scognet
267239268Sgonzo.ORDER: namehdr ${NAMESRC} ${CODESRC} nameftr codeftr names.c codes.c
268129198Scognet
269129198Scognetnames.c:	 namehdr ${NAMESRC} nameftr
270129198Scognet	cat namehdr ${NAMESRC} nameftr > $@
271129198Scognet
272169756Scognetcodes.c:	 namehdr ${CODESRC} codeftr
273169756Scognet	cat namehdr ${CODESRC} codeftr > $@
274129198Scognet
275129198Scognetlib_gen.c:	MKlib_gen.sh curses.h
276129198Scognet	sh ${NCURSES}/ncurses/base/MKlib_gen.sh "${CC} -E ${CFLAGS}" \
277129198Scognet	    "${AWK}" generated < curses.h >$@
278129198Scognet
279129198Scognetlib_keyname.c:	keys.list MKkeyname.awk
280129198Scognet	${AWK} -f ${NCURSES}/ncurses/base/MKkeyname.awk keys.list > lib_keyname.c
281129198Scognet
282129198Scognetunctrl.c:	MKunctrl.awk
283129198Scognet	echo | ${AWK} -f ${NCURSES}/ncurses/base/MKunctrl.awk > unctrl.c
284129198Scognet
285129198Scognetcomp_captab.c:	MKcaptab.awk Caps make_hash
286129198Scognet	sh ${NCURSES}/ncurses/tinfo/MKcaptab.awk "${AWK}" \
287129198Scognet	    ${NCURSES}/include/Caps > comp_captab.c
288129198Scognet
289129198Scognetexpanded.c:	MKexpanded.sh
290129198Scognet	sh ${NCURSES}/ncurses/tty/MKexpanded.sh "${CC} -E" ${CFLAGS} >expanded.c
291129198Scognet
292129198Scognetfallback.c:	MKfallback.sh
293129198Scognet	sh ${NCURSES}/ncurses/tinfo/MKfallback.sh > fallback.c
294129198Scognet
295129198Scognet# Generated headers
296171620Scognetncurses_def.h:	MKncurses_def.sh ncurses_defs
297171620Scognet	AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
298129198Scognet	    ${NCURSES}/include/ncurses_defs > ncurses_def.h
299129198Scognet
300171620Scognetnomacros.h:	MKlib_gen.sh curses.h
301171620Scognet	sh ${NCURSES}/ncurses/base/MKlib_gen.sh "${CC} -E ${CFLAGS}" \
302129198Scognet	    "${AWK}" generated < curses.h | fgrep undef > $@
303129198Scognet
304129198Scognetinit_keytry.h:	keys.list make_keys
305129198Scognet	./make_keys keys.list > init_keytry.h
306129198Scognet
307129198Scognethashsize.h:	MKhashsize.sh Caps
308129198Scognet	sh ${NCURSES}/include/MKhashsize.sh ${NCURSES}/include/Caps > $@
309129198Scognet
310129198Scognetparametrized.h:	MKparametrized.sh Caps
311129198Scognet	AWK=${AWK} sh ${NCURSES}/include/MKparametrized.sh \
312171620Scognet	    ${NCURSES}/include/Caps > $@
313171620Scognet
314129198Scognetterm.h:		MKterm.h.awk edit_cfg.sh Caps
315129198Scognet	${AWK} -f MKterm.h.awk ${NCURSES}/include/Caps > $@.new
316129198Scognet	sh ${NCURSES}/include/edit_cfg.sh ${.CURDIR}/ncurses_cfg.h $@.new
317129198Scognet	mv -f $@.new $@
318129198Scognet
319129198Scognetcurses.h:	curses.head MKkey_defs.sh Caps
320129198Scognet	cat curses.head > $@.new
321129198Scognet	AWK=${AWK} _POSIX2_VERSION=199209 sh ${NCURSES}/include/MKkey_defs.sh \
322129198Scognet	    ${NCURSES}/include/Caps >> $@.new
323129198Scognet	cat ${NCURSES}/include/curses.tail >> $@.new
324129198Scognet	mv -f $@.new $@
325129198Scognet
326129198Scognet# Generated intermediate files
327129198Scognetkeys.list:	MKkeys_list.sh Caps
328129198Scognet	AWK=${AWK} sh ${NCURSES}/ncurses/tinfo/MKkeys_list.sh \
329239268Sgonzo	    ${NCURSES}/include/Caps | sort > keys.list
330239268Sgonzo
331239268Sgonzo# Build tools
332239268Sgonzobuild-tools: make_hash make_keys
333239268Sgonzo
334129198Scognetmake_keys:	make_keys.c names.c ncurses_def.h ${HEADERS}
335129198Scognet	${CC} -o $@ ${CFLAGS} ${NCURSES}/ncurses/tinfo/make_keys.c
336129198Scognet
337129198Scognetmake_hash:	comp_hash.c hashsize.h ncurses_def.h ${HEADERS}
338129198Scognet	${CC} -o $@ ${CFLAGS} -DMAIN_PROGRAM \
339129198Scognet		${NCURSES}/ncurses/tinfo/comp_hash.c
340129198Scognet
341129198Scognet# ./configure generated
342129198ScognetMKterm.h.awk:	MKterm.h.awk.in
343129198Scognet	sed <${NCURSES}/include/MKterm.h.awk.in >$@ \
344129198Scognet	    -e "/@NCURSES_MAJOR@/s%%${NCURSES_MAJOR}%" \
345129198Scognet	    -e "/@NCURSES_MINOR@/s%%${NCURSES_MINOR}%" \
346129198Scognet	    -e "/@NCURSES_CONST@/s%%${NCURSES_CONST}%" \
347129198Scognet	    -e "/@NCURSES_XNAMES@/s%%${NCURSES_XNAMES}%"
348129198Scognet
349129198Scognettermcap.h:	termcap.h.in
350129198Scognet	sed <${NCURSES}/include/termcap.h.in >$@ \
351129198Scognet	    -e "/@NCURSES_MAJOR@/s%%${NCURSES_MAJOR}%" \
352129198Scognet	    -e "/@NCURSES_MINOR@/s%%${NCURSES_MINOR}%" \
353129198Scognet	    -e "/@NCURSES_CONST@/s%%${NCURSES_CONST}%" \
354129198Scognet	    -e "/@NCURSES_OSPEED@/s%%${NCURSES_OSPEED}%"
355129198Scognet
356129198Scognetcurses.head:	curses.h.in
357129198Scognet	sed <${NCURSES}/include/curses.h.in >$@ \
358129198Scognet	    -e "/@BROKEN_LINKER@/s%%${BROKEN_LINKER}%" \
359129198Scognet	    -e "/@HAVE_VSSCANF@/s%%${HAVE_VSSCANF}%" \
360129198Scognet	    -e "/@NCURSES_CONST@/s%%${NCURSES_CONST}%" \
361129198Scognet	    -e "/@NCURSES_MAJOR@/s%%${NCURSES_MAJOR}%" \
362129198Scognet	    -e "/@NCURSES_MINOR@/s%%${NCURSES_MINOR}%" \
363129198Scognet	    -e "/@NCURSES_PATCH@/s%%${NCURSES_PATCH}%" \
364129198Scognet	    -e "/@NCURSES_CH_T@/s%%${NCURSES_CH_T}%" \
365129198Scognet	    -e "/@NCURSES_EXT_FUNCS@/s%%${NCURSES_EXT_FUNCS}%" \
366129198Scognet	    -e "/@NCURSES_LIBUTF8@/s%%${NCURSES_LIBUTF8}%" \
367129198Scognet	    -e "/@NCURSES_MBSTATE_T@/s%%${NCURSES_MBSTATE_T}%" \
368129198Scognet	    -e "s%@cf_cv_1UL@%${ONEUL}%g" \
369129198Scognet	    -e "s%@cf_cv_builtin_bool@%${BUILTIN_BOOL}%g" \
370129198Scognet	    -e "s%@cf_cv_cc_bool_type@%${BOOL_TYPE}%g" \
371129198Scognet	    -e "s%@cf_cv_shift_limit@%${SHIFT_LIMIT}%g" \
372129198Scognet	    -e "s%@cf_cv_header_stdbool_h@%${HEADER_STDBOOL}%g" \
373129198Scognet	    -e "s%@cf_cv_type_of_bool@%${TYPE_OF_BOOL}%g" \
374129198Scognet	    -e "s%@cf_cv_typeof_chtype@%${TYPEOF_CHTYPE}%g" \
375239268Sgonzo	    -e "s%@cf_cv_widec_shift@%${WIDEC_SHIFT}%g" \
376239268Sgonzo	    -e "s/ _WCHAR_T/ __wchar_t/g" \
377239268Sgonzo	    -e "s/ _WINT_T/ __wint_t/g" \
378250297Sgber
379239268Sgonzounctrl.h:	unctrl.h.in
380239268Sgonzo	sed <${NCURSES}/include/$@.in >$@ \
381239268Sgonzo	    -e "/@NCURSES_MAJOR@/s%%${NCURSES_MAJOR}%" \
382239268Sgonzo	    -e "/@NCURSES_MINOR@/s%%${NCURSES_MINOR}%"
383239268Sgonzo
384239268Sgonzo# MAN page gunk
385239268Sgonzoterminfo.5:	MKterminfo.sh terminfo.head Caps
386239268Sgonzo	sh ${NCURSES}/man/MKterminfo.sh ${NCURSES}/man/terminfo.head \
387239268Sgonzo	    ${NCURSES}/include/Caps ${NCURSES}/man/terminfo.tail >$@
388239268Sgonzo
389239268SgonzoCLEANFILES+=	terminfo.5
390239268SgonzoMANFILTER=      sed -e 's%@TERMINFO@%${TERMINFODIR}/terminfo%g' \
391239268Sgonzo		    -e 's%@NCURSES_OSPEED@%${NCURSES_OSPEED}%g'
392239268Sgonzo
393239268SgonzoMANx=	curs_addch.3x curs_addchstr.3x curs_addstr.3x curs_attr.3x \
394239268Sgonzo	curs_beep.3x curs_bkgd.3x curs_border.3x curs_clear.3x curs_color.3x \
395239268Sgonzo	curs_delch.3x curs_deleteln.3x curs_extend.3x curs_getch.3x \
396239268Sgonzo	curs_getstr.3x \
397239268Sgonzo	curs_getyx.3x curs_inch.3x curs_inchstr.3x curs_initscr.3x \
398239268Sgonzo	curs_inopts.3x curs_insch.3x curs_insstr.3x curs_instr.3x \
399239268Sgonzo	curs_kernel.3x curs_mouse.3x curs_move.3x curs_outopts.3x \
400239268Sgonzo	curs_overlay.3x curs_pad.3x curs_print.3x curs_printw.3x \
401239268Sgonzo	curs_refresh.3x curs_scanw.3x curs_scr_dump.3x curs_scroll.3x \
402239268Sgonzo	curs_slk.3x curs_termattrs.3x curs_termcap.3x curs_terminfo.3x \
403239268Sgonzo	curs_touch.3x curs_trace.3x curs_util.3x curs_window.3x \
404239268Sgonzo	default_colors.3x define_key.3x \
405239268Sgonzo	keybound.3x keyok.3x ncurses.3x resizeterm.3x wresize.3x
406239268SgonzoMAN=	term.5 terminfo.5
407239268SgonzoMAN+=	term.7
408239268Sgonzo
409239268Sgonzo# Generate the MAN list from MANx
410239268Sgonzo.for page in ${MANx}
411239268SgonzoCLEANFILES+=${page:T:S/x$//g}
412239268SgonzoMAN+=${page:T:S/x$//g}
413239268Sgonzo${page:T:S/x$//g}: ${page}
414239268Sgonzo	ln -s ${.ALLSRC} ${.TARGET}
415239268Sgonzo.endfor
416239268Sgonzo
417239268SgonzoMLINKS+=ncurses.3 curses.3
418239268SgonzoMLINKS+=curs_addch.3 addch.3 curs_addch.3 echochar.3 curs_addch.3 mvaddch.3 \
419239268Sgonzo	curs_addch.3 mvwaddch.3 curs_addch.3 waddch.3 curs_addch.3 wechochar.3
420239268SgonzoMLINKS+=curs_addchstr.3 addchnstr.3 curs_addchstr.3 addchstr.3 \
421239268Sgonzo	curs_addchstr.3 mvaddchnstr.3 curs_addchstr.3 mvaddchstr.3 \
422239268Sgonzo	curs_addchstr.3 mvwaddchnstr.3 curs_addchstr.3 mvwaddchstr.3 \
423239268Sgonzo	curs_addchstr.3 waddchnstr.3 curs_addchstr.3 waddchstr.3
424239268SgonzoMLINKS+=curs_addstr.3 addnstr.3 curs_addstr.3 addstr.3 \
425239268Sgonzo	curs_addstr.3 mvaddnstr.3 curs_addstr.3 mvaddstr.3 \
426239268Sgonzo	curs_addstr.3 mvwaddnstr.3 curs_addstr.3 mvwaddstr.3 \
427239268Sgonzo	curs_addstr.3 waddnstr.3 curs_addstr.3 waddstr.3
428239268SgonzoMLINKS+=curs_attr.3 PAIR_NUMBER.3 \
429239268Sgonzo	curs_attr.3 attr_get.3 curs_attr.3 attr_off.3 curs_attr.3 attr_on.3 \
430239268Sgonzo	curs_attr.3 attr_set.3 curs_attr.3 attroff.3 curs_attr.3 attron.3 \
431239268Sgonzo	curs_attr.3 attrset.3 curs_attr.3 chgat.3 curs_attr.3 color_set.3 \
432239268Sgonzo	curs_attr.3 mvchgat.3 curs_attr.3 mvwchgat.3 curs_attr.3 standend.3 \
433239268Sgonzo	curs_attr.3 standout.3 curs_attr.3 wattr_get.3 curs_attr.3 wattr_off.3 \
434239268Sgonzo	curs_attr.3 wattr_on.3 curs_attr.3 wattr_set.3 curs_attr.3 wattroff.3 \
435239268Sgonzo	curs_attr.3 wattron.3 curs_attr.3 wattrset.3 curs_attr.3 wchgat.3 \
436239268Sgonzo	curs_attr.3 wcolor_set.3 curs_attr.3 wstandend.3 \
437239268Sgonzo	curs_attr.3 wstandout.3
438239268SgonzoMLINKS+=curs_beep.3 beep.3 curs_beep.3 flash.3
439239268SgonzoMLINKS+=curs_bkgd.3 bkgd.3 curs_bkgd.3 bkgdset.3 curs_bkgd.3 getbkgd.3 \
440239268Sgonzo	curs_bkgd.3 wbkgd.3 curs_bkgd.3 wbkgdset.3
441239268SgonzoMLINKS+=curs_border.3 border.3 curs_border.3 box.3 curs_border.3 hline.3 \
442239268Sgonzo	curs_border.3 mvhline.3 curs_border.3 mvvline.3 \
443239268Sgonzo	curs_border.3 mvwhline.3 \
444239268Sgonzo	curs_border.3 mvwvline.3 curs_border.3 vline.3 curs_border.3 wborder.3 \
445239268Sgonzo	curs_border.3 whline.3 curs_border.3 wvline.3
446129198ScognetMLINKS+=curs_clear.3 clear.3 curs_clear.3 clrtobot.3 curs_clear.3 clrtoeol.3 \
447129198Scognet	curs_clear.3 erase.3 curs_clear.3 wclear.3 curs_clear.3 wclrtobot.3 \
448129198Scognet	curs_clear.3 wclrtoeol.3 curs_clear.3 werase.3
449129198ScognetMLINKS+=curs_color.3 COLOR_PAIR.3 \
450129198Scognet	curs_color.3 can_change_color.3 curs_color.3 color_content.3 \
451171620Scognet	curs_color.3 has_colors.3 curs_color.3 init_color.3 \
452171620Scognet	curs_color.3 init_pair.3 curs_color.3 pair_content.3 \
453171620Scognet	curs_color.3 start_color.3
454129198ScognetMLINKS+=curs_delch.3 delch.3 curs_delch.3 mvdelch.3 curs_delch.3 mvwdelch.3 \
455129198Scognet	curs_delch.3 wdelch.3
456129198ScognetMLINKS+=curs_deleteln.3 deleteln.3 curs_deleteln.3 insdelln.3 \
457129198Scognet	curs_deleteln.3 insertln.3 curs_deleteln.3 wdeleteln.3 \
458129198Scognet	curs_deleteln.3 winsdelln.3 curs_deleteln.3 winsertln.3
459129198ScognetMLINKS+=curs_extend.3 curses_version.3 curs_extend.3 use_extended_names.3
460129198ScognetMLINKS+=curs_getch.3 getch.3 curs_getch.3 has_key.3 curs_getch.3 mvgetch.3 \
461129198Scognet	curs_getch.3 mvwgetch.3 curs_getch.3 ungetch.3 curs_getch.3 wgetch.3
462239268SgonzoMLINKS+=curs_getstr.3 getnstr.3 curs_getstr.3 getstr.3 \
463239268Sgonzo	curs_getstr.3 mvgetnstr.3 curs_getstr.3 mvgetstr.3 \
464239268Sgonzo	curs_getstr.3 mvwgetnstr.3 curs_getstr.3 mvwgetstr.3 \
465239268Sgonzo	curs_getstr.3 wgetnstr.3 curs_getstr.3 wgetstr.3
466239268SgonzoMLINKS+=curs_getyx.3 getbegyx.3 curs_getyx.3 getmaxyx.3 \
467239268Sgonzo	curs_getyx.3 getparyx.3 curs_getyx.3 getyx.3
468239268SgonzoMLINKS+=curs_inch.3 inch.3 curs_inch.3 mvinch.3 curs_inch.3 mvwinch.3 \
469129198Scognet	curs_inch.3 winch.3
470129198ScognetMLINKS+=curs_inchstr.3 inchnstr.3 curs_inchstr.3 inchstr.3 \
471129198Scognet	curs_inchstr.3 mvinchnstr.3 curs_inchstr.3 mvinchstr.3 \
472239268Sgonzo	curs_inchstr.3 mvwinchnstr.3 curs_inchstr.3 mvwinchstr.3 \
473239268Sgonzo	curs_inchstr.3 winchnstr.3 curs_inchstr.3 winchstr.3
474239268SgonzoMLINKS+=curs_initscr.3 delscreen.3 curs_initscr.3 endwin.3 \
475239268Sgonzo	curs_initscr.3 initscr.3 curs_initscr.3 isendwin.3 \
476129198Scognet	curs_initscr.3 newterm.3 curs_initscr.3 set_term.3
477129198ScognetMLINKS+=curs_inopts.3 cbreak.3 curs_inopts.3 echo.3 curs_inopts.3 halfdelay.3 \
478129198Scognet	curs_inopts.3 intrflush.3 curs_inopts.3 keypad.3 curs_inopts.3 meta.3 \
479129198Scognet	curs_inopts.3 nocbreak.3 curs_inopts.3 nodelay.3 \
480129198Scognet	curs_inopts.3 noecho.3 curs_inopts.3 noqiflush.3 curs_inopts.3 noraw.3 \
481239268Sgonzo	curs_inopts.3 notimeout.3 curs_inopts.3 qiflush.3 curs_inopts.3 raw.3 \
482239268Sgonzo	curs_inopts.3 timeout.3 curs_inopts.3 typeahead.3 \
483239268Sgonzo	curs_inopts.3 wtimeout.3
484239268SgonzoMLINKS+=curs_insch.3 insch.3 curs_insch.3 mvinsch.3 curs_insch.3 mvwinsch.3 \
485129198Scognet	curs_insch.3 winsch.3
486239268SgonzoMLINKS+=curs_insstr.3 insnstr.3 curs_insstr.3 insstr.3 \
487239268Sgonzo	curs_insstr.3 mvinsnstr.3 curs_insstr.3 mvinsstr.3 \
488239268Sgonzo	curs_insstr.3 mvwinsnstr.3 curs_insstr.3 mvwinsstr.3 \
489239268Sgonzo	curs_insstr.3 winsnstr.3 curs_insstr.3 winsstr.3
490239268SgonzoMLINKS+=curs_instr.3 innstr.3 curs_instr.3 instr.3 curs_instr.3 mvinnstr.3 \
491239268Sgonzo	curs_instr.3 mvinstr.3 curs_instr.3 mvwinnstr.3 \
492239268Sgonzo	curs_instr.3 mvwinstr.3 curs_instr.3 winnstr.3 curs_instr.3 winstr.3
493239268SgonzoMLINKS+=curs_kernel.3 curs_set.3 curs_kernel.3 def_prog_mode.3 \
494239268Sgonzo	curs_kernel.3 def_shell_mode.3 curs_kernel.3 getsyx.3 \
495239268Sgonzo	curs_kernel.3 napms.3 curs_kernel.3 reset_prog_mode.3 \
496239268Sgonzo	curs_kernel.3 reset_shell_mode.3 curs_kernel.3 resetty.3 \
497239268Sgonzo	curs_kernel.3 ripoffline.3 curs_kernel.3 savetty.3 \
498129198Scognet	curs_kernel.3 setsyx.3
499129198ScognetMLINKS+=curs_mouse.3 getmouse.3 curs_mouse.3 mouse_trafo.3 \
500129198Scognet	curs_mouse.3 mouseinterval.3 \
501129198Scognet	curs_mouse.3 mousemask.3 curs_mouse.3 ungetmouse.3 \
502129198Scognet	curs_mouse.3 wenclose.3 curs_mouse.3 wmouse_trafo.3
503129198ScognetMLINKS+=curs_move.3 move.3 curs_move.3 wmove.3
504129198ScognetMLINKS+=curs_outopts.3 clearok.3 curs_outopts.3 idcok.3 curs_outopts.3 idlok.3 \
505129198Scognet	curs_outopts.3 immedok.3 curs_outopts.3 leaveok.3 curs_outopts.3 nl.3 \
506129198Scognet	curs_outopts.3 nonl.3 curs_outopts.3 scrollok.3 \
507129198Scognet	curs_outopts.3 setscrreg.3 curs_outopts.3 wsetscrreg.3
508129198ScognetMLINKS+=curs_overlay.3 copywin.3 curs_overlay.3 overlay.3 \
509129198Scognet	curs_overlay.3 overwrite.3
510129198ScognetMLINKS+=curs_pad.3 newpad.3 curs_pad.3 pechochar.3 curs_pad.3 pnoutrefresh.3 \
511129198Scognet	curs_pad.3 prefresh.3 curs_pad.3 subpad.3
512129198ScognetMLINKS+=curs_print.3 mcprint.3
513129198ScognetMLINKS+=curs_printw.3 mvprintw.3 curs_printw.3 mvwprintw.3 \
514129198Scognet	curs_printw.3 printw.3 curs_printw.3 vw_printw.3 \
515129198Scognet	curs_printw.3 vwprintw.3 curs_printw.3 wprintw.3
516129198ScognetMLINKS+=curs_refresh.3 doupdate.3 curs_refresh.3 redrawwin.3 \
517129198Scognet	curs_refresh.3 refresh.3 curs_refresh.3 wnoutrefresh.3 \
518129198Scognet	curs_refresh.3 wredrawln.3 curs_refresh.3 wrefresh.3
519171620ScognetMLINKS+=curs_scanw.3 mvscanw.3 curs_scanw.3 mvwscanw.3 curs_scanw.3 scanw.3 \
520129198Scognet	curs_scanw.3 vw_scanw.3 curs_scanw.3 vwscanw.3 curs_scanw.3 wscanw.3
521171620ScognetMLINKS+=curs_scr_dump.3 scr_dump.3 curs_scr_dump.3 scr_init.3 \
522228530Sraj	curs_scr_dump.3 scr_restore.3 curs_scr_dump.3 scr_set.3
523228530SrajMLINKS+=curs_scroll.3 scrl.3 curs_scroll.3 scroll.3 curs_scroll.3 wscrl.3
524129198ScognetMLINKS+=curs_slk.3 slk_attr.3 curs_slk.3 slk_attr_off.3 \
525129198Scognet	curs_slk.3 slk_attr_on.3 curs_slk.3 slk_attr_set.3 \
526129198Scognet	curs_slk.3 slk_attroff.3 curs_slk.3 slk_attron.3 \
527129198Scognet	curs_slk.3 slk_attrset.3 curs_slk.3 slk_clear.3 \
528129198Scognet	curs_slk.3 slk_color.3 curs_slk.3 slk_init.3 curs_slk.3 slk_label.3 \
529129198Scognet	curs_slk.3 slk_noutrefresh.3 curs_slk.3 slk_refresh.3 \
530129198Scognet	curs_slk.3 slk_restore.3 curs_slk.3 slk_set.3 curs_slk.3 slk_touch.3
531171620ScognetMLINKS+=curs_termattrs.3 baudrate.3 curs_termattrs.3 erasechar.3 \
532171620Scognet	curs_termattrs.3 has_ic.3 curs_termattrs.3 has_il.3 \
533228530Sraj	curs_termattrs.3 killchar.3 curs_termattrs.3 longname.3 \
534228530Sraj	curs_termattrs.3 termattrs.3 curs_termattrs.3 termname.3
535129198ScognetMLINKS+=curs_termcap.3 termcap.3 curs_termcap.3 tgetent.3 \
536129198Scognet	curs_termcap.3 tgetflag.3 curs_termcap.3 tgetnum.3 \
537129198Scognet	curs_termcap.3 tgetstr.3 curs_termcap.3 tgoto.3 \
538129198Scognet	curs_termcap.3 tputs.3
539129198ScognetMLINKS+=curs_terminfo.3 del_curterm.3 curs_terminfo.3 mvcur.3 \
540129198Scognet	curs_terminfo.3 putp.3 curs_terminfo.3 restartterm.3 \
541129198Scognet	curs_terminfo.3 set_curterm.3 curs_terminfo.3 setterm.3 \
542129198Scognet	curs_terminfo.3 setupterm.3 curs_terminfo.3 tigetflag.3 \
543129198Scognet	curs_terminfo.3 tigetnum.3 curs_terminfo.3 tigetstr.3 \
544129198Scognet	curs_terminfo.3 tparm.3 curs_terminfo.3 tputs.3 \
545129198Scognet	curs_terminfo.3 vidattr.3 curs_terminfo.3 vidputs.3
546129198ScognetMLINKS+=curs_touch.3 is_linetouched.3 curs_touch.3 is_wintouched.3 \
547129198Scognet	curs_touch.3 touchline.3 curs_touch.3 touchwin.3 \
548129198Scognet	curs_touch.3 untouchwin.3 curs_touch.3 wtouchln.3
549129198ScognetMLINKS+=curs_util.3 delay_output.3 curs_util.3 filter.3 \
550129198Scognet	curs_util.3 flushinp.3 curs_util.3 getwin.3 \
551129198Scognet	curs_util.3 keyname.3 curs_util.3 putwin.3 \
552129198Scognet	curs_util.3 unctrl.3 curs_util.3 use_env.3
553236992SimpMLINKS+=curs_window.3 delwin.3 curs_window.3 derwin.3 curs_window.3 dupwin.3 \
554129198Scognet	curs_window.3 mvderwin.3 curs_window.3 mvwin.3 curs_window.3 newwin.3 \
555129198Scognet	curs_window.3 subwin.3 curs_window.3 syncok.3 \
556129198Scognet	curs_window.3 wcursyncup.3 curs_window.3 wsyncdown.3 \
557129198Scognet	curs_window.3 wsyncup.3
558129198ScognetMLINKS+=default_colors.3 assume_default_colors.3 \
559248280Skib	default_colors.3 use_default_colors.3
560248280Skib
561129198ScognetNOLINT=	true
562129198Scognet
563239268Sgonzo.include <bsd.lib.mk>
564129198Scognet