From: Miod Vallat Subject: spurious -I argument building libc To: tech@openbsd.org Date: Wed, 6 Aug 2025 17:16:40 +0000 I have noticed that .c files in libc get built with -I/usr/src/lib/libc being passed twice. This is because locale/Makefile.inc adds -I${.CURDIR}, supposedly to reach files in locale/, but first, all .h files there are only used by .c files in the same directory and included using "", not <>, and second, this Makefile fragment gets sourced by the top-level libc Makefile, so ${.CURDIR} points at libc, not libc/locale. Index: lib/libc/locale/Makefile.inc =================================================================== RCS file: /OpenBSD/src/lib/libc/locale/Makefile.inc,v diff -u -p -r1.28 Makefile.inc --- lib/libc/locale/Makefile.inc 25 Aug 2023 12:45:45 -0000 1.28 +++ lib/libc/locale/Makefile.inc 6 Aug 2025 12:01:39 -0000 @@ -24,4 +24,4 @@ MAN+= nl_langinfo.3 setlocale.3 newlocal wcstol.3 wcstombs.3 wcsxfrm.3 wctob.3 wctomb.3 \ wctype.3 iswctype.3 wctrans.3 towctrans.3 wcwidth.3 -CFLAGS+=-I${.CURDIR} -I${LIBCSRCDIR}/citrus +CFLAGS+=-I${LIBCSRCDIR}/citrus