From nobody Fri Apr 21 05:01:25 2023 X-Original-To: dev-commits-src-main@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 4Q2j6Y4YV4z476Vc; Fri, 21 Apr 2023 05:01:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2j6Y42Wtz3HNf; Fri, 21 Apr 2023 05:01:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682053285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ITVCGDDpcTdQC7B2Qojq9j6P5ea7jsqXgqtu0GwnfLc=; b=pSnA6gmuqdBVkTkHFIbMyG8SpDSobzcF6q7NB4dq+iCLRK8lu92uBC9P9/Q41XBm17AXC5 wjka8B9L+cNqUYcAXbWiUd/MWGjrL2l6h9nF+7cxw3Zx9JtkoaS1Hw4ivicWs0grO3SYWb tYE1Sv4WfE2ZBwS+0TzfvCXLYVbae1fbgfgyVmxCgTsRGw31pHjkXtY73I/aVidxHiypn1 /Mm6NENWyyrdojavXFhxVwzFikGroM1Qmasd1Q7KO1Yj8Or8n/A3550otyiM54esJserJV kzEE9QP68SNmHsu86P/03rs/H1z6VTVGLl7EBdn/6KSCj3z74SZ9o9UE3J9+hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682053285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ITVCGDDpcTdQC7B2Qojq9j6P5ea7jsqXgqtu0GwnfLc=; b=LG/lGs7Gm7jrTz3zGguqAL0yBMlUZTpCKSj/dIEh4xA6LdzBhRLEquC/Ycqm7x/X7LogBL zC69ZHirCxsXHKsAnlqMuGK9LucIpeheQFBYeMjk/5rpQc2gP7dCQr2yHdAbmbfhN7Z7J2 0Z/xKL20JT0aAgzpcJhXYwxZduBaJ+VCy0bFflTNxu354Cc2Mt/eLNdBW+P99V/eYxlb6Q uxsTgGKnzci81t7mmsiG5qkiyRjraYLBjXlPaxWMZt7h63kmPgOS2/5QkgAYqRptSotI9A b0x51Gdejcxh0EeEhEKWCdzj2aZw2kPoTOKLUp+eD+jGDVu6byEsO9Zo8xgIIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682053285; a=rsa-sha256; cv=none; b=kRW0BrLJOMaT27U5W1SfA0GRzVk7OuKmFicwgMzEY6umXSf7BXGzKVmla0Y6zpYO+ItbkT eIrJDedgqxwQ0g49jl/PaIzJdC2Ulej0pzUxnDWqbK7eWxYTen9q6J807izyDVBtVJZVJw 0Rp5WqRLIcXTCbBwhtS7GRYM2H02TdJgxAqRyRaDWDOkPUfe2ZI04I4c84xSr+L87b92mB c7JkD4fd9nr/hlbplt5ERIs0uDP86FM8mb83ybGWA2n4pcEahN0h2PGXUKI1Boz3a3A3kp K+sdiCqnnmKd5quU0OsHi5IqVXa2Yvb0Vo9kv6z0Ide2MMyJdhfJprlok3kmcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2j6Y35DFz16RR; Fri, 21 Apr 2023 05:01:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33L51PNd011708; Fri, 21 Apr 2023 05:01:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L51PBT011707; Fri, 21 Apr 2023 05:01:25 GMT (envelope-from git) Date: Fri, 21 Apr 2023 05:01:25 GMT Message-Id: <202304210501.33L51PBT011707@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 0c3627f44d49 - main - bsdinstall avoid subdir depending on parent List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c3627f44d49b460d5b9156145dec9d4a91beb2c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0c3627f44d49b460d5b9156145dec9d4a91beb2c commit 0c3627f44d49b460d5b9156145dec9d4a91beb2c Author: Simon J. Gerraty AuthorDate: 2023-04-21 05:00:40 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-21 05:00:40 +0000 bsdinstall avoid subdir depending on parent When not doing tree walks, it is bad for sub-dirs to depend on parents. Move the generation of opt_osname.h to distextract and have others that need that depend on it. In usr.sbin/bsdinstall use SUBDIR_DEPEND_ so tree walking still works. Reviewed by: obrien Differential Revision: https://reviews.freebsd.org/D39742 --- usr.sbin/bsdinstall/Makefile | 9 ++------- usr.sbin/bsdinstall/distextract/Makefile | 11 ++++++++++- usr.sbin/bsdinstall/distfetch/Makefile | 2 +- usr.sbin/bsdinstall/partedit/Makefile | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile index e71cae726536..aaa006694222 100644 --- a/usr.sbin/bsdinstall/Makefile +++ b/usr.sbin/bsdinstall/Makefile @@ -3,19 +3,14 @@ OSNAME?= FreeBSD SUBDIR= distextract distfetch partedit runconsoles scripts SUBDIR_PARALLEL= +SUBDIR_DEPEND_distfetch = distextract +SUBDIR_DEPEND_partedit = distextract SCRIPTS= bsdinstall MAN= bsdinstall.8 PACKAGE= bsdinstall -GENHDRS= opt_osname.h -SRCS+= ${GENHDRS} -CLEANFILES+= ${GENHDRS} SCRIPTS+= startbsdinstall SCRIPTSDIR_startbsdinstall= ${LIBEXECDIR}/bsdinstall -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 b/usr.sbin/bsdinstall/distextract/Makefile index 6ae9bb65e8fb..0292c01e78f4 100644 --- a/usr.sbin/bsdinstall/distextract/Makefile +++ b/usr.sbin/bsdinstall/distextract/Makefile @@ -2,9 +2,18 @@ BINDIR= ${LIBEXECDIR}/bsdinstall PROG= distextract -CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/.. +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/distfetch/Makefile b/usr.sbin/bsdinstall/distfetch/Makefile index 0104df0e3aec..1555719dd15d 100644 --- a/usr.sbin/bsdinstall/distfetch/Makefile +++ b/usr.sbin/bsdinstall/distfetch/Makefile @@ -2,7 +2,7 @@ BINDIR= ${LIBEXECDIR}/bsdinstall PROG= distfetch -CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/.. +CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/../distextract LIBADD= fetch bsddialog MAN= diff --git a/usr.sbin/bsdinstall/partedit/Makefile b/usr.sbin/bsdinstall/partedit/Makefile index 96c4ddb53961..df17028eab2a 100644 --- a/usr.sbin/bsdinstall/partedit/Makefile +++ b/usr.sbin/bsdinstall/partedit/Makefile @@ -5,7 +5,7 @@ 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}/.. +CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/../distextract LIBADD+= geom util bsddialog PARTEDIT_ARCH= ${MACHINE}