From nobody Thu Dec 7 03:32:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sm0Fh72Fcz53TWp for ; Thu, 7 Dec 2023 03:32:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sm0Fh47c4z3FJv for ; Thu, 7 Dec 2023 03:32:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-54c4f95e27fso411538a12.1 for ; Wed, 06 Dec 2023 19:32:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1701919943; x=1702524743; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=TtZSB3x72zNzJKoQnbvqoRQjmeZvjFs3ykBWz6OhP4M=; b=mHAoZJach0/KMpp0ft2V76w14enovTMG3Y8XOPSA97pKgc+NGNroJYG/VzfYkCPwqu ueKGKFcG4qQ7ONYOnMJCdhriEhgo5vHBA6h8yf5OIDsDsPWImx5q24SpdTbxj7jron6y UpxGyGUA4rtnUOCgTZgeIU0rKIat8cTaIdZU3s1y6XC1SpBUzAkPWPAPrccbTeOd0v8f kAqMpzXpwmagqtpj4U/g9WO70PRe2E44+/ixxZomPCniUdzLbe8QpYIr8nS0FFFSfJiT fidTDZa0OcXUCc1nv1N4G59ETtEhYPp39tY8i7x5oupB62ziOmOCnzpxrM+hjbDcG9La lPGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701919943; x=1702524743; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TtZSB3x72zNzJKoQnbvqoRQjmeZvjFs3ykBWz6OhP4M=; b=kg9EF+ljzjsGFY0vt/ydpUVYXKT9gy4ov7Ofl8P7oaEXq5vCYiHXJyMI0Ry7r3yzAT iQRr+sSxSyJ6NEb8bt67cUKAbrKBArffV1fHV8u7dxYIEhRzyuUqqVwhTAxRH+X9u31w oQpBxKlVYiWstmBR2LMCtiguHZBjekMuaiIbROhHI9JPZpmamCHInYN5AxnpNUQLajeN TBjz1BIYr+xw8dDQsiok6N582yRD3EJCHX51LgxcCh/SKLUZLW6NFVsJhs/tp15JhoUF zEO3lZmiNq1MQOoWCwuiFBZKE7iQ7Bo2Eo+EAhos+GIFNAlXSzGeGFchbCN5rS6H+Muj jY3A== X-Gm-Message-State: AOJu0YwldZPIviM7xwmvLDrd4kS4L3dbXKnyUN/cvt5xmf2wPT6xd4oo WvyLslSy0YkP5tg7On01D00VLcXVR8NhgcdBROijkw== X-Google-Smtp-Source: AGHT+IGJaOZ7m0hTAzj1++QvUZ4o95bqOZ/guPTL+E2XCaru4MVA7NiMXm46BlDoPSiIy+0YPPlKyrtF9vhIxAknfBQ= X-Received: by 2002:a50:a6d7:0:b0:54c:e59e:aa69 with SMTP id f23-20020a50a6d7000000b0054ce59eaa69mr1315603edc.12.1701919942677; Wed, 06 Dec 2023 19:32:22 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202312070235.3B72ZoZp043061@gitrepo.freebsd.org> In-Reply-To: <202312070235.3B72ZoZp043061@gitrepo.freebsd.org> From: Warner Losh Date: Wed, 6 Dec 2023 20:32:10 -0700 Message-ID: Subject: Re: git: 83d0b8c089d8 - main - bsdinstall generate opt_osname.h in include To: "Simon J. Gerraty" Cc: src-committers , "" , "" Content-Type: multipart/alternative; boundary="0000000000009ea9a9060be31df0" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4Sm0Fh47c4z3FJv --0000000000009ea9a9060be31df0 Content-Type: text/plain; charset="UTF-8" Silly question: why not just add it to CFLAGS with -DOSNAME=\"${OSNAME}\" rather than generating this file? Warner On Wed, Dec 6, 2023, 7:35 PM Simon J. Gerraty wrote: > The branch main has been updated by sjg: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=83d0b8c089d807d6d4c50cba40ae2d0fedb3bf1b > > commit 83d0b8c089d807d6d4c50cba40ae2d0fedb3bf1b > Author: Simon J. Gerraty > AuthorDate: 2023-12-07 02:34:52 +0000 > Commit: Simon J. Gerraty > CommitDate: 2023-12-07 02:34:52 +0000 > > bsdinstall generate opt_osname.h in include > > This allows the subdirs that do more work to run in parallel > > Reviewed by: jrtc27 > Differential Revision: https://reviews.freebsd.org/D42947 > --- > usr.sbin/bsdinstall/Makefile | 7 ++++--- > usr.sbin/bsdinstall/Makefile.depend | 12 +++++++----- > usr.sbin/bsdinstall/Makefile.inc | 3 +++ > usr.sbin/bsdinstall/distextract/Makefile | 9 --------- > usr.sbin/bsdinstall/distextract/Makefile.depend | 1 + > usr.sbin/bsdinstall/distfetch/Makefile | 1 - > usr.sbin/bsdinstall/distfetch/Makefile.depend | 2 +- > usr.sbin/bsdinstall/include/Makefile | 13 +++++++++++++ > usr.sbin/bsdinstall/include/Makefile.depend | 10 ++++++++++ > usr.sbin/bsdinstall/partedit/Makefile | 1 - > usr.sbin/bsdinstall/partedit/Makefile.depend | 2 +- > 11 files changed, 40 insertions(+), 21 deletions(-) > > diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile > index bbf8071a91c3..422bdcaaa77a 100644 > --- a/usr.sbin/bsdinstall/Makefile > +++ b/usr.sbin/bsdinstall/Makefile > @@ -1,9 +1,9 @@ > > -OSNAME?= FreeBSD > SUBDIR= distextract distfetch partedit runconsoles scripts > SUBDIR_PARALLEL= > -SUBDIR_DEPEND_distfetch = distextract > -SUBDIR_DEPEND_partedit = distextract > +SUBDIR_DEPEND_distextract = include > +SUBDIR_DEPEND_distfetch = include > +SUBDIR_DEPEND_partedit = include > SCRIPTS= bsdinstall > MAN= bsdinstall.8 > PACKAGE= bsdinstall > @@ -11,5 +11,6 @@ PACKAGE= bsdinstall > SCRIPTS+= startbsdinstall > SCRIPTSDIR_startbsdinstall= ${LIBEXECDIR}/bsdinstall > > +UPDATE_DEPENDFILE= no > > .include > diff --git a/usr.sbin/bsdinstall/Makefile.depend > b/usr.sbin/bsdinstall/Makefile.depend > index 11aba52f82cf..6ce3965b1642 100644 > --- a/usr.sbin/bsdinstall/Makefile.depend > +++ b/usr.sbin/bsdinstall/Makefile.depend > @@ -1,10 +1,12 @@ > -# Autogenerated - do NOT edit! > +# Not autogenerated - take care > > DIRDEPS = \ > + usr.sbin/bsdinstall/distextract \ > + usr.sbin/bsdinstall/distfetch \ > + usr.sbin/bsdinstall/include \ > + usr.sbin/bsdinstall/partedit \ > + usr.sbin/bsdinstall/runconsoles \ > + usr.sbin/bsdinstall/scripts \ > > > .include > - > -.if ${DEP_RELDIR} == ${_DEP_RELDIR} > -# local dependencies - needed for -jN in clean tree > -.endif > diff --git a/usr.sbin/bsdinstall/Makefile.inc > b/usr.sbin/bsdinstall/Makefile.inc > index dc4e35b73799..c0907ffac469 100644 > --- a/usr.sbin/bsdinstall/Makefile.inc > +++ b/usr.sbin/bsdinstall/Makefile.inc > @@ -1 +1,4 @@ > PACKAGE=bsdinstall > + > +CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/../include > + > diff --git a/usr.sbin/bsdinstall/distextract/Makefile > b/usr.sbin/bsdinstall/distextract/Makefile > index 368e1b1378ab..6813c9a79391 100644 > --- a/usr.sbin/bsdinstall/distextract/Makefile > +++ b/usr.sbin/bsdinstall/distextract/Makefile > @@ -1,18 +1,9 @@ > > BINDIR= ${LIBEXECDIR}/bsdinstall > PROG= distextract > -CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I. > LIBADD= archive bsddialog m > SRCS= distextract.c > > MAN= > -GENHDRS= opt_osname.h > -SRCS+= ${GENHDRS} > -CLEANFILES+= ${GENHDRS} > - > -opt_osname.h: .PHONY > - if ! grep -q "^#define OSNAME \"${OSNAME}\"$"" ${.TARGET}; then \ > - echo "#define OSNAME \"${OSNAME}\"" > ${.TARGET}; \ > - fi > > .include > diff --git a/usr.sbin/bsdinstall/distextract/Makefile.depend > b/usr.sbin/bsdinstall/distextract/Makefile.depend > index 10731d6ccb01..dd87c979eb80 100644 > --- a/usr.sbin/bsdinstall/distextract/Makefile.depend > +++ b/usr.sbin/bsdinstall/distextract/Makefile.depend > @@ -9,6 +9,7 @@ DIRDEPS = \ > lib/libc \ > lib/libcompiler_rt \ > lib/msun \ > + usr.sbin/bsdinstall/include \ > > > .include > diff --git a/usr.sbin/bsdinstall/distfetch/Makefile > b/usr.sbin/bsdinstall/distfetch/Makefile > index 325f5c55cfd5..8a9011734592 100644 > --- a/usr.sbin/bsdinstall/distfetch/Makefile > +++ b/usr.sbin/bsdinstall/distfetch/Makefile > @@ -1,7 +1,6 @@ > > BINDIR= ${LIBEXECDIR}/bsdinstall > PROG= distfetch > -CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib > -I${.OBJDIR}/../distextract > LIBADD= fetch bsddialog > > MAN= > diff --git a/usr.sbin/bsdinstall/distfetch/Makefile.depend > b/usr.sbin/bsdinstall/distfetch/Makefile.depend > index 16e54d9b2a6e..9e9ac6d1bae8 100644 > --- a/usr.sbin/bsdinstall/distfetch/Makefile.depend > +++ b/usr.sbin/bsdinstall/distfetch/Makefile.depend > @@ -8,7 +8,7 @@ DIRDEPS = \ > lib/libc \ > lib/libcompiler_rt \ > lib/libfetch \ > - usr.sbin/bsdinstall/distextract \ > + usr.sbin/bsdinstall/include \ > > > .include > diff --git a/usr.sbin/bsdinstall/include/Makefile > b/usr.sbin/bsdinstall/include/Makefile > new file mode 100644 > index 000000000000..15f947defa9b > --- /dev/null > +++ b/usr.sbin/bsdinstall/include/Makefile > @@ -0,0 +1,13 @@ > +OSNAME?= FreeBSD > +GENHDRS= opt_osname.h > +SRCS+= ${GENHDRS} > +CLEANFILES+= ${GENHDRS} > + > +opt_osname.h: ${META_NOPHONY} > + @if ! grep -q "^#define OSNAME \"${OSNAME}\"$"" ${.TARGET} 2> > /dev/null; then \ > + echo "#define OSNAME \"${OSNAME}\"" > ${.TARGET}; \ > + fi > + > +MK_STAGING= no > + > +.include > diff --git a/usr.sbin/bsdinstall/include/Makefile.depend > b/usr.sbin/bsdinstall/include/Makefile.depend > new file mode 100644 > index 000000000000..11aba52f82cf > --- /dev/null > +++ b/usr.sbin/bsdinstall/include/Makefile.depend > @@ -0,0 +1,10 @@ > +# Autogenerated - do NOT edit! > + > +DIRDEPS = \ > + > + > +.include > + > +.if ${DEP_RELDIR} == ${_DEP_RELDIR} > +# local dependencies - needed for -jN in clean tree > +.endif > diff --git a/usr.sbin/bsdinstall/partedit/Makefile > b/usr.sbin/bsdinstall/partedit/Makefile > index 8d7156fd16d2..397e404a126f 100644 > --- a/usr.sbin/bsdinstall/partedit/Makefile > +++ b/usr.sbin/bsdinstall/partedit/Makefile > @@ -4,7 +4,6 @@ PROG= partedit > LINKS= ${BINDIR}/partedit ${BINDIR}/autopart \ > ${BINDIR}/partedit ${BINDIR}/scriptedpart > SYMLINKS= ../libexec/bsdinstall/partedit /usr/sbin/sade > -CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib > -I${.OBJDIR}/../distextract > LIBADD+= geom util bsddialog > > PARTEDIT_ARCH= ${MACHINE} > diff --git a/usr.sbin/bsdinstall/partedit/Makefile.depend > b/usr.sbin/bsdinstall/partedit/Makefile.depend > index 4d5ca3e13299..68a44a4d87a7 100644 > --- a/usr.sbin/bsdinstall/partedit/Makefile.depend > +++ b/usr.sbin/bsdinstall/partedit/Makefile.depend > @@ -9,7 +9,7 @@ DIRDEPS = \ > lib/libcompiler_rt \ > lib/libgeom \ > lib/libutil \ > - usr.sbin/bsdinstall/distextract \ > + usr.sbin/bsdinstall/include \ > > > .include > --0000000000009ea9a9060be31df0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Silly=C2=A0question: why not just add it to CFLAGS with -= DOSNAME=3D\"${OSNAME}\" rather than generating this file?

