summaryrefslogtreecommitdiff
path: root/guile-vm.am
blob: 14b146f624e7de2c3fea6b268973d80bedaa6f83 (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
# Compilation with Guile-VM's compiler (aka. Guile 2.x).

if ENABLE_GUILE_VM

# XXX: This expression relies on a GNU extension.
GOBJECTS = $(SOURCES:%.scm=%.go)

nobase_nodist_module_DATA =				\
  $(SOURCES) $(GOBJECTS) $(SOURCES_NOT_COMPILED)

.scm.go:
	$(MKDIR_P) `dirname $@`
	$(GUILE) -L $(srcdir)				\
	  -c "(use-modules (system base compile)	\
	                   (skribilo condition))	\
	      (read-set! keywords 'prefix)		\
	      (call-with-skribilo-error-catch/exit	\
	        (lambda ()				\
	          (compile-file \"$<\" \"$@\")))"

CLEANFILES += $(GOBJECTS)

SUFFIXES += .go

else !ENABLE_GUILE_VM

nobase_nodist_module_DATA =			\
  $(SOURCES) $(SOURCES_NOT_COMPILED)

endif !ENABLE_GUILE_VM