blob: 8baed5eaed4e08d7bb45ed5f73109630dfa6bcf7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
dist_guilemodule_DATA = parameters.scm c.scm lisp.scm xml.scm \
lisp-lex.scm xml-lex.scm c-lex.scm
EXTRA_DIST = lisp-lex.l xml-lex.l c-lex.l
# Building the lexers with SILex. You must previously run
# `tla build-config ./arch-config' for this to run.
#
# Note: Those files should normally be part of the distribution, making
# this rule useless to the user.
.l.scm:
$(GUILE) -L $(top_srcdir)/src/guile/silex \
-c '(load-from-path "lex.scm") (lex "$^" "$@")' && \
mv "$@" "$@.tmp" && \
echo '(define-module (skribilo source $(^:%.l=%))' > "$@" && \
echo ' :use-module (skribilo lib)' >> "$@" && \
echo ' :use-module (skribilo source parameters)' \
>> "$@" && \
echo ' :use-module (srfi srfi-1)' >> "$@" && \
echo ' :export (lexer-init lexer' >> "$@" && \
echo ' lexer-get-func-column' >> "$@" && \
echo ' lexer-get-func-offset' >> "$@" && \
echo ' lexer-get-line lexer-getc' >> "$@" && \
echo ' lexer-ungetc))' >> "$@" && \
cat "$@.tmp" >> "$@" && \
rm "$@.tmp"
include $(top_srcdir)/guile-lint.am
|