From 7faebdd0a80fdd4ee39960f39038b45163e3ac7a Mon Sep 17 00:00:00 2001 From: Lee Date: Sun, 3 Dec 2023 15:44:03 +0800 Subject: [PATCH] Fix recursive make with variable make --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2f5989b5..b6a26074 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ DEPS = $(OBJS:.o=.d) all: $(TARGET) test: $(TARGET) - make -C test/ + cd test/ && $(MAKE) $(TARGET): $(OBJS) $(CXX) $(CXXFLAGS) $(OBJS) -o $@ @@ -54,6 +54,6 @@ main.o: %.o: %.cpp y.tab.hpp clean: rm -rf *.s *.o lex.yy.* y.tab.* *.output *.ssa $(TARGET) $(OBJS) $(DEPS) - make -C test/ clean + cd test/ && $(MAKE) clean -include $(DEPS)