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 28facf925f
commit 2c2e56ffc5
4 changed files with 11 additions and 48 deletions

View File

@@ -1,16 +0,0 @@
CHICKEN_C = csc
CSC_FLAGS += -K prefix -static
# sextest reuses sexc's reader (and its utils dependency) instead of
# duplicating the S-expression reader: both are linked from the root,
# found there through the repository path
ROOT = ../..
export CHICKEN_REPOSITORY_PATH := $(abspath $(ROOT)):$(or $(CHICKEN_REPOSITORY_PATH),$(shell chicken-install -repository))
sextest: sextest.scm $(ROOT)/reader.o $(ROOT)/utils.o
$(CHICKEN_C) $(CSC_FLAGS) sextest.scm -o sextest -link reader,utils
clean:
rm -f sextest
.PHONY: clean