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/csharp/preserveWhiteSpace
7
8## get  configured  (standard) variables - checkout or modify
9## scripts/config.vars[.in] for details.
10@stdvars@
11
12### how to get rid of damned dos line ending style and -- al-
13### most equally worse -- stupid tab character.
14### dos2unix  = perl -p -i.tmp -e 's,\r,,g;s,\t, ,g'
15dos2unix = :
16
17## get configured rules
18@stdmake@
19
20## By default we compile class files so we are ready to carry
21## out a test. Note that deps have been setup in such a way
22## that you can do a 'make compile' whithout having made
23## antlr.jar before.
24this : compile
25all  :: compile
26compile : $(test1_exe)
27test ::
28
29bad : test1
30
31
32## My *.g files
33g_FILES  = \
34	$(_srcdir)/instr.g \
35  $(eol)
36
37## Java files generated by *.g
38g_src_FILES = \
39  $(thisdir)/InstrLexer.java \
40  $(thisdir)/InstrParser.java \
41  $(thisdir)/InstrParserTokenTypes.java \
42  $(thisdir)/InstrTreeWalker.java \
43  $(eol)
44
45## Text files generated by *.g
46g_txt_FILES = \
47  $(thisdir)/DataParserTokenTypes.txt \
48	$(eol)
49
50## All generated files by *.g
51g_gen_FILES = \
52	$(g_src_FILES) \
53	$(g_txt_FILES) \
54	$(eol)
55
56## Dependencies of g_src_FILES
57g_src_DEPS = \
58	$(g_FILES) \
59	@ANTLR_JAR@ \
60	$(buildtree)/scripts/antlr.sh \
61	$(eol)
62
63# All source files for test1
64test1_exe_FILES = \
65	$(g_src_FILES) \
66  $(_srcdir)/InstrMain.cs \
67	$(eol)
68
69test1_exe = \
70	test1.exe \
71	$(eol)
72
73test1_exe_DEPS = \
74	$(test1_exe_FILES) \
75	@ANTLR_NET@ \
76	$(buildtree)/scripts/csc.sh \
77	$(eol)
78
79## Dependencies of test 1
80test1_DEPS = \
81	@antlr_net@ \
82	test1.exe \
83	$(eol)
84
85## Test 1
86test1_CMD = \
87	@ $(CLR) ./test1.exe < $(_srcdir)/test.in \
88	$(eol)
89
90
91## we need a local copy of ANTLR_NET in this directory to be
92## able to execute tests!
93@antlr_net@ : @ANTLR_NET@
94	@CP@ $< $@
95
96%.txt : $(_srcdir)/%.txt
97	@ @CP@ $< $@
98
99## *.g -> *.cs
100$(g_src_FILES) : $(g_src_DEPS)
101	@ @RMF@ $(g_src_FILES)
102	@ @ANTLR_COMPILE_CMD@ $(g_FILES)
103	@ $(dos2unix) $(g_src_FILES)
104
105## How to create test1
106$(test1_exe) : $(test1_exe_DEPS)
107	@ -@RMF@ $@
108	@@CSHARP_COMPILE_CMD@  $@ $(test1_exe_FILES)
109
110## Tests
111test1 : $(test1_DEPS)
112	@ $(test1_CMD)
113
114### cleanup astsupport
115clean ::
116	@@ECHO@ cleaning $(subdir) ...
117	@ -@RMF@ .compile.st *.class $(g_gen_FILES) @antlr_net@
118	@ -@RMF@ *.pyc *.tmp *TokenTypes.txt *TokenTypes *.exe
119
120
121
122### get configured dependencies - for example, just list
123### autoconf variable ANTLR_JAR as reference and it will
124### be  done  automatically  as stddeps contains appropr.
125### rule. For details, checkout scripts/config.vars[.in]
126@stddeps@
127
128.PHONY: compile
129.PHONY: test1
130.PHONY: test2