From d0eab90c9bed04e27f19e605438d0cd90699390b Mon Sep 17 00:00:00 2001 From: naskya Date: Mon, 22 Jan 2024 20:33:01 +0900 Subject: [PATCH] dev: use recursive wildcard in Makefile --- Makefile | 4 +++- docs/contributing.md | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3446ec862..7d0a961e9 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ T := dev/make_virtual_target +recursive_wildcard=$(foreach d, $(wildcard $(1:=/*)), $(call recursive_wildcard, $d, $2) $(filter $(subst *, %, $2), $d)) + PACKAGE_JSONS := package.json PACKAGE_JSONS += packages/backend/package.json PACKAGE_JSONS += packages/client/package.json @@ -8,7 +10,7 @@ PACKAGE_JSONS += packages/megalodon/package.json PACKAGE_JSONS += packages/sw/package.json RUST_DIR := packages/backend/native-utils -RUSTY_STUFF := $(foreach dir, $(RUST_DIR)/src, $(wildcard $(dir)/*)) +RUSTY_STUFF := $(call recursive_wildcard, $(RUST_DIR)/src, *) RUSTY_STUFF += $(RUST_DIR)/Cargo.toml MIGRATIONS := $(foreach dir, packages/backend/migration, $(wildcard $(dir)/*)) diff --git a/docs/contributing.md b/docs/contributing.md index c4155298a..ba6422119 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -12,7 +12,7 @@ - podman - podman-compose - - make + - GNU Make - nodejs - pnpm - shellcheck