File: Makefile.in

package info (click to toggle)
antlr 2.7.7%2Bdfsg-14
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,016 kB
  • sloc: java: 54,649; cs: 12,537; makefile: 8,854; cpp: 7,359; pascal: 5,273; sh: 4,333; python: 4,297; lisp: 1,969; xml: 220; lex: 192; ansic: 127
file content (167 lines) | stat: -rw-r--r-- 3,370 bytes parent folder | download | duplicates (9)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
## This file is part of ANTLR (http://www.antlr.org).  Have a
## look into LICENSE.txt for  license  details. This file has 
## been written by (C) Wolfgang Haefelinger, 2004.

## do not change this value 
subdir=examples/csharp/java

## get  configured  (standard) variables - checkout or modify
## scripts/config.vars[.in] for details.
@stdvars@

### how to get rid of damned dos line ending style and -- al-
### most equally worse -- stupid tab character.
### dos2unix  = perl -p -i.tmp -e 's,\r,,g;s,\t, ,g' 
dos2unix = :

## get configured rules
@stdmake@

## By default we compile class files so we are ready to carry
## out a test. Note that deps have been setup in such a way
## that you can do a 'make compile' whithout having made 
## antlr.jar before. 
this : compile
all  :: compile
compile : $(test1_exe) $(test2_exe)
test :: 

bad : test1 test2


## My *.g files 
g_FILES  = \
 $(_srcdir)/java.g \
 $(_srcdir)/java.tree.g \
 $(eol)

## Java files generated by *.g
g_src_FILES = \
	$(thisdir)/JavaLexer.cs \
  $(thisdir)/JavaRecognizer.cs \
  $(thisdir)/JavaTokenTypes.cs \
  $(thisdir)/JavaTreeParser.cs \
  $(thisdir)/JavaTreeParserTokenTypes.cs \
  $(eol)

## Text files generated by *.g
g_txt_FILES = \
	$(thisdir)/JavaTreeParserTokenTypes.txt \
	$(eol)

## All generated files by *.g
g_gen_FILES = \
	$(g_src_FILES) \
	$(g_txt_FILES) \
	$(eol)

## Dependencies of g_src_FILES
g_src_DEPS = \
	$(g_FILES) \
	@ANTLR_JAR@ \
	$(buildtree)/scripts/antlr.sh \
	$(eol)

# All source files for test1
test1_exe_FILES = \
	$(g_src_FILES) \
	$(_srcdir)/Main.cs \
	$(eol)

test1_exe = \
	test1.exe \
	$(eol)

test1_exe_DEPS = \
	$(test1_exe_FILES) \
	@ANTLR_NET@ \
	$(buildtree)/scripts/csc.sh \
	$(eol)

## Dependencies of test 1
test1_DEPS = \
	@antlr_net@ \
	test1.exe \
	$(eol)

## Test 1
test1_CMD = \
	@ $(CLR) ./test1.exe $(_srcdir)/tests/E.java \
	$(eol)


# All source files for test1
test2_exe_FILES = \
	$(g_src_FILES) \
	$(_srcdir)/Main.cs \
	$(eol)

test2_exe = \
	test2.exe \
	$(eol)

test2_exe_DEPS = \
	$(test2_exe_FILES) \
	@ANTLR_NET@ \
	$(buildtree)/scripts/csc.sh \
	$(eol)

## Dependencies of test 2
test2_DEPS = \
	@antlr_net@ \
	test2.exe \
	$(eol)

## Test 2
test2_CMD = \
	@ $(CLR) ./test2.exe $(_srcdir)/tests/T.java \
	$(eol)


## we need a local copy of ANTLR_NET in this directory to be
## able to execute tests!
@antlr_net@ : @ANTLR_NET@
	@CP@ $< $@

## *.g -> *.cs
$(g_src_FILES) : $(g_src_DEPS)
	@ @RMF@ $(g_src_FILES)
	@ @ANTLR_COMPILE_CMD@ $(g_FILES)
	@ $(dos2unix) $(g_src_FILES)

## How to create test1
$(test1_exe) : $(test1_exe_DEPS)
	@ -@RMF@ $@
	@@CSHARP_COMPILE_CMD@  $@ $(test1_exe_FILES)

## How to create test2
$(test2_exe) : $(test2_exe_DEPS)
	@ -@RMF@ $@
	@@CSHARP_COMPILE_CMD@  $@ $(test2_exe_FILES)

## Tests
test1 : $(test1_DEPS)
	@ @ECHO@ "executing test #1 .."
	@ $(test1_CMD)

test2 : $(test2_DEPS)
	@ @ECHO@ "executing test #2 .."
	@ $(test2_CMD)

### cleanup astsupport
clean ::
	@@ECHO@ cleaning $(subdir) ...
	@ -@RMF@ .compile.st *.class $(g_gen_FILES) @antlr_net@
	@ -@RMF@ *.pyc *.tmp *TokenTypes.txt *TokenTypes *.exe



### get configured dependencies - for example, just list
### autoconf variable ANTLR_JAR as reference and it will
### be  done  automatically  as stddeps contains appropr.
### rule. For details, checkout scripts/config.vars[.in] 
@stddeps@

.PHONY: compile
.PHONY: test1
.PHONY: test2