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