summaryrefslogtreecommitdiff
path: root/test/ragel.d/Makefile.am
blob: 1f5a678fc0a68145b9c4458df9ad070cba8b0564 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#
#   Copyright 2002-2014 Adrian Thurston <thurston@complang.org>
#

#   This file is part of Ragel.
#
#   Ragel is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#   Ragel is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with Ragel; if not, write to the Free Software
#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 

COLM = ../../colm/colm
RAGEL_LM = ../../ragel

COLM_xCPPFLAGS = -I../../colm/include
COLM_xLDFLAGS = -L../../colm

TESTS = gentests

noinst_SCRIPTS = gentests subject.mk subject.sh
noinst_PROGRAMS = trans

EXTRA_DIST = \
	trans.lm trans-c.lm trans-asm.lm gentests.sh \
	atoi1.rl clang2.rl cond7.rl element3.rl erract8.rl forder3.rl java1.rl \
	range.rl scan3.rl xml.rl atoi2.rl clang3.rl cppscan1.rl eofact.rl \
	erract9.rl gotocallret1.rl java2.rl recdescent1.rl scan4.rl atoi3.rl \
	clang4.rl cppscan2.rl erract1.rl export1.rl gotocallret2.rl keller1.rl \
	recdescent2.rl stateact1.rl awkemu.rl cond1.rl cppscan3.rl erract2.rl \
	export2.rl high1.rl lmgoto.rl recdescent3.rl statechart1.rl builtin.rl \
	cond2.rl cppscan4.rl erract3.rl export3.rl high2.rl mailbox1.rl \
	repetition.rl strings1.rl call1.rl cond3.rl cppscan5.rl erract4.rl \
	export4.rl high3.rl mailbox2.rl rlscan.rl strings2.rl call2.rl cond4.rl \
	cppscan6.rl erract5.rl fnext1.rl import1.rl mailbox3.rl ruby1.rl \
	tokstart1.rl call3.rl cond5.rl element1.rl erract6.rl forder1.rl \
	include1.rl minimize1.rl scan1.rl union.rl clang1.rl cond6.rl \
	element2.rl erract7.rl forder2.rl include2.rl patact.rl scan2.rl \
	xmlcommon.rl cppscan1.h eofact.h mailbox1.h strings2.h

CLEANFILES = working

TRANS_DEPS = \
	$(RAGEL_LM)/ragel.lm \
	trans-c.lm trans-asm.lm \
	trans-crack.lm trans-csharp.lm \
	trans-d.lm trans-go.lm \
	trans-java.lm trans-julia.lm \
	trans-ocaml.lm trans-ruby.lm \
	trans-rust.lm

trans_CPPFLAGS = $(COLM_xCPPFLAGS)
trans_SOURCES = trans.c main.c
trans_LDADD = -lcolm
trans_LDFLAGS = $(COLM_xLDFLAGS)

trans.c: trans.lm $(TRANS_DEPS)
	$(COLM) -c -b trans_object -I$(RAGEL_LM) -I../../ragel/host-go -o $@ $<

gentests: gentests.sh Makefile
	@$(top_srcdir)/test/sedsubst $< $@ -w,+x $(SED_SUBST)

subject.mk: subject.mk.in Makefile
	@$(top_srcdir)/test/sedsubst $< $@ -w,+x $(SED_SUBST)

subject.sh: subject.sh.in Makefile
	@$(top_srcdir)/test/sedsubst $< $@ -w,+x $(SED_SUBST)