aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2024-01-24 05:00:36 +0000
committerKyle Evans <kevans@FreeBSD.org>2024-01-24 05:00:36 +0000
commit009db0d40c6acffe0b9d835cb15a75cc3361173b (patch)
tree0958fca85c696f6e33be876aa34d78f831db4944
parent90ad2dc28747a3a5036d68ccc87d2352459f5cb1 (diff)
downloadsrc-009db0d40c6acffe0b9d835cb15a75cc3361173b.tar.gz
src-009db0d40c6acffe0b9d835cb15a75cc3361173b.zip
ncurses: serialize the tinfo build a little bit
Move ncurses_dll.h to GENHDRS to start with; it's been generated from ncurses_dll.h.in for years, so it's not actually in a different category than all of the other GENHDRS. Slap an .ORDER on it to ensure that we build ncurses_dll.h and curses.h before any *.c gets compiled. This should sufficiently address a build race seen downstream where ncurses_dll.h is present but not yet populated. Reviewed by: bapt Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D43540
-rw-r--r--lib/ncurses/tinfo/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/ncurses/tinfo/Makefile b/lib/ncurses/tinfo/Makefile
index c1ea75d3aacd..a0b191f50785 100644
--- a/lib/ncurses/tinfo/Makefile
+++ b/lib/ncurses/tinfo/Makefile
@@ -74,6 +74,7 @@ GENHDRS= \
hashsize.h \
init_keytry.h \
ncurses_def.h \
+ ncurses_dll.h \
nomacros.h \
parametrized.h \
term.h \
@@ -170,9 +171,8 @@ 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
@@ -214,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