Put the files we're copying over into a few variables and add them to

CLEANDIRS and CLEANFILES so make clean removes any divots.

Sponsored by: Netflix
This commit is contained in:
Warner Losh 2017-12-08 19:57:06 +00:00
parent 6856cf6893
commit c5095910a0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326710

View File

@ -97,10 +97,15 @@ SRCS+= infback.c inffast.c inflate.c inftrees.c zutil.c
# Create a subset of includes that are safe, as well as adjusting those that aren't
# The lists may drive people nuts, but they are explicitly opt-in
FAKE_DIRS=xlocale arpa
SAFE_INCS=a.out.h assert.h elf.h limits.h nlist.h setjmp.h stddef.h stdbool.h string.h strings.h time.h unistd.h uuid.h
STAND_H_INC=ctype.h fcntl.h signal.h stdio.h stdlib.h
OTHER_INC=stdarg.h errno.h stdint.h
beforedepend:
echo beforedepend; \
mkdir -p xlocale arpa; \
for i in a.out.h assert.h elf.h limits.h nlist.h setjmp.h stddef.h stdbool.h string.h strings.h time.h unistd.h uuid.h; do \
mkdir -p ${FAKE_DIRS}; \
for i in ${SAFE_INCS}; do \
ln -sf ${SRCTOP}/include/$$i $$i; \
done; \
ln -sf ${SYSDIR}/${MACHINE}/include/stdarg.h stdarg.h; \
@ -111,9 +116,11 @@ beforedepend:
for i in _time.h _strings.h _string.h; do \
[ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \
done; \
for i in ctype.h fcntl.h signal.h stdio.h stdlib.h; do \
for i in ${STAND_H_INC}; do \
ln -sf ${SASRC}/stand.h $$i; \
done
CLEANDIRS+=${FAKE_DIRS}
CLEANFILES+= ${SAFE_INCS} ${STAND_H_INC} ${OTHER_INC}
# io routines
SRCS+= closeall.c dev.c ioctl.c nullfs.c stat.c \