build: Use autoconf generated install dir variables

This commit is contained in:
mintsuki 2022-04-13 00:47:19 +02:00
parent bcced191a4
commit e8bab04ae8

View File

@ -1,4 +1,6 @@
PREFIX ?= @prefix@
override prefix := @prefix@
override exec_prefix := @exec_prefix@
DESTDIR ?=
override BUILDDIR := @BUILDDIR@
@ -97,29 +99,29 @@ clean: limine-bios-clean limine-uefi32-clean limine-uefi64-clean
.PHONY: install-data
install-data:
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/share'
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/share/limine'
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine.sys' '$(DESTDIR)$(PREFIX)/share/limine/' || true
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine-cd.bin' '$(DESTDIR)$(PREFIX)/share/limine/' || true
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' '$(DESTDIR)$(PREFIX)/share/limine/' || true
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine-pxe.bin' '$(DESTDIR)$(PREFIX)/share/limine/' || true
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/BOOTX64.EFI' '$(DESTDIR)$(PREFIX)/share/limine/' || true
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/BOOTIA32.EFI' '$(DESTDIR)$(PREFIX)/share/limine/' || true
$(INSTALL) -d '$(DESTDIR)@datarootdir@'
$(INSTALL) -d '$(DESTDIR)@datarootdir@/limine'
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine.sys' '$(DESTDIR)@datarootdir@/limine/' || true
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine-cd.bin' '$(DESTDIR)@datarootdir@/limine/' || true
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' '$(DESTDIR)@datarootdir@/limine/' || true
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine-pxe.bin' '$(DESTDIR)@datarootdir@/limine/' || true
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/BOOTX64.EFI' '$(DESTDIR)@datarootdir@/limine/' || true
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/BOOTIA32.EFI' '$(DESTDIR)@datarootdir@/limine/' || true
.PHONY: install-strip
install-strip: install-data
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/bin'
$(INSTALL) -s '$(call SHESCAPE,$(BINDIR))/limine-deploy' '$(DESTDIR)$(PREFIX)/bin/' || true
$(INSTALL) -d '$(DESTDIR)@bindir@'
$(INSTALL) -s '$(call SHESCAPE,$(BINDIR))/limine-deploy' '$(DESTDIR)@bindir@/' || true
.PHONY: install
install: install-data
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/bin'
$(INSTALL) '$(call SHESCAPE,$(BINDIR))/limine-deploy' '$(DESTDIR)$(PREFIX)/bin/' || true
$(INSTALL) -d '$(DESTDIR)@bindir@'
$(INSTALL) '$(call SHESCAPE,$(BINDIR))/limine-deploy' '$(DESTDIR)@bindir@/' || true
.PHONY: uninstall
uninstall:
rm -f '$(DESTDIR)$(PREFIX)/bin/limine-deploy'
rm -f '$(DESTDIR)$(PREFIX)/share/limine'
rm -f '$(DESTDIR)@bindir@/limine-deploy'
rm -f '$(DESTDIR)@datarootdir@/limine'
$(call MKESCAPE,$(BUILDDIR))/stage1.stamp: $(STAGE1_FILES) $(call MKESCAPE,$(BUILDDIR))/decompressor-build/decompressor.bin $(call MKESCAPE,$(BUILDDIR))/common-bios/stage2.bin.gz
mkdir -p '$(call SHESCAPE,$(BINDIR))'