1## This file is part of ANTLR (http://www.antlr.org).  Have a
2## look into LICENSE.txt for  license  details. This file has
3## been written by (C) Wolfgang Haefelinger, 2004.
4
5## do not change this value
6subdir=examples/python/lexerTester
7
8## get  configured  (standard) variables - checkout or modify
9## scripts/config.vars[.in] for details.
10@stdvars@
11
12
13### how to get rid of damned dos line ending style and -- al-
14### most equally worse -- stupid tab character.
15### dos2unix  = perl -p -i.tmp -e 's,\r,,g;s,\t, ,g'
16dos2unix = :
17
18### when running python we invoke python like ..
19python    = /bin/sh @abs_this_builddir@/scripts/python.sh
20
21## get configured rules
22@stdmake@
23
24## By default we compile class files so we are ready to carry
25## out a test. Note that deps have been setup in such a way
26## that you can do a 'make compile' whithout having made
27## antlr.jar before.
28this : compile
29all  :: compile
30
31
32g_FILES  = \
33 $(_srcdir)/lexertester.g  \
34 $(_srcdir)/simplelexer1.g \
35 $(_srcdir)/simplelexer2.g \
36 $(_srcdir)/simplelexer3.g \
37 $(_srcdir)/simplelexer4.g \
38 $(_srcdir)/simplelexer5.g \
39 $(eol)
40
41g_py_FILES = \
42 LexerTester.py \
43 SimpleLexer1.py \
44 SimpleLexer2.py \
45 SimpleLexer3.py \
46 SimpleLexer4.py \
47 SimpleLexer5.py \
48 $(eol)
49
50compile : $(g_py_FILES)
51
52%.py : $(_srcdir)/%.py
53	@-@RMF@ $@ &&@CP@ $< $@
54
55
56test :: test1
57
58test1_deps = \
59  LT1test.py \
60  LT2test.py \
61  LT3test.py \
62  LT4test.py \
63  LT5test.py \
64	$(g_py_FILES) \
65	$(buildtree)/scripts/python.sh \
66	$(eol)
67
68test1_cmd = \
69	$(python) LT1test.py < $(_srcdir)/test.in; \
70	$(python) LT2test.py < $(_srcdir)/test.in; \
71	$(python) LT3test.py < $(_srcdir)/test.in; \
72	$(python) LT4test.py < $(_srcdir)/test.in; \
73	$(python) LT5test.py < $(_srcdir)/test.in; \
74	$(eol)
75
76test1 : $(test1_deps)
77	@ $(test1_cmd)
78
79$(g_py_FILES) : $(g_FILES)
80	@ @RMF@ $(g_py_FILES)
81	@ @ANTLR_COMPILE_CMD@ $(g_FILES)
82	@ $(dos2unix) $(g_py_FILES)
83
84$(g_py_FILES) : @ANTLR_JAR@
85$(g_py_FILES) : $(buildtree)/scripts/antlr.sh
86
87### cleanup filter
88clean ::
89	@@ECHO@ cleaning filter ...
90	@ -@RMF@ $(g_py_FILES)
91	@ -@RMF@ *.pyc *.tmp *TokenTypes.txt *TokenTypes
92
93
94
95### get configured dependencies - for example, just list
96### autoconf variable ANTLR_JAR as reference and it will
97### be  done  automatically  as stddeps contains appropr.
98### rule. For details, checkout scripts/config.vars[.in]
99@stddeps@
100
101.PHONY: compile
102.PHONY: test1
103