aboutsummaryrefslogtreecommitdiff
path: root/lib/ncurses/ncurses/Makefile
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2018-10-23 06:31:31 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2018-10-23 06:31:31 +0000
commit60b905ae2f3a31efd6809c790b5a02f574489716 (patch)
tree0264c1f85e0e9d75142c456de982fd4678d9a0ec /lib/ncurses/ncurses/Makefile
parent74f6548619cdef063d5beebe52c1aafc67df2cd0 (diff)
downloadsrc-60b905ae2f3a31efd6809c790b5a02f574489716.tar.gz
src-60b905ae2f3a31efd6809c790b5a02f574489716.zip
Fix ncurses fallback.c build with a strict build shell
The script uses shift three times and when building with a strict /bin/sh shifting without any arguments will cause the script to fail. In this case the target will fail and we write an empty output file. When doing a NO_CLEAN build after this will mean fallback.c is up to date and clang will happily compile the empty input file which leads to strange build errors later. Fixed by passing three empty arguments to MkFallback.sh and only creating fallback.c if MKfallback.sh succeeds. Aproved By: brooks (mentor) Differential Revision: https://reviews.freebsd.org/D16867
Notes
Notes: svn path=/head/; revision=339637
Diffstat (limited to 'lib/ncurses/ncurses/Makefile')
-rw-r--r--lib/ncurses/ncurses/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile
index 2969dfc8948c..8e6adfcc1fb2 100644
--- a/lib/ncurses/ncurses/Makefile
+++ b/lib/ncurses/ncurses/Makefile
@@ -350,7 +350,8 @@ expanded.c: MKexpanded.sh
sh ${NCURSES_DIR}/ncurses/tty/MKexpanded.sh "${CC:N${CCACHE_BIN}} -E" ${CFLAGS} >expanded.c
fallback.c: MKfallback.sh
- sh ${NCURSES_DIR}/ncurses/tinfo/MKfallback.sh > fallback.c
+ sh -e ${NCURSES_DIR}/ncurses/tinfo/MKfallback.sh "" "" "" > ${.TARGET}.tmp && \
+ mv -f ${.TARGET}.tmp ${.TARGET}
# Generated headers
nomacros.h: MKlib_gen.sh curses.h