chore: config update (#3510)

This commit is contained in:
Darshan K 2025-07-22 12:06:08 +05:30 committed by GitHub
parent 07e11899b0
commit d3f2bd010e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -53,15 +53,17 @@ endif
# default target, because it's the first one that doesn't start with '.'
all: | wakunode2 example2 chat2 chat2bridge libwaku
TEST_FILE := $(word 2,$(MAKECMDGOALS))
TEST_NAME := $(wordlist 3,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
test_file := $(word 2,$(MAKECMDGOALS))
define test_name
$(shell echo '$(MAKECMDGOALS)' | cut -d' ' -f3-)
endef
test:
ifeq ($(strip $(TEST_FILE)),)
ifeq ($(strip $(test_file)),)
$(MAKE) testcommon
$(MAKE) testwaku
else
$(MAKE) compile-test $(TEST_FILE) $(TEST_NAME)
$(MAKE) compile-test TEST_FILE="$(test_file)" TEST_NAME="$(call test_name)"
endif
# this prevents make from erroring on unknown targets like "Index"
%: