From b114e8fcd7f9c65f819f7199e9313ad3aafa370f Mon Sep 17 00:00:00 2001 From: "Simon J. Gerraty" Date: Thu, 19 Dec 2019 02:40:04 +0000 Subject: [PATCH] Tweaks for DIRDEPS_BUILD libmagic only depend on mkmagic if not DIRDEPS_BUILD libpmc fix -I for libpmcstat local.dirdeps.mk be even more careful about adding gnu/lib/csu to DIRDEPS Reviewed by: bdrewery Differential Revision: https://reviews.freebsd.org/D22872 --- lib/libmagic/Makefile | 4 +++- lib/libpmc/Makefile | 2 +- share/mk/local.dirdeps.mk | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libmagic/Makefile b/lib/libmagic/Makefile index 522574f28e79..73064b68a9a8 100644 --- a/lib/libmagic/Makefile +++ b/lib/libmagic/Makefile @@ -37,7 +37,7 @@ MAGFILES= ${CONTRDIR}/magic/Header \ magic: ${MAGFILES} cat ${.ALLSRC:O} > ${.TARGET} -magic.mgc: mkmagic magic +magic.mgc: magic ${BTOOLSPATH:U.}/mkmagic magic .if ${MACHINE} == "host" || ${MK_DIRDEPS_BUILD} == "no" @@ -51,6 +51,8 @@ mkmagic: apprentice.c cdf_time.c encoding.c funcs.c magic.c print.c ${INCS} ${BU .endif .if ${MK_DIRDEPS_BUILD} == "yes" BTOOLSPATH= ${HOST_OBJTOP}/${RELDIR} +.else +magic.mgc: mkmagic .endif FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index 93beaa500c79..26f5a3706387 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -20,7 +20,7 @@ EVENT_ARCH="powerpc" .if ${MK_DIRDEPS_BUILD} == "yes" # avoid circular dependency -CFLAGS+= -I${RELDIR:H}/libpmcstat +CFLAGS+= -I${SRCTOP}/${RELDIR:H}/libpmcstat GENDIRDEPS_FILTER+= N${RELDIR:H}/libpmcstat JEVENTS?= ${HOST_OBJTOP}/${RELDIR}/pmu-events/jevents .else diff --git a/share/mk/local.dirdeps.mk b/share/mk/local.dirdeps.mk index cb01719c6045..b0f6bfd6127a 100644 --- a/share/mk/local.dirdeps.mk +++ b/share/mk/local.dirdeps.mk @@ -222,7 +222,7 @@ DIRDEPS += targets/pseudo/stage .endif # this one is too pervasive -.if ${MK_BSD_CRTBEGIN} == "no" && ${DEP_RELDIR} != "gnu/lib/csu" +.if ${MK_BSD_CRTBEGIN} == "no" && ${DEP_RELDIR:N.:Ngnu/lib/csu:Ninclude*:Ntargets/*} != "" DIRDEPS+= gnu/lib/csu .endif