From 7c8d38112da7bddb5ebd93cb9613acfb16456dc1 Mon Sep 17 00:00:00 2001 From: Marcin Wojtas Date: Fri, 21 May 2021 11:23:42 +0200 Subject: [PATCH] Add afterbuild target to bsd.prog.mk. Afterbuild target allows to perform operations on fully built binary. This is needed to allow for ELF feature flags modification during world build. Submitted by: Dawid Gorecki Reviewed by: imp Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D29551 --- share/mk/bsd.prog.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 44a774957cfb..89eddb24abb0 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -232,7 +232,12 @@ MAN1= ${MAN} .if defined(_SKIP_BUILD) all: .else +.if target(afterbuild) +.ORDER: ${PROG} afterbuild +all: ${PROG} ${SCRIPTS} afterbuild +.else all: ${PROG} ${SCRIPTS} +.endif .if ${MK_MAN} != "no" all: all-man .endif