1
0
forked from alex-eg/sex

build the unit tests and sextest from the root

Each subdirectory's Makefile repeated the compiler's module list just to
link one program, and its result was copied back to the root anyway.
This commit is contained in:
2026-10-14 23:21:20 +03:00
parent c65721a070
commit a504fc1410
4 changed files with 14 additions and 51 deletions

View File

@@ -1,21 +0,0 @@
CHICKEN_C = csc
CSC_FLAGS += -K prefix -static
# The compiler's modules are built once, in the root; their import
# libraries and objects are found there through the repository path
ROOT = ..
export CHICKEN_REPOSITORY_PATH := $(abspath $(ROOT)):$(or $(CHICKEN_REPOSITORY_PATH),$(shell chicken-install -repository))
MODULES = utils types infer sex-macros reader sex-modules semen sex-fmt-c fmt-c-writer sexc
TESTS = basic semen reader fmt-c-writer utils line-directives codegen encapsulation args module-path types infer
TEST_SRCS = $(TESTS:%=%.scm)
sex-tests: run.scm $(TEST_SRCS) $(MODULES:%=$(ROOT)/%.o)
$(CHICKEN_C) $(CSC_FLAGS) run.scm -o sex-tests -link sexc
clean:
rm -f sex-tests
.PHONY: clean