From ea7b6e14f9c94d85036bcf967ec85312eeb6fd11 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Mon, 12 Jul 2021 01:59:37 -0700 Subject: [PATCH] ams-libs: fix change detection for library building --- libraries/libexosphere/arm.mk | 4 +++- libraries/libexosphere/arm64.mk | 4 +++- libraries/libmesosphere/Makefile | 4 +++- libraries/libstratosphere/Makefile | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/libraries/libexosphere/arm.mk b/libraries/libexosphere/arm.mk index 0240cf8f1..35592ce4b 100644 --- a/libraries/libexosphere/arm.mk +++ b/libraries/libexosphere/arm.mk @@ -96,6 +96,8 @@ clean-$(strip $1): @rm -fr $$(foreach hdr,$$(GCH_DIRS),$$(hdr)/$$(ATMOSPHERE_BOARD_NAME)_$$(ATMOSPHERE_ARCH_NAME)_$(strip $1)) @for i in $$(GCH_DIRS) $$(ATMOSPHERE_BUILD_DIR) $$(ATMOSPHERE_LIBRARY_DIR); do [ -d $$$$i ] && rmdir --ignore-fail-on-non-empty $$$$i || true; done +.PHONY: $(strip $1) clean-$(strip $1) $$(ATMOSPHERE_LIBRARY_DIR)/$(strip $2) + endef $(eval $(call ATMOSPHERE_ADD_TARGET, release, $(TARGET).a, \ @@ -117,7 +119,7 @@ $(eval $(call ATMOSPHERE_ADD_TARGET, audit, $(TARGET)_audit.a, \ ALL_GCH_IDENTIFIERS := $(foreach config,$(ATMOSPHERE_BUILD_CONFIGS),$(ATMOSPHERE_BOARD_NAME)_$(ATMOSPHERE_ARCH_NAME)_$(config)) ALL_GCH_FILES := $(foreach hdr,$(PRECOMPILED_HEADERS:.hpp=.hpp.gch),$(foreach id,$(ALL_GCH_IDENTIFIERS),$(hdr)/$(id))) -.PHONY: clean all $(foreach config,$(ATMOSPHERE_BUILD_CONFIGS),$(config) clean-$(config)) +.PHONY: clean all $(ATMOSPHERE_LIBRARY_DIR) $(GCH_DIRS): @[ -d $@ ] || mkdir -p $@ diff --git a/libraries/libexosphere/arm64.mk b/libraries/libexosphere/arm64.mk index 5d54761bf..78e2cc540 100644 --- a/libraries/libexosphere/arm64.mk +++ b/libraries/libexosphere/arm64.mk @@ -96,6 +96,8 @@ clean-$(strip $1): @rm -fr $$(foreach hdr,$$(GCH_DIRS),$$(hdr)/$$(ATMOSPHERE_BOARD_NAME)_$$(ATMOSPHERE_ARCH_NAME)_$(strip $1)) @for i in $$(GCH_DIRS) $$(ATMOSPHERE_BUILD_DIR) $$(ATMOSPHERE_LIBRARY_DIR); do [ -d $$$$i ] && rmdir --ignore-fail-on-non-empty $$$$i || true; done +.PHONY: $(strip $1) clean-$(strip $1) $$(ATMOSPHERE_LIBRARY_DIR)/$(strip $2) + endef $(eval $(call ATMOSPHERE_ADD_TARGET, release, $(TARGET).a, \ @@ -117,7 +119,7 @@ $(eval $(call ATMOSPHERE_ADD_TARGET, audit, $(TARGET)_audit.a, \ ALL_GCH_IDENTIFIERS := $(foreach config,$(ATMOSPHERE_BUILD_CONFIGS),$(ATMOSPHERE_BOARD_NAME)_$(ATMOSPHERE_ARCH_NAME)_$(config)) ALL_GCH_FILES := $(foreach hdr,$(PRECOMPILED_HEADERS:.hpp=.hpp.gch),$(foreach id,$(ALL_GCH_IDENTIFIERS),$(hdr)/$(id))) -.PHONY: clean all $(foreach config,$(ATMOSPHERE_BUILD_CONFIGS),$(config) clean-$(config)) +.PHONY: clean all $(ATMOSPHERE_LIBRARY_DIR) $(GCH_DIRS): @[ -d $@ ] || mkdir -p $@ diff --git a/libraries/libmesosphere/Makefile b/libraries/libmesosphere/Makefile index 551e1ef47..3bc92c36c 100644 --- a/libraries/libmesosphere/Makefile +++ b/libraries/libmesosphere/Makefile @@ -88,6 +88,8 @@ clean-$(strip $1): @rm -fr $$(foreach hdr,$$(GCH_DIRS),$$(hdr)/$$(ATMOSPHERE_BOARD_NAME)_$$(ATMOSPHERE_ARCH_NAME)_$(strip $1)) @for i in $$(GCH_DIRS) $$(ATMOSPHERE_BUILD_DIR) $$(ATMOSPHERE_LIBRARY_DIR); do [ -d $$$$i ] && rmdir --ignore-fail-on-non-empty $$$$i || true; done +.PHONY: $(strip $1) clean-$(strip $1) $$(ATMOSPHERE_LIBRARY_DIR)/$(strip $2) + endef $(eval $(call ATMOSPHERE_ADD_TARGET, release, $(TARGET).a, \ @@ -109,7 +111,7 @@ $(eval $(call ATMOSPHERE_ADD_TARGET, audit, $(TARGET)_audit.a, \ ALL_GCH_IDENTIFIERS := $(foreach config,$(ATMOSPHERE_BUILD_CONFIGS),$(ATMOSPHERE_BOARD_NAME)_$(ATMOSPHERE_ARCH_NAME)_$(config)) ALL_GCH_FILES := $(foreach hdr,$(PRECOMPILED_HEADERS:.hpp=.hpp.gch),$(foreach id,$(ALL_GCH_IDENTIFIERS),$(hdr)/$(id))) -.PHONY: clean all $(foreach config,$(ATMOSPHERE_BUILD_CONFIGS),$(config) clean-$(config)) +.PHONY: clean all $(ATMOSPHERE_LIBRARY_DIR) $(GCH_DIRS): @[ -d $@ ] || mkdir -p $@ diff --git a/libraries/libstratosphere/Makefile b/libraries/libstratosphere/Makefile index cca5aba50..8c3fbc990 100644 --- a/libraries/libstratosphere/Makefile +++ b/libraries/libstratosphere/Makefile @@ -77,7 +77,7 @@ export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ -I. -.PHONY: clean all +.PHONY: clean all lib/$(TARGET).a #--------------------------------------------------------------------------------- all: lib/$(TARGET).a