source: trunk/yao/share/antlr-2.7.7/examples/csharp/heteroAST/Makefile.in @ 1

Last change on this file since 1 was 1, checked in by lnalod, 15 years ago

Initial import of YAO sources

File size: 2.7 KB
Line 
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/heteroAST
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 :: test1
28
29
30## My *.g files
31g_FILES  = \
32 $(_srcdir)/calc.g \
33 $(eol)
34
35## Java files generated by *.g
36g_src_FILES = \
37        $(thisdir)/CalcLexer.cs \
38  $(thisdir)/CalcParser.cs \
39  $(thisdir)/CalcParserTokenTypes.cs \
40  $(eol)
41
42## Text files generated by *.g
43g_txt_FILES = \
44        $(thisdir)/CalcParserTokenTypes.txt \
45        $(eol)
46
47## All generated files by *.g
48g_gen_FILES = \
49        $(g_src_FILES) \
50        $(g_txt_FILES) \
51        $(eol)
52
53## Dependencies of g_src_FILES
54g_src_DEPS = \
55        $(g_FILES) \
56        @ANTLR_JAR@ \
57        $(buildtree)/scripts/antlr.sh \
58        $(eol)
59
60# All source files for test1
61test1_exe_FILES = \
62        $(g_src_FILES) \
63  $(_srcdir)/BinaryOperatorAST.cs \
64  $(_srcdir)/CalcAST.cs \
65  $(_srcdir)/INTNode.cs \
66  $(_srcdir)/Main.cs \
67  $(_srcdir)/MULTNode.cs \
68  $(_srcdir)/PLUSNode.cs \
69        $(eol)
70
71test1_exe = \
72        test1.exe \
73        $(eol)
74
75test1_exe_DEPS = \
76        $(test1_exe_FILES) \
77        @ANTLR_NET@ \
78        $(buildtree)/scripts/csc.sh \
79        $(eol)
80
81## Dependencies of test 1
82test1_DEPS = \
83        @antlr_net@ \
84        test1.exe \
85        $(eol)
86
87## Test 1
88test1_CMD = \
89        @ $(CLR) ./test1.exe < $(_srcdir)/test.in \
90        $(eol)
91
92
93## we need a local copy of ANTLR_NET in this directory to be
94## able to execute tests!
95@antlr_net@ : @ANTLR_NET@
96        @CP@ $< $@
97
98## *.g -> *.cs
99$(g_src_FILES) : $(g_src_DEPS)
100        @ @RMF@ $(g_src_FILES)
101        @ @ANTLR_COMPILE_CMD@ $(g_FILES)
102        @ $(dos2unix) $(g_src_FILES)
103
104## How to create test1
105$(test1_exe) : $(test1_exe_DEPS)
106        @ -@RMF@ $@
107        @@CSHARP_COMPILE_CMD@  $@ $(test1_exe_FILES)
108
109## Tests
110test1 : $(test1_DEPS)
111        @ $(test1_CMD)
112
113### cleanup astsupport
114clean ::
115        @@ECHO@ cleaning $(subdir) ...
116        @ -@RMF@ .compile.st *.class $(g_gen_FILES) @antlr_net@
117        @ -@RMF@ *.pyc *.tmp *TokenTypes.txt *TokenTypes *.exe
118
119
120
121### get configured dependencies - for example, just list
122### autoconf variable ANTLR_JAR as reference and it will
123### be  done  automatically  as stddeps contains appropr.
124### rule. For details, checkout scripts/config.vars[.in]
125@stddeps@
126
127.PHONY: compile
128.PHONY: test1
129.PHONY: test2
Note: See TracBrowser for help on using the repository browser.