aboutsummaryrefslogtreecommitdiff
path: root/lib/ncurses/tinfo/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ncurses/tinfo/Makefile')
-rw-r--r--lib/ncurses/tinfo/Makefile35
1 files changed, 29 insertions, 6 deletions
diff --git a/lib/ncurses/tinfo/Makefile b/lib/ncurses/tinfo/Makefile
index d7b7343dfcdc..a0b191f50785 100644
--- a/lib/ncurses/tinfo/Makefile
+++ b/lib/ncurses/tinfo/Makefile
@@ -1,4 +1,3 @@
-# $FreeBSD$
PACKAGE= clibs
SHLIBDIR?= /lib
@@ -75,6 +74,7 @@ GENHDRS= \
hashsize.h \
init_keytry.h \
ncurses_def.h \
+ ncurses_dll.h \
nomacros.h \
parametrized.h \
term.h \
@@ -167,10 +167,12 @@ CLEANFILES= ${GENSRCS} ${GENHDRS} keys.list make_hash term.h.new \
CFLAGS+= -DTERMIOS
+CWARNFLAGS.comp_parse.c= ${NO_WUNUSED_BUT_SET_VARIABLE}
+CWARNFLAGS.read_entry.c= ${NO_WUNUSED_BUT_SET_VARIABLE}
+
# Installed
-HEADERS= curses.h term.h termcap.h unctrl.h
-SRCHDRS= ncurses_dll.h
-CLEANFILES+= ncurses_dll.h
+HEADERS= curses.h ncurses_dll.h term.h termcap.h unctrl.h
+SRCHDRS=
INCS= ${HEADERS} ${SRCHDRS}
INCSLINKS= curses.h ${INCLUDEDIR}/ncurses.h
@@ -212,6 +214,14 @@ FILESGROUPS= DOCS
# Generated source
.ORDER: names.c codes.c
+# Serialize the build just a little bit; there's nothing stopping the build from
+# proceeding before ncurses_dll.h and curses.h are actually generated on a clean
+# build since we have no dependency information to prevent it.
+.ORDER: ncurses_dll.h curses.h
+.for f in ${SRCS:M*.c}
+.ORDER: curses.h ${f}
+.endfor
+
names.c: MKnames.awk
${AWK} -f ${NCURSES_DIR}/ncurses/tinfo/MKnames.awk bigstrings=${USE_BIG_STRINGS} ${NCURSES_DIR}/include/Caps > names.c
@@ -270,6 +280,11 @@ keys.list: MKkeys_list.sh Caps Caps-ncurses
AWK=${AWK} sh ${NCURSES_DIR}/ncurses/tinfo/MKkeys_list.sh \
${NCURSES_DIR}/include/Caps ${NCURSES_DIR}/include/Caps-ncurses | LC_ALL=C sort > keys.list
+.if ${MK_DIRDEPS_BUILD} == "yes" && ${MACHINE} != "host"
+# we need to override the default
+BTOOLSPATH= ${HOST_OBJTOP}/${RELDIR:S,w$,,}
+.endif
+.if ${MACHINE} == "host" || ${MK_DIRDEPS_BUILD} == "no"
# Build tools
DEPENDOBJS+= make_hash make_keys
build-tools: make_hash make_keys
@@ -280,6 +295,14 @@ make_keys: make_keys.c names.c ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META}
make_hash: make_hash.c hashsize.h ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META}
${CC:N${CCACHE_BIN}} -o $@ ${CFLAGS} -DMAIN_PROGRAM \
${NCURSES_DIR}/ncurses/tinfo/make_hash.c
+.endif
+.if ${MK_DIRDEPS_BUILD} == "yes" && ${MACHINE} != "host"
+make_keys: ${BTOOLSPATH}/make_keys
+ ${LN:Uln} -sf ${.ALLSRC} ${.TARGET}
+
+make_hash: ${BTOOLSPATH}/make_hash
+ ${LN:Uln} -sf ${.ALLSRC} ${.TARGET}
+.endif
# ./configure generated
MKterm.h.awk: MKterm.h.awk.in
@@ -1038,9 +1061,9 @@ gen-pkgconfig: gen-pkgconfig.in
s,@PC_MODULE_SUFFIX@,,g ; \
s,@prefix@,/usr,g ; \
s,@exec_prefix@,$${prefix},g ; \
- s,@includedir@,/usr/include,g ; \
+ s,@includedir@,${INCLUDEDIR},g ; \
s,@includesubdir@,,g ; \
- s,@libdir@,/usr/lib,g ; \
+ s,@libdir@,${LIBDIR},g ; \
s,@RPATH_LIST@,$${libdir},g ; \
s,@PRIVATE_LIBS@,,g ; \
s,@USE_ARG_SUFFIX@,,g ; \