Pass the full CFLAGS to cpp for MKlib_gen.sh.

GCC's cpp was exiting immediately when it failed to find requested
includes (<ncurses_cfg.h> and <ncurses_defs.h>).  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
This commit is contained in:
John Baldwin 2020-08-03 17:53:15 +00:00
parent 9ca3eaf0bd
commit 338b22234b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=363804

View File

@ -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