Prevent scaninc touching tests when make-ing non-test builds (#6812)

This commit is contained in:
mudskipper13 2025-05-15 15:15:22 +07:00 committed by GitHub
parent b5fbced691
commit ad0e98bb12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -404,6 +404,7 @@ ifneq ($(NODEP),1)
-include $(addprefix $(OBJ_DIR)/,$(C_SRCS:.c=.d))
endif
ifeq ($(TEST),1)
$(TEST_BUILDDIR)/%.o: $(TEST_SUBDIR)/%.c
@echo "$(CC1) <flags> -o $@ $<"
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) -i $< charmap.txt | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
@ -414,6 +415,7 @@ $(TEST_BUILDDIR)/%.d: $(TEST_SUBDIR)/%.c
ifneq ($(NODEP),1)
-include $(addprefix $(OBJ_DIR)/,$(TEST_SRCS:.c=.d))
endif
endif
$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s
$(AS) $(ASFLAGS) -o $@ $<