Warner

On Wed, Dec 6, 2023, 7:35= PM Simon J. Gerraty <sjg@freebsd.org= > wrote:
The branch main has= been updated by sjg:

URL: ht= tps://cgit.FreeBSD.org/src/commit/?id=3D83d0b8c089d807d6d4c50cba40ae2d0fedb= 3bf1b

commit 83d0b8c089d807d6d4c50cba40ae2d0fedb3bf1b
Author:=C2=A0 =C2=A0 =C2=A0Simon J. Gerraty <sjg@FreeBSD.org>
AuthorDate: 2023-12-07 02:34:52 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Simon J. Gerraty <sjg@FreeBSD.org>
CommitDate: 2023-12-07 02:34:52 +0000

=C2=A0 =C2=A0 bsdinstall generate opt_osname.h in include

=C2=A0 =C2=A0 This allows the subdirs that do more work to run in parallel<= br>
=C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 jrtc27
=C2=A0 =C2=A0 Differential Revision:=C2=A0 https://revi= ews.freebsd.org/D42947
---
=C2=A0usr.sbin/bsdinstall/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 7 ++++---
=C2=A0usr.sbin/bsdinstall/Makefile.depend=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0| 12 +++++++-----
=C2=A0usr.sbin/bsdinstall/Makefile.inc=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 |=C2=A0 3 +++
=C2=A0usr.sbin/bsdinstall/distextract/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 |= =C2=A0 9 ---------
=C2=A0usr.sbin/bsdinstall/distextract/Makefile.depend |=C2=A0 1 +
=C2=A0usr.sbin/bsdinstall/distfetch/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 |=C2=A0 1 -
=C2=A0usr.sbin/bsdinstall/distfetch/Makefile.depend=C2=A0 =C2=A0|=C2=A0 2 += -
=C2=A0usr.sbin/bsdinstall/include/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 | 13 +++++++++++++
=C2=A0usr.sbin/bsdinstall/include/Makefile.depend=C2=A0 =C2=A0 =C2=A0| 10 += +++++++++
=C2=A0usr.sbin/bsdinstall/partedit/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0|=C2=A0 1 -
=C2=A0usr.sbin/bsdinstall/partedit/Makefile.depend=C2=A0 =C2=A0 |=C2=A0 2 += -
=C2=A011 files changed, 40 insertions(+), 21 deletions(-)

diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile index bbf8071a91c3..422bdcaaa77a 100644
--- a/usr.sbin/bsdinstall/Makefile
+++ b/usr.sbin/bsdinstall/Makefile
@@ -1,9 +1,9 @@

-OSNAME?=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0FreeBSD
=C2=A0SUBDIR=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 distextract distfetch partedit r= unconsoles scripts
=C2=A0SUBDIR_PARALLEL=3D
-SUBDIR_DEPEND_distfetch =3D distextract
-SUBDIR_DEPEND_partedit =3D distextract
+SUBDIR_DEPEND_distextract =3D include
+SUBDIR_DEPEND_distfetch =3D include
+SUBDIR_DEPEND_partedit =3D include
=C2=A0SCRIPTS=3D bsdinstall
=C2=A0MAN=3D bsdinstall.8
=C2=A0PACKAGE=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0bsdinstall
@@ -11,5 +11,6 @@ PACKAGE=3D=C2=A0 =C2=A0 =C2=A0 bsdinstall
=C2=A0SCRIPTS+=3D=C2=A0 =C2=A0 =C2=A0 startbsdinstall
=C2=A0SCRIPTSDIR_startbsdinstall=3D=C2=A0 =C2=A0 ${LIBEXECDIR}/bsdinstall
+UPDATE_DEPENDFILE=3D no

