build: Fix targets that built redundandly on install

This commit is contained in:
mintsuki 2022-04-17 08:46:28 +02:00
parent e22d5eff39
commit 8cb61a95d2
1 changed files with 11 additions and 10 deletions

View File

@ -84,18 +84,15 @@ override STAGE1_FILES := $(shell find '$(call SHESCAPE,$(SRCDIR))/stage1' -type
.PHONY: all .PHONY: all
all: @BUILD_UEFI@ @BUILD_BIOS@ all: @BUILD_UEFI@ @BUILD_BIOS@
.PHONY: limine-hdd.h $(call MKESCAPE,$(BINDIR))/limine-deploy: $(call MKESCAPE,$(SRCDIR))/limine-deploy/limine-deploy.c $(call MKESCAPE,$(BINDIR))/limine-hdd.bin
limine-hdd.h: $(call MKESCAPE,$(BINDIR))/limine-hdd.h mkdir -p '$(call SHESCAPE,$(BINDIR))'
$(call MKESCAPE,$(BINDIR))/limine-hdd.h: $(call MKESCAPE,$(BINDIR))/limine-hdd.bin
cd '$(call SHESCAPE,$(BINDIR))' && '$(call SHESCAPE,$(SRCDIR))/limine-deploy/hgen.sh' >limine-hdd.h cd '$(call SHESCAPE,$(BINDIR))' && '$(call SHESCAPE,$(SRCDIR))/limine-deploy/hgen.sh' >limine-hdd.h
cp '$(call SHESCAPE,$(SRCDIR))/limine-deploy/Makefile' '$(call SHESCAPE,$(SRCDIR))/limine-deploy/limine-deploy.c' '$(call SHESCAPE,$(SRCDIR))/limine-deploy/.gitignore' '$(call SHESCAPE,$(BINDIR))/'
$(MAKE) -C '$(call SHESCAPE,$(BINDIR))'
.PHONY: limine-deploy .PHONY: limine-deploy
limine-deploy: limine-deploy:
mkdir -p '$(call SHESCAPE,$(BINDIR))' $(MAKE) '$(call SHESCAPE,$(BINDIR))/limine-deploy'
cp '$(call SHESCAPE,$(SRCDIR))/limine-deploy/Makefile' '$(call SHESCAPE,$(SRCDIR))/limine-deploy/limine-deploy.c' '$(call SHESCAPE,$(SRCDIR))/limine-deploy/.gitignore' '$(call SHESCAPE,$(BINDIR))/'
$(MAKE) limine-hdd.h
$(MAKE) -C '$(call SHESCAPE,$(BINDIR))'
.PHONY: clean .PHONY: clean
clean: limine-bios-clean limine-uefi32-clean limine-uefi64-clean clean: limine-bios-clean limine-uefi32-clean limine-uefi64-clean
@ -149,10 +146,10 @@ ifneq ($(BUILD_LIMINE_DEPLOY), no)
$(MAKE) limine-deploy $(MAKE) limine-deploy
endif endif
.PHONY: limine-cd-efi $(call MKESCAPE,$(BINDIR))/limine-cd-efi.bin: $(if @BUILD_UEFI32@, $(call MKESCAPE,$(BUILDDIR))/common-uefi32/BOOTIA32.EFI) $(if @BUILD_UEFI64@, $(call MKESCAPE,$(BUILDDIR))/common-uefi64/BOOTX64.EFI)
limine-cd-efi:
ifneq ($(BUILD_CD_EFI), no) ifneq ($(BUILD_CD_EFI), no)
mkdir -p '$(call SHESCAPE,$(BINDIR))' mkdir -p '$(call SHESCAPE,$(BINDIR))'
rm -f '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin'
dd if=/dev/zero of='$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' bs=512 count=2880 2>/dev/null dd if=/dev/zero of='$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' bs=512 count=2880 2>/dev/null
( mformat -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' -f 1440 :: && \ ( mformat -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' -f 1440 :: && \
mmd -D s -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' ::/EFI && \ mmd -D s -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' ::/EFI && \
@ -164,6 +161,10 @@ ifneq ($(BUILD_CD_EFI), no)
) || rm -f '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' ) || rm -f '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin'
endif endif
.PHONY: limine-cd-efi
limine-cd-efi:
$(MAKE) '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin'
.PHONY: limine-uefi .PHONY: limine-uefi
limine-uefi: @BUILD_UEFI32@ @BUILD_UEFI64@ limine-uefi: @BUILD_UEFI32@ @BUILD_UEFI64@
$(MAKE) limine-cd-efi $(MAKE) limine-cd-efi