make fmt-c a unit

This commit is contained in:
2025-08-03 21:44:43 +03:00
parent 3ad25b3788
commit 41c3f3bd98
4 changed files with 9 additions and 7 deletions

View File

@@ -1,19 +1,19 @@
CHICKEN_C = csc CHICKEN_C = csc
MODULES = sexc modules templates utils MODULES = sexc modules templates utils fmt-c
OBJ = $(MODULES:%=%.o) OBJ = $(MODULES:%=%.o)
# chicken flags
CFLAGS = -compile-syntax
sexc: main.o $(OBJ) sexc: main.o $(OBJ)
$(CHICKEN_C) $^ -o $@ $(CHICKEN_C) $^ -o $@
main.o: main.scm main.o: main.scm
$(CHICKEN_C) $< -c -o $@ $(CHICKEN_C) $< -c -o $@
templates.o: templates.scm
$(CHICKEN_C) $< -c -o $@ -compile-syntax
%.o: %.scm %.o: %.scm
$(CHICKEN_C) $< -e -c -o $@ $(CFLAGS) $(CHICKEN_C) $< -e -c -o $@
sex-tests: $(OBJ) tests/run.scm sex-tests: $(OBJ) tests/run.scm
$(CHICKEN_C) tests/run.scm -c -o sex-tests.o $(CHICKEN_C) tests/run.scm -c -o sex-tests.o

View File

@@ -6,6 +6,8 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; additional state information ;; additional state information
(declare (unit fmt-c))
(import fmt) (import fmt)
(define (fmt-in-macro? st) (fmt-ref st 'in-macro?)) (define (fmt-in-macro? st) (fmt-ref st 'in-macro?))

View File

@@ -1,11 +1,10 @@
(declare (unit sexc) (declare (unit sexc)
(uses sex-modules (uses sex-modules
fmt-c
templates)) templates))
(include "utils.macros.scm") (include "utils.macros.scm")
(load "fmt-c.scm")
(import brev-separate (import brev-separate
(chicken file) (chicken file)
(chicken pathname) (chicken pathname)

View File

@@ -33,4 +33,5 @@
(test 'a.b (make-field-access '(.b a))) (test 'a.b (make-field-access '(.b a)))
(test 'a.b.c (make-field-access '(.c a.b))) (test 'a.b.c (make-field-access '(.c a.b)))
;;; Should be the last in the test suite
(test-exit) (test-exit)