Skip to content

Commit

Permalink
fix(Makefile): evaluate composer prerequisits during build
Browse files Browse the repository at this point in the history
`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 <[email protected]>
  • Loading branch information
max-nextcloud committed Sep 26, 2024
1 parent 9f5b289 commit 9cc23e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9cc23e1

Please sign in to comment.