:: commit 1868470041364bd550bd88fddf6cda6fdbc0069a

Mintsuki <mintsuki@protonmail.com> — 2025-03-13 03:32

parents: 97db4ca4ca

build: Install LICENSES files as documentation

diff --git a/3RDPARTY.md b/3RDPARTY.md
index 25cc3c1c..ece97f46 100644
--- a/3RDPARTY.md
+++ b/3RDPARTY.md
@@ -1,9 +1,9 @@
 # 3rd Party Software Acknowledgments
 
 The Limine project depends on several other projects which are pulled in by the
-./bootstrap script, or, in the case of release tarballs, are shipped alongside
-the core Limine code in the tarballs themselves, similar to ./bootstrap having
-been already run.
+`./bootstrap` script, or, in the case of release tarballs, are shipped
+alongside the core Limine code in the tarballs themselves, similar to
+`./bootstrap` having already been run.
 
 These additional projects are NOT covered by the License as present inside the
 COPYING file, but are instead licensed as described by each individual
@@ -33,7 +33,11 @@ below) provides headers and build-time support for UEFI.
     Nyu-EFI, see
     https://scancode-licensedb.aboutcode.org/bsd-no-disclaimer-unmodified.html
     and the LicenseRef file
-    [here](LICENSES/LicenseRef-scancode-bsd-no-disclaimer-unmodified.txt).
+    [here](LICENSES/LicenseRef-scancode-bsd-no-disclaimer-unmodified.txt),
+    in case of viewing this file from inside the source tree, alternatively at
+    `${DOCDIR}/LICENSES/LicenseRef-scancode-bsd-no-disclaimer-unmodified.txt`
+    in case of installed copies, assuming the file has not been otherwise
+    removed by the packager.
 
 - [tinf](https://github.com/jibsen/tinf) (Zlib) is used in early x86 BIOS
 stages for GZIP decompression of stage2.
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 915e0bb9..3b5d1c2f 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -136,6 +136,8 @@ clean: limine-bios-clean limine-uefi-ia32-clean limine-uefi-x86-64-clean limine-
 install: all
 	$(INSTALL) -d '$(call SHESCAPE,$(DESTDIR)$(docdir))'
 	$(INSTALL_DATA) '$(call SHESCAPE,$(SRCDIR))/COPYING' '$(call SHESCAPE,$(DESTDIR)$(docdir))/'
+	$(INSTALL) -d '$(call SHESCAPE,$(DESTDIR)$(docdir))/LICENSES'
+	$(INSTALL_DATA) '$(call SHESCAPE,$(SRCDIR))/LICENSES/LicenseRef-scancode-bsd-no-disclaimer-unmodified.txt' '$(call SHESCAPE,$(DESTDIR)$(docdir))/LICENSES/'
 	$(INSTALL_DATA) '$(call SHESCAPE,$(SRCDIR))/3RDPARTY.md' '$(call SHESCAPE,$(DESTDIR)$(docdir))/'
 	$(INSTALL_DATA) '$(call SHESCAPE,$(SRCDIR))/CONFIG.md' '$(call SHESCAPE,$(DESTDIR)$(docdir))/'
 	$(INSTALL_DATA) '$(call SHESCAPE,$(SRCDIR))/PROTOCOL.md' '$(call SHESCAPE,$(DESTDIR)$(docdir))/'
@@ -184,6 +186,7 @@ install-strip: install
 .PHONY: uninstall
 uninstall:
 	rm -f '$(call SHESCAPE,$(DESTDIR)$(docdir))/COPYING'
+	rm -rf '$(call SHESCAPE,$(DESTDIR)$(docdir))/LICENSES'
 	rm -f '$(call SHESCAPE,$(DESTDIR)$(docdir))/3RDPARTY.md'
 	rm -f '$(call SHESCAPE,$(DESTDIR)$(docdir))/CONFIG.md'
 	rm -f '$(call SHESCAPE,$(DESTDIR)$(docdir))/PROTOCOL.md'
tab: 248 wrap: offon