From b6b6170b936460096bfa60fe30f38429875eb5e8 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..b27fa48c 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ DEPS = $(OBJS:.o=.d) all: $(TARGET) test: $(TARGET) - make -C test/ + cd test/ && $(MAKE) MAKEFLAGS= $(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 MAKEFLAGS= -include $(DEPS)