make fmt-c a unit
This commit is contained in:
10
Makefile
10
Makefile
@@ -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
|
||||||
|
|||||||
@@ -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?))
|
||||||
|
|||||||
3
sexc.scm
3
sexc.scm
@@ -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)
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user