diff --git a/lib/ncurses/config.mk b/lib/ncurses/config.mk index 0016dc97a72f..8a3e7d0ffa59 100644 --- a/lib/ncurses/config.mk +++ b/lib/ncurses/config.mk @@ -6,6 +6,8 @@ NCURSES_MAJOR= 6 NCURSES_MINOR= 2 NCURSES_PATCH= 20210220 +TINFO_OBJDIR?= ${.OBJDIR:H}/tinfo + CFLAGS+= -D_XOPEN_SOURCE_EXTENDED NCURSES_CFG_H= ${.CURDIR}/ncurses_cfg.h @@ -17,7 +19,7 @@ CFLAGS+= -I${.CURDIR:H}/ncurses CFLAGS+= -I${NCURSES_DIR}/include CFLAGS+= -I${NCURSES_DIR}/ncurses -CFLAGS+= -I${.OBJDIR:H}/tinfo/ +CFLAGS+= -I${TINFO_OBJDIR} CFLAGS+= -Wall @@ -27,7 +29,7 @@ CFLAGS+= -DHAVE_CONFIG_H # everyone needs this .PATH: ${NCURSES_DIR}/include -.PATH: ${.OBJDIR:H}/tinfo/ +.PATH: ${TINFO_OBJDIR} # tools and directories AWK?= awk diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile index b52085780952..e1a3dbf61e49 100644 --- a/lib/ncurses/ncurses/Makefile +++ b/lib/ncurses/ncurses/Makefile @@ -180,9 +180,9 @@ libncursesw.ald: ${.CURDIR}/${STATIC_LDSCRIPT} -e 's,@@STATICLIB_SUFFIX@@,${_STATICLIB_SUFFIX},g' \ ${.ALLSRC} > ${.TARGET} -lib_gen.c: MKlib_gen.sh ${.OBJDIR:H}/tinfo/curses.h ncurses_dll.h +lib_gen.c: MKlib_gen.sh ${TINFO_OBJDIR}/curses.h ncurses_dll.h LC_ALL=C sh ${NCURSES_DIR}/ncurses/base/MKlib_gen.sh "${CPP:N${CCACHE_BIN}} ${CFLAGS}" \ - "${AWK}" generated < ${.OBJDIR:H}/tinfo/curses.h >$@ + "${AWK}" generated < ${TINFO_OBJDIR}/curses.h >$@ expanded.c: MKexpanded.sh sh ${NCURSES_DIR}/ncurses/tty/MKexpanded.sh "${CC:N${CCACHE_BIN}} -E" ${CFLAGS} >expanded.c