git: e32fecd0c2c3 - main - loader: install help files only once
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 10 May 2023 00:20:37 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=e32fecd0c2c3ee37c47ee100f169e7eb0282a873
commit e32fecd0c2c3ee37c47ee100f169e7eb0282a873
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-05-05 17:43:33 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-05-10 00:18:19 +0000
loader: install help files only once
Every file should be installed exactly once by `make installworld`.
This is especially important for pkgbase.
Loader help files were being installed by each loader variant (e.g.,
the simp, lua, and 4th EFI loaders). Add a (slightly hacky) mechanism
to skip installing help files for all but one variant.
PR: 271178
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40021
---
stand/efi/loader_4th/Makefile | 1 +
stand/efi/loader_lua/Makefile | 1 +
stand/i386/loader_4th/Makefile | 1 +
stand/i386/loader_lua/Makefile | 1 +
stand/loader.mk | 2 ++
stand/userboot/userboot_4th/Makefile | 1 +
stand/userboot/userboot_lua/Makefile | 1 +
7 files changed, 8 insertions(+)
diff --git a/stand/efi/loader_4th/Makefile b/stand/efi/loader_4th/Makefile
index 3659f7efe673..a85fcdbb70b9 100644
--- a/stand/efi/loader_4th/Makefile
+++ b/stand/efi/loader_4th/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
LOADER_INTERP=4th
+INSTALL_LOADER_HELP_FILE=no
.include "../loader/Makefile"
diff --git a/stand/efi/loader_lua/Makefile b/stand/efi/loader_lua/Makefile
index 3a4268440cf6..3766588015ad 100644
--- a/stand/efi/loader_lua/Makefile
+++ b/stand/efi/loader_lua/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
LOADER_INTERP=lua
+INSTALL_LOADER_HELP_FILE=no
.include "../loader/Makefile"
diff --git a/stand/i386/loader_4th/Makefile b/stand/i386/loader_4th/Makefile
index 3659f7efe673..a85fcdbb70b9 100644
--- a/stand/i386/loader_4th/Makefile
+++ b/stand/i386/loader_4th/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
LOADER_INTERP=4th
+INSTALL_LOADER_HELP_FILE=no
.include "../loader/Makefile"
diff --git a/stand/i386/loader_lua/Makefile b/stand/i386/loader_lua/Makefile
index 3a4268440cf6..3766588015ad 100644
--- a/stand/i386/loader_lua/Makefile
+++ b/stand/i386/loader_lua/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
LOADER_INTERP=lua
+INSTALL_LOADER_HELP_FILE=no
.include "../loader/Makefile"
diff --git a/stand/loader.mk b/stand/loader.mk
index b30e9f4e66b7..2048fec750e4 100644
--- a/stand/loader.mk
+++ b/stand/loader.mk
@@ -171,8 +171,10 @@ CFLAGS+= -DELF_VERBOSE
HELP_FILES+= ${LDRSRC}/help.common
CFLAGS+= -DHELP_FILENAME=\"${HELP_FILENAME}\"
+.if ${INSTALL_LOADER_HELP_FILE:Uyes} == "yes"
CLEANFILES+= ${HELP_FILENAME}
FILES+= ${HELP_FILENAME}
+.endif
${HELP_FILENAME}: ${HELP_FILES}
cat ${HELP_FILES} | awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
diff --git a/stand/userboot/userboot_4th/Makefile b/stand/userboot/userboot_4th/Makefile
index a96efa8a52ba..b4b4b895e29b 100644
--- a/stand/userboot/userboot_4th/Makefile
+++ b/stand/userboot/userboot_4th/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
LOADER_INTERP=4th
+INSTALL_LOADER_HELP_FILE=no
.include "../userboot/Makefile"
diff --git a/stand/userboot/userboot_lua/Makefile b/stand/userboot/userboot_lua/Makefile
index d5b95c53641b..bba0f4a3fd71 100644
--- a/stand/userboot/userboot_lua/Makefile
+++ b/stand/userboot/userboot_lua/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
LOADER_INTERP=lua
+INSTALL_LOADER_HELP_FILE=no
.include "../userboot/Makefile"