aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2022-02-09 00:23:31 +0000
committerWarner Losh <imp@FreeBSD.org>2022-02-09 00:23:43 +0000
commit5ae6cc00111c9a9bc70f6fc9db25bd191c069433 (patch)
tree58b9201f2d707af876c5a9254c15e0ea640b8792
parentfd7daa727126b4b8da9e38ca35ea237ef1190a00 (diff)
downloadsrc-5ae6cc00111c9a9bc70f6fc9db25bd191c069433.tar.gz
src-5ae6cc00111c9a9bc70f6fc9db25bd191c069433.zip
test-includes: Simplify $OBJDIR requirements
s=/=_=g in tested names so that all the objects live in $OBJDIR. This is more robust than depending on side effects of auto OBJDIR features and should fix buildworld issues some people have seen. Suggested by: sjg@ Sponsored by: Netflix
-rw-r--r--tools/build/test-includes/Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/build/test-includes/Makefile b/tools/build/test-includes/Makefile
index 3ae39a2cb61f..707ab6f4ca47 100644
--- a/tools/build/test-includes/Makefile
+++ b/tools/build/test-includes/Makefile
@@ -24,11 +24,11 @@ CFLAGS.event.c= -D_WANT_KEVENT32 -D_WANT_FREEBSD11_KEVENT
.include "badfiles.inc"
-.for h in ${HDRS}
+.for h c in ${HDRS:@x@$x ${x:S,/,_,g:R}.c@}
.if !${BADHDRS:M${h}}
-SRCS+= ${h:R}.c
-CLEANFILES+=${h:R}.c
-${h:R}.c:
+SRCS+= $c
+CLEANFILES+=$c
+$c:
echo "#include <$h>" > ${.TARGET}
.endif
.endfor