2019-10-13 10:28:04 +03:00
|
|
|
# $NetBSD: Makefile,v 1.66 2019/10/13 07:28:10 mrg Exp $
|
1994-05-06 10:01:42 +04:00
|
|
|
# @(#)Makefile 8.1 (Berkeley) 6/4/93
|
|
|
|
|
2002-08-19 18:55:14 +04:00
|
|
|
USE_SHLIBDIR= yes
|
|
|
|
|
2012-03-21 09:37:42 +04:00
|
|
|
WARNS?= 5
|
1994-05-06 10:01:42 +04:00
|
|
|
LIB= edit
|
|
|
|
|
2010-02-03 18:34:37 +03:00
|
|
|
LIBDPLIBS+= terminfo ${.CURDIR}/../libterminfo
|
2011-07-30 14:07:27 +04:00
|
|
|
|
|
|
|
.include "bsd.own.mk"
|
|
|
|
|
|
|
|
COPTS+= -Wunused-parameter
|
2011-08-02 21:22:02 +04:00
|
|
|
CWARNFLAGS.gcc+= -Wconversion
|
2015-01-29 23:30:02 +03:00
|
|
|
CWARNFLAGS.clang+= -Wno-cast-qual
|
2005-05-19 02:36:20 +04:00
|
|
|
|
2016-05-10 00:38:27 +03:00
|
|
|
SRCS = chared.c chartype.c common.c el.c eln.c emacs.c filecomplete.c \
|
2017-06-28 02:25:13 +03:00
|
|
|
hist.c history.c historyn.c keymacro.c literal.c map.c \
|
2016-05-10 00:38:27 +03:00
|
|
|
parse.c prompt.c read.c readline.c refresh.c search.c sig.c \
|
|
|
|
terminal.c tokenizer.c tokenizern.c tty.c vi.c
|
1994-05-06 10:01:42 +04:00
|
|
|
|
2016-04-28 18:50:33 +03:00
|
|
|
MAN= editline.3 editrc.5 editline.7
|
1997-01-09 16:12:14 +03:00
|
|
|
|
2016-05-02 17:12:09 +03:00
|
|
|
MLINKS= \
|
2016-05-02 16:01:34 +03:00
|
|
|
editline.3 el_deletestr.3 \
|
|
|
|
editline.3 el_end.3 \
|
|
|
|
editline.3 el_get.3 \
|
|
|
|
editline.3 el_getc.3 \
|
|
|
|
editline.3 el_gets.3 \
|
|
|
|
editline.3 el_init.3 \
|
|
|
|
editline.3 el_init_fd.3 \
|
|
|
|
editline.3 el_insertstr.3 \
|
|
|
|
editline.3 el_line.3 \
|
|
|
|
editline.3 el_parse.3 \
|
|
|
|
editline.3 el_push.3 \
|
|
|
|
editline.3 el_reset.3 \
|
|
|
|
editline.3 el_resize.3 \
|
|
|
|
editline.3 el_set.3 \
|
|
|
|
editline.3 el_source.3 \
|
|
|
|
editline.3 history.3 \
|
|
|
|
editline.3 history_end.3 \
|
|
|
|
editline.3 history_init.3 \
|
|
|
|
editline.3 tok_end.3 \
|
|
|
|
editline.3 tok_init.3 \
|
|
|
|
editline.3 tok_line.3 \
|
|
|
|
editline.3 tok_reset.3 \
|
|
|
|
editline.3 tok_str.3
|
|
|
|
|
|
|
|
MLINKS+= \
|
|
|
|
editline.3 el_wdeletestr.3 \
|
|
|
|
editline.3 el_wget.3 \
|
|
|
|
editline.3 el_wgetc.3 \
|
|
|
|
editline.3 el_wgets.3 \
|
|
|
|
editline.3 el_winsertstr.3 \
|
|
|
|
editline.3 el_wline.3 \
|
|
|
|
editline.3 el_wparse.3 \
|
|
|
|
editline.3 el_wpush.3 \
|
|
|
|
editline.3 el_wset.3 \
|
|
|
|
editline.3 history_w.3 \
|
|
|
|
editline.3 history_wend.3 \
|
|
|
|
editline.3 history_winit.3 \
|
|
|
|
editline.3 tok_wend.3 \
|
|
|
|
editline.3 tok_winit.3 \
|
|
|
|
editline.3 tok_wline.3 \
|
|
|
|
editline.3 tok_wreset.3 \
|
|
|
|
editline.3 tok_wstr.3
|
1997-01-09 16:12:14 +03:00
|
|
|
|
1999-07-06 18:10:21 +04:00
|
|
|
LIBEDITDIR?=${.CURDIR}
|
|
|
|
|
2001-01-06 00:15:49 +03:00
|
|
|
INCS= histedit.h
|
1997-03-25 01:11:48 +03:00
|
|
|
INCSDIR=/usr/include
|
|
|
|
|
From Ingo Schwarze:
* Replace fcns.c by a shorter and simpler func.h
and include it only in the one file needing it, map.c.
* Combine help.h and help.c into a simplified help.h
and include it only in the one file needing it, map.c.
* Check the very simple, static files editline.c, historyn.c, and
tokenizern.c into CVS rather than needlessly generating them.
* So we no longer autogenerate any C files. :-)
* Shorten and simplify makelist by deleting the options -n, -e, -bc,
and -m; the latter was unused and useless in the first place.
* Move the declaration of el_func_t from fcns.h to the header
actually needing it, map.h. Since that header is already
included by el.h for unrelated reasons, that makes el_func_t
just as globally available as before.
* No longer include the simplified fcns.h into el.h,
include it directly into the *.c files needing it.
2016-04-18 20:01:19 +03:00
|
|
|
CLEANFILES+=common.h.tmp emacs.h.tmp fcns.h.tmp func.h.tmp
|
|
|
|
CLEANFILES+=help.h.tmp vi.h.tmp tc1.o tc1 .depend
|
|
|
|
|
2016-02-17 22:47:49 +03:00
|
|
|
CPPFLAGS+=-I. -I${LIBEDITDIR}
|
1999-07-02 19:14:07 +04:00
|
|
|
CPPFLAGS+=-I. -I${.CURDIR}
|
2016-05-24 20:42:54 +03:00
|
|
|
#CPPFLAGS+=-DDEBUG_TTY -DDEBUG_KEY -DDEBUG -DDEBUG_REFRESH
|
2016-03-02 22:24:20 +03:00
|
|
|
#CPPFLAGS+=-DDEBUG_PASTE -DDEBUG_EDIT
|
1994-05-06 10:01:42 +04:00
|
|
|
|
2016-02-17 22:47:49 +03:00
|
|
|
AHDR=vi.h emacs.h common.h
|
1999-07-06 18:10:21 +04:00
|
|
|
ASRC=${LIBEDITDIR}/vi.c ${LIBEDITDIR}/emacs.c ${LIBEDITDIR}/common.c
|
1994-05-06 10:01:42 +04:00
|
|
|
|
From Ingo Schwarze:
* Replace fcns.c by a shorter and simpler func.h
and include it only in the one file needing it, map.c.
* Combine help.h and help.c into a simplified help.h
and include it only in the one file needing it, map.c.
* Check the very simple, static files editline.c, historyn.c, and
tokenizern.c into CVS rather than needlessly generating them.
* So we no longer autogenerate any C files. :-)
* Shorten and simplify makelist by deleting the options -n, -e, -bc,
and -m; the latter was unused and useless in the first place.
* Move the declaration of el_func_t from fcns.h to the header
actually needing it, map.h. Since that header is already
included by el.h for unrelated reasons, that makes el_func_t
just as globally available as before.
* No longer include the simplified fcns.h into el.h,
include it directly into the *.c files needing it.
2016-04-18 20:01:19 +03:00
|
|
|
DPSRCS+= ${AHDR} fcns.h func.h help.h
|
|
|
|
CLEANFILES+= ${AHDR} fcns.h func.h help.h
|
2003-07-31 16:46:00 +04:00
|
|
|
|
2001-01-06 00:15:49 +03:00
|
|
|
SUBDIR= readline
|
|
|
|
|
From Ingo Schwarze:
* Replace fcns.c by a shorter and simpler func.h
and include it only in the one file needing it, map.c.
* Combine help.h and help.c into a simplified help.h
and include it only in the one file needing it, map.c.
* Check the very simple, static files editline.c, historyn.c, and
tokenizern.c into CVS rather than needlessly generating them.
* So we no longer autogenerate any C files. :-)
* Shorten and simplify makelist by deleting the options -n, -e, -bc,
and -m; the latter was unused and useless in the first place.
* Move the declaration of el_func_t from fcns.h to the header
actually needing it, map.h. Since that header is already
included by el.h for unrelated reasons, that makes el_func_t
just as globally available as before.
* No longer include the simplified fcns.h into el.h,
include it directly into the *.c files needing it.
2016-04-18 20:01:19 +03:00
|
|
|
.depend: ${AHDR} fcns.h func.h help.h
|
|
|
|
|
2005-05-07 20:22:59 +04:00
|
|
|
vi.h: vi.c makelist Makefile
|
2005-05-28 15:55:30 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2003-05-08 17:20:44 +04:00
|
|
|
${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/vi.c \
|
|
|
|
> ${.TARGET}.tmp && \
|
2000-08-15 16:01:40 +04:00
|
|
|
mv ${.TARGET}.tmp ${.TARGET}
|
1994-05-06 10:01:42 +04:00
|
|
|
|
2005-05-07 20:22:59 +04:00
|
|
|
emacs.h: emacs.c makelist Makefile
|
2005-05-28 15:55:30 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2003-05-08 17:20:44 +04:00
|
|
|
${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/emacs.c \
|
|
|
|
> ${.TARGET}.tmp && \
|
2000-08-15 16:01:40 +04:00
|
|
|
mv ${.TARGET}.tmp ${.TARGET}
|
1994-05-06 10:01:42 +04:00
|
|
|
|
2005-05-07 20:22:59 +04:00
|
|
|
common.h: common.c makelist Makefile
|
2005-05-28 15:55:30 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2003-05-08 17:20:44 +04:00
|
|
|
${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/common.c \
|
|
|
|
> ${.TARGET}.tmp && \
|
2000-08-15 16:01:40 +04:00
|
|
|
mv ${.TARGET}.tmp ${.TARGET}
|
1994-05-06 10:01:42 +04:00
|
|
|
|
2005-05-07 20:22:59 +04:00
|
|
|
fcns.h: ${AHDR} makelist Makefile
|
2005-05-28 15:55:30 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2003-05-08 17:20:44 +04:00
|
|
|
${HOST_SH} ${LIBEDITDIR}/makelist -fh ${AHDR} > ${.TARGET}.tmp && \
|
2000-08-15 16:01:40 +04:00
|
|
|
mv ${.TARGET}.tmp ${.TARGET}
|
1994-05-06 10:01:42 +04:00
|
|
|
|
From Ingo Schwarze:
* Replace fcns.c by a shorter and simpler func.h
and include it only in the one file needing it, map.c.
* Combine help.h and help.c into a simplified help.h
and include it only in the one file needing it, map.c.
* Check the very simple, static files editline.c, historyn.c, and
tokenizern.c into CVS rather than needlessly generating them.
* So we no longer autogenerate any C files. :-)
* Shorten and simplify makelist by deleting the options -n, -e, -bc,
and -m; the latter was unused and useless in the first place.
* Move the declaration of el_func_t from fcns.h to the header
actually needing it, map.h. Since that header is already
included by el.h for unrelated reasons, that makes el_func_t
just as globally available as before.
* No longer include the simplified fcns.h into el.h,
include it directly into the *.c files needing it.
2016-04-18 20:01:19 +03:00
|
|
|
func.h: ${AHDR} makelist Makefile
|
2005-05-28 15:55:30 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2003-05-08 17:20:44 +04:00
|
|
|
${HOST_SH} ${LIBEDITDIR}/makelist -fc ${AHDR} > ${.TARGET}.tmp && \
|
2000-08-15 16:01:40 +04:00
|
|
|
mv ${.TARGET}.tmp ${.TARGET}
|
1994-05-06 10:01:42 +04:00
|
|
|
|
2005-05-07 20:22:59 +04:00
|
|
|
help.h: ${ASRC} makelist Makefile
|
2005-05-28 15:55:30 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2003-05-08 17:20:44 +04:00
|
|
|
${HOST_SH} ${LIBEDITDIR}/makelist -bh ${ASRC} > ${.TARGET}.tmp && \
|
2000-08-15 16:01:40 +04:00
|
|
|
mv ${.TARGET}.tmp ${.TARGET}
|
1994-05-06 10:01:42 +04:00
|
|
|
|
2006-09-01 00:20:38 +04:00
|
|
|
tc1.o: ${LIBEDITDIR}/TEST/tc1.c
|
2011-06-21 06:32:55 +04:00
|
|
|
|
2016-02-17 22:47:49 +03:00
|
|
|
tc1: libedit.a tc1.o
|
2005-05-28 15:55:30 +04:00
|
|
|
${_MKTARGET_LINK}
|
2010-02-03 18:34:37 +03:00
|
|
|
${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermlib
|
1994-05-06 10:01:42 +04:00
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|
2001-01-06 00:15:49 +03:00
|
|
|
.include <bsd.subdir.mk>
|
2011-06-21 06:32:55 +04:00
|
|
|
|
|
|
|
# XXX
|
2014-06-15 00:49:36 +04:00
|
|
|
.if defined(HAVE_GCC)
|
2011-06-21 06:32:55 +04:00
|
|
|
COPTS.editline.c+= -Wno-cast-qual
|
2017-06-30 23:26:52 +03:00
|
|
|
COPTS.literal.c+= -Wno-sign-conversion
|
2011-06-21 06:32:55 +04:00
|
|
|
COPTS.tokenizer.c+= -Wno-cast-qual
|
|
|
|
COPTS.tokenizern.c+= -Wno-cast-qual
|
|
|
|
.endif
|
2019-10-13 10:28:04 +03:00
|
|
|
|
|
|
|
COPTS.history.c+= ${GCC_NO_STRINGOP_OVERFLOW}
|
|
|
|
COPTS.historyn.c+= ${GCC_NO_STRINGOP_OVERFLOW}
|
|
|
|
COPTS.readline.c+= ${GCC_NO_STRINGOP_TRUNCATION} ${GCC_NO_STRINGOP_OVERFLOW}
|