mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 13:32:45 +00:00
ncurses: avoid hardcoded assumptions about the layout of .OBJDIR
Abstract out the details of the FreeBSD build into a $TINFO_OBJDIR that external builds can override if they orchestrate the build a bit differently and have a different objdir layout as a result. This makes the ncurses build a little bit more flexible without requiring weird backflips. Reviewed by: bapt, sjg Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D41834
This commit is contained in:
parent
e5635c3dab
commit
c086d1cbc3
@ -6,6 +6,8 @@ NCURSES_MAJOR= 6
|
|||||||
NCURSES_MINOR= 2
|
NCURSES_MINOR= 2
|
||||||
NCURSES_PATCH= 20210220
|
NCURSES_PATCH= 20210220
|
||||||
|
|
||||||
|
TINFO_OBJDIR?= ${.OBJDIR:H}/tinfo
|
||||||
|
|
||||||
CFLAGS+= -D_XOPEN_SOURCE_EXTENDED
|
CFLAGS+= -D_XOPEN_SOURCE_EXTENDED
|
||||||
NCURSES_CFG_H= ${.CURDIR}/ncurses_cfg.h
|
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}/include
|
||||||
CFLAGS+= -I${NCURSES_DIR}/ncurses
|
CFLAGS+= -I${NCURSES_DIR}/ncurses
|
||||||
CFLAGS+= -I${.OBJDIR:H}/tinfo/
|
CFLAGS+= -I${TINFO_OBJDIR}
|
||||||
|
|
||||||
CFLAGS+= -Wall
|
CFLAGS+= -Wall
|
||||||
|
|
||||||
@ -27,7 +29,7 @@ CFLAGS+= -DHAVE_CONFIG_H
|
|||||||
|
|
||||||
# everyone needs this
|
# everyone needs this
|
||||||
.PATH: ${NCURSES_DIR}/include
|
.PATH: ${NCURSES_DIR}/include
|
||||||
.PATH: ${.OBJDIR:H}/tinfo/
|
.PATH: ${TINFO_OBJDIR}
|
||||||
|
|
||||||
# tools and directories
|
# tools and directories
|
||||||
AWK?= awk
|
AWK?= awk
|
||||||
|
@ -180,9 +180,9 @@ libncursesw.ald: ${.CURDIR}/${STATIC_LDSCRIPT}
|
|||||||
-e 's,@@STATICLIB_SUFFIX@@,${_STATICLIB_SUFFIX},g' \
|
-e 's,@@STATICLIB_SUFFIX@@,${_STATICLIB_SUFFIX},g' \
|
||||||
${.ALLSRC} > ${.TARGET}
|
${.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}" \
|
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
|
expanded.c: MKexpanded.sh
|
||||||
sh ${NCURSES_DIR}/ncurses/tty/MKexpanded.sh "${CC:N${CCACHE_BIN}} -E" ${CFLAGS} >expanded.c
|
sh ${NCURSES_DIR}/ncurses/tty/MKexpanded.sh "${CC:N${CCACHE_BIN}} -E" ${CFLAGS} >expanded.c
|
||||||
|
Loading…
Reference in New Issue
Block a user