From 06c8f278e973bbeb0ff8462b2f44466cd65d21db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Sun, 26 May 2024 08:18:26 +0500 Subject: [PATCH] Make it so Makefile finds .java files at any subdirecotory nesting. --- .gitignore | 1 + Makefile | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7ca0be6..e6aad19 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ env.mk build/ +result.jar diff --git a/Makefile b/Makefile index 9cf3303..643d14e 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,9 @@ SRC_DIR := src OUT_DIR := build -SRCS := $(wildcard $(SRC_DIR)/*/*.java) +rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2)) + +SRCS := $(call rwildcard,$(SRC_DIR),*.java) CLS := $(SRCS:$(SRC_DIR)/%.java=$(OUT_DIR)/%.class)