mirror of
https://git.FreeBSD.org/src.git
synced 2026-06-02 11:24:32 +00:00
ncurses: Provide reproducible paths
Avoid hard-coding the value of SRCTOP in generated files. Use /usr/src as the canonical srcdir. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D50955
This commit is contained in:
@@ -259,10 +259,18 @@ term.h: MKterm.h.awk edit_cfg.sh Caps Caps-ncurses
|
||||
sh ${NCURSES_DIR}/include/edit_cfg.sh ${NCURSES_CFG_H} $@.new
|
||||
mv -f $@.new $@
|
||||
|
||||
# Avoid hard-coding absolute source paths if requested.
|
||||
.if ${MK_REPRODUCIBLE_BUILD} != "no"
|
||||
NCURSES_SRCTOP=/usr/src
|
||||
.else
|
||||
NCURSES_SRCTOP=${SRCTOP}
|
||||
.endif
|
||||
|
||||
curses.h: curses.head MKkey_defs.sh Caps Caps-ncurses
|
||||
cat curses.head > $@.new
|
||||
AWK=${AWK} _POSIX2_VERSION=199209 sh ${NCURSES_DIR}/include/MKkey_defs.sh \
|
||||
${NCURSES_DIR}/include/Caps ${NCURSES_DIR}/include/Caps-ncurses >> $@.new
|
||||
sed -i '' 's|${SRCTOP}|${NCURSES_SRCTOP}|g' $@.new
|
||||
cat ${NCURSES_DIR}/include/curses.wide >> $@.new
|
||||
cat ${NCURSES_DIR}/include/curses.tail >> $@.new
|
||||
mv -f $@.new $@
|
||||
@@ -387,6 +395,7 @@ unctrl.h: unctrl.h.in
|
||||
terminfo.5: MKterminfo.sh terminfo.head Caps
|
||||
sh ${NCURSES_DIR}/man/MKterminfo.sh ${NCURSES_DIR}/man/terminfo.head \
|
||||
${NCURSES_DIR}/include/Caps ${NCURSES_DIR}/man/terminfo.tail >$@
|
||||
sed -i '' 's|${SRCTOP}|${NCURSES_SRCTOP}|g' $@
|
||||
|
||||
CLEANFILES+= terminfo.5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user