=C2=A0.include <bsd.prog.mk>
diff --git a/usr.sbin/bsdinstall/Makefile.depend b/usr.sbin/bsdinstall/Make= file.depend
index 11aba52f82cf..6ce3965b1642 100644
--- a/usr.sbin/bsdinstall/Makefile.depend
+++ b/usr.sbin/bsdinstall/Makefile.depend
@@ -1,10 +1,12 @@
-# Autogenerated - do NOT edit!
+# Not autogenerated - take care

=C2=A0DIRDEPS =3D \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0usr.sbin/bsdinstall/distextract \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0usr.sbin/bsdinstall/distfetch \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0usr.sbin/bsdinstall/include \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0usr.sbin/bsdinstall/partedit \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0usr.sbin/bsdinstall/runconsoles \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0usr.sbin/bsdinstall/scripts \


=C2=A0.include <dirdeps.mk>
-
-.if ${DEP_RELDIR} =3D=3D ${_DEP_RELDIR}
-# local dependencies - needed for -jN in clean tree
-.endif
diff --git a/usr.sbin/bsdinstall/Makefile.inc b/usr.sbin/bsdinstall/Makefil= e.inc
index dc4e35b73799..c0907ffac469 100644
--- a/usr.sbin/bsdinstall/Makefile.inc
+++ b/usr.sbin/bsdinstall/Makefile.inc
@@ -1 +1,4 @@
=C2=A0PACKAGE=3Dbsdinstall
+
+CFLAGS+=3D -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/../include
+
diff --git a/usr.sbin/bsdinstall/distextract/Makefile b/usr.sbin/bsdinstall= /distextract/Makefile
index 368e1b1378ab..6813c9a79391 100644
--- a/usr.sbin/bsdinstall/distextract/Makefile
+++ b/usr.sbin/bsdinstall/distextract/Makefile
@@ -1,18 +1,9 @@

