From 9cc23e1e1af980e539cc6b9212680d812e39250b Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 26 Sep 2024 12:24:33 +0200 Subject: [PATCH] fix(Makefile): evaluate composer prerequisits during build `ifeq (, $(wildcard $(BUILD_TOOLS_DIR)/composer.phar))` is evaluated before any targets are build. Therefore the file still exists. It is only removed later when the `dist-clean` target is build. Use a file prerequisit instead. This is evaluated when the target is build. Signed-off-by: Max --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2808746b0..c1cab8f6f 100644 --- a/Makefile +++ b/Makefile @@ -34,11 +34,11 @@ all: setup-dev lint build test setup-dev: composer-install node-modules # Install build tools -composer: -ifeq (, $(wildcard $(BUILD_TOOLS_DIR)/composer.phar)) +composer: $(BUILD_TOOLS_DIR)/composer.phar + +$(BUILD_TOOLS_DIR)/composer.phar: mkdir -p $(BUILD_TOOLS_DIR) cd $(BUILD_TOOLS_DIR) && curl -sS https://getcomposer.org/installer | php -endif $(BUILD_TOOLS_DIR)/info.xsd: mkdir -p $(BUILD_TOOLS_DIR)