Files
sex/tools/sextest/Makefile
alex-eg ed369a8ff7 make each compiler module one file, built once
A module was a body plus a (module ...) wrapper naming its exports, and
the wrapper came in up to three copies: the root's, a test one that
exported everything, and sextest's, each recompiling the same body.

csc -module makes a file a module by itself, with export forms in its
body, so the wrappers are gone. tests/ and tools/sextest/ link what the
root built, finding it on the repository path; the tests see what a
module exports, and the names only they need are exported as such.
2026-10-19 18:23:14 +03:00

17 lines
527 B
Makefile

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