=C2=A0BINDIR=3D ${LIBEXECDIR}/bsdinstall
=C2=A0PROG=3D=C2=A0 distextract
-CFLAGS+=3D -I${SRCTOP}/contrib/bsddialog/lib -I.
=C2=A0LIBADD=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 archive bsddialog m
=C2=A0SRCS=3D=C2=A0 distextract.c

=C2=A0MAN=3D
-GENHDRS=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0opt_osname.h
-SRCS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${GENHDRS}
-CLEANFILES+=3D=C2=A0 =C2=A0${GENHDRS}
-
-opt_osname.h: .PHONY
-=C2=A0 =C2=A0 =C2=A0 =C2=A0if ! grep -q "^#define OSNAME \"${OSN= AME}\"$"" ${.TARGET}; then \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0echo "#define = OSNAME \"${OSNAME}\"" > ${.TARGET}; \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0fi

=C2=A0.include <bsd.prog.mk>
diff --git a/usr.sbin/bsdinstall/distextract/Makefile.depend b/usr.sbin/bsd= install/distextract/Makefile.depend
index 10731d6ccb01..dd87c979eb80 100644
--- a/usr.sbin/bsdinstall/distextract/Makefile.depend
+++ b/usr.sbin/bsdinstall/distextract/Makefile.depend
@@ -9,6 +9,7 @@ DIRDEPS =3D \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 lib/libc \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 lib/libcompiler_rt \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 lib/msun \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0usr.sbin/bsdinstall/include \


=C2=A0.include <dirdeps.mk>
diff --git a/usr.sbin/bsdinstall/distfetch/Makefile b/usr.sbin/bsdinstall/d= istfetch/Makefile
index 325f5c55cfd5..8a9011734592 100644
--- a/usr.sbin/bsdinstall/distfetch/Makefile
+++ b/usr.sbin/bsdinstall/distfetch/Makefile
@@ -1,7 +1,6 @@

