From 139d114acc7b57a6cc839fe5ee935d25ecd9f3a2 Mon Sep 17 00:00:00 2001 From: "Simon J. Gerraty" Date: Thu, 21 Mar 2024 11:55:56 -0700 Subject: [PATCH] libsysdecode use MKTABLES_INCLUDEDIR We do not conflate SYSROOT with STAGE_ROOT/DESTDIR during DIRDEPS_BUILD Make sure mktables looks in the right place. Reviewed by: stevek Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D44415 --- lib/libsysdecode/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/libsysdecode/Makefile b/lib/libsysdecode/Makefile index 504701ee99a..ccff95af741 100644 --- a/lib/libsysdecode/Makefile +++ b/lib/libsysdecode/Makefile @@ -127,8 +127,13 @@ CFLAGS.gcc.ioctl.c+= -Wno-redundant-decls CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}} DEPENDOBJS+= tables.h tables_linux.h +.if ${MK_DIRDEPS_BUILD} == "yes" +MKTABLES_INCLUDEDIR= ${STAGE_INCLUDEDIR} +.else +MKTABLES_INCLUDEDIR= ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} +.endif tables.h: mktables - sh ${.CURDIR}/mktables ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} ${.TARGET} + sh ${.CURDIR}/mktables ${MKTABLES_INCLUDEDIR} ${.TARGET} tables_linux.h: mklinuxtables sh ${.CURDIR}/mklinuxtables ${SRCTOP}/sys ${.TARGET}