From 338b22234b4f300b948ea8d1292bc023976516b8 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 3 Aug 2020 17:53:15 +0000 Subject: [PATCH] Pass the full CFLAGS to cpp for MKlib_gen.sh. GCC's cpp was exiting immediately when it failed to find requested includes ( and ). clang-cpp emitted an error for the missing header files but continued processing the file (thus not honoring any macros defined in the missing headers). Arguably, the awk script is buggy since it doesn't check the return value of the command it executes. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D25731 --- lib/ncurses/ncurses/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile index 5b61df983ce9..efa38691115e 100644 --- a/lib/ncurses/ncurses/Makefile +++ b/lib/ncurses/ncurses/Makefile @@ -345,7 +345,7 @@ codes.c: MKcodes.awk ${AWK} -f ${NCURSES_DIR}/ncurses/tinfo/MKcodes.awk bigstrings=${USE_BIG_STRINGS} ${NCURSES_DIR}/include/Caps > codes.c lib_gen.c: MKlib_gen.sh curses.h ncurses_dll.h - LC_ALL=C sh ${NCURSES_DIR}/ncurses/base/MKlib_gen.sh "${CPP:N${CCACHE_BIN}} ${CPPFLAGS}" \ + LC_ALL=C sh ${NCURSES_DIR}/ncurses/base/MKlib_gen.sh "${CPP:N${CCACHE_BIN}} ${CFLAGS}" \ "${AWK}" generated < curses.h >$@ lib_keyname.c: keys.list MKkeyname.awk