=C2=A0BINDIR=3D ${LIBEXECDIR}/bsdinstall
=C2=A0PROG=3D=C2=A0 distfetch
-CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0-I${SRCTOP}/contrib/bsddialog/lib -I$= {.OBJDIR}/../distextract
=C2=A0LIBADD=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 fetch bsddialog

=C2=A0MAN=3D
diff --git a/usr.sbin/bsdinstall/distfetch/Makefile.depend b/usr.sbin/bsdin= stall/distfetch/Makefile.depend
index 16e54d9b2a6e..9e9ac6d1bae8 100644
--- a/usr.sbin/bsdinstall/distfetch/Makefile.depend
+++ b/usr.sbin/bsdinstall/distfetch/Makefile.depend
@@ -8,7 +8,7 @@ DIRDEPS =3D \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 lib/libc \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 lib/libcompiler_rt \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 lib/libfetch \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0usr.sbin/bsdinstall/distextract \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0usr.sbin/bsdinstall/include \


=C2=A0.include <dirdeps.mk>
diff --git a/usr.sbin/bsdinstall/include/Makefile b/usr.sbin/bsdinstall/inc= lude/Makefile
new file mode 100644
index 000000000000..15f947defa9b
--- /dev/null
+++ b/usr.sbin/bsdinstall/include/Makefile
@@ -0,0 +1,13 @@
+OSNAME?=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0FreeBSD
+GENHDRS=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0opt_osname.h
+SRCS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${GENHDRS}
+CLEANFILES+=3D=C2=A0 =C2=A0${GENHDRS}
+
+opt_osname.h: ${META_NOPHONY}
+=C2=A0 =C2=A0 =C2=A0 =C2=A0@if ! grep -q "^#define OSNAME \"${OS= NAME}\"$"" ${.TARGET} 2> /dev/null; then \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0echo "#define = OSNAME \"${OSNAME}\"" > ${.TARGET}; \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0fi
+
+MK_STAGING=3D no
+
+.include <bsd.prog.mk>
diff --git a/usr.sbin/bsdinstall/include/Makefile.depend b/usr.sbin/bsdinst= all/include/Makefile.depend
new file mode 100644
index 000000000000..11aba52f82cf
--- /dev/null
+++ b/usr.sbin/bsdinstall/include/Makefile.depend
@@ -0,0 +1,10 @@
+# Autogenerated - do NOT edit!
+
+DIRDEPS =3D \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} =3D=3D ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/usr.sbin/bsdinstall/partedit/Makefile b/usr.sbin/bsdinstall/pa= rtedit/Makefile
index 8d7156fd16d2..397e404a126f 100644
--- a/usr.sbin/bsdinstall/partedit/Makefile
+++ b/usr.sbin/bsdinstall/partedit/Makefile
@@ -4,7 +4,6 @@ PROG=3D=C2=A0 =C2=A0partedit
=C2=A0LINKS=3D ${BINDIR}/partedit ${BINDIR}/autopart \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ${BINDIR}/partedit ${BINDIR}/scriptedpart
=C2=A0SYMLINKS=3D ../libexec/bsdinstall/partedit /usr/sbin/sade
-CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0-I${SRCTOP}/contrib/bsddialog/lib -I$= {.OBJDIR}/../distextract
=C2=A0LIBADD+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0geom util bsddialog

=C2=A0PARTEDIT_ARCH=3D ${MACHINE}
diff --git a/usr.sbin/bsdinstall/partedit/Makefile.depend b/usr.sbin/bsdins= tall/partedit/Makefile.depend
index 4d5ca3e13299..68a44a4d87a7 100644
--- a/usr.sbin/bsdinstall/partedit/Makefile.depend
+++ b/usr.sbin/bsdinstall/partedit/Makefile.depend
@@ -9,7 +9,7 @@ DIRDEPS =3D \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 lib/libcompiler_rt \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 lib/libgeom \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 lib/libutil \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0usr.sbin/bsdinstall/distextract \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0usr.sbin/bsdinstall/include \


=C2=A0.include <dirdeps.mk>
--0000000000009ea9a9060be31df0--