git: 1a2ff852e342 - main - include/i386: fix release builds

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Mon, 13 Jun 2022 20:37:45 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=1a2ff852e342d9a864814aac1baa43bfb6657435

commit 1a2ff852e342d9a864814aac1baa43bfb6657435
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2022-06-13 20:37:34 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2022-06-13 20:37:34 +0000

    include/i386: fix release builds
    
    Add a target to ensure the presence of /usr/include/i386
    before we try to install files.  In the buildworld/installworld path
    it gets created different ways, but for distribute (used in releases)
    we need it in the subdir.
    
    (Creating of this the x86, pc, powerpc directories is far too complex.
    We should look for ways to simplify it.)
    
    Reported by:    lwhsu
    Fixes:          a09ea2bbc3053d3b2afdb2f7444e5e57a96bb891
---
 include/i386/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/i386/Makefile b/include/i386/Makefile
index b5f5a23eb906..901cc87392ba 100644
--- a/include/i386/Makefile
+++ b/include/i386/Makefile
@@ -20,4 +20,12 @@ INCS+=	\
 	pcpu_aux.h
 INCSDIR=	${INCLUDEDIR}/i386
 
+beforeinstall: i386dir
+META_TARGETS+=	i386dir
+
+i386dir:
+	${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
+	    ${DESTDIR}${INCLUDEDIR}/i386
+
+
 .include <bsd.prog.mk>