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/Marq Kole, 2004. |
---|
4 | |
---|
5 | ## do not change this value |
---|
6 | subdir=examples/java/cpp |
---|
7 | |
---|
8 | ## get configured (standard) variables - checkout or modify |
---|
9 | ## scripts/config.vars[.in] for details. |
---|
10 | |
---|
11 | ## --*- Makefile -*-- |
---|
12 | SUBDIRS := |
---|
13 | |
---|
14 | ## helper utilities .. |
---|
15 | INSTALL = /usr/bin/install -c |
---|
16 | MKDIR = /bin/mkdir |
---|
17 | RM = /bin/rm -r -f |
---|
18 | RMF = /bin/rm -r -f |
---|
19 | TAR = /bin/tar |
---|
20 | TOUCH = /bin/touch |
---|
21 | CHMOD = /bin/chmod |
---|
22 | SED = /bin/sed |
---|
23 | GREP = /bin/grep |
---|
24 | CAT = /bin/cat |
---|
25 | CHMOD = /bin/chmod |
---|
26 | CP = /bin/cp |
---|
27 | ECHO = /bin/echo |
---|
28 | |
---|
29 | # usual dribble |
---|
30 | exec_prefix = ${prefix} |
---|
31 | prefix = /usr/local |
---|
32 | program_transform_name = s,x,x, |
---|
33 | bindir = ${exec_prefix}/bin |
---|
34 | sbindir = ${exec_prefix}/sbin |
---|
35 | libexecdir = ${exec_prefix}/libexec |
---|
36 | datadir = ${prefix}/share |
---|
37 | sysconfdir = ${prefix}/etc |
---|
38 | sharedstatedir = ${prefix}/com |
---|
39 | localstatedir = ${prefix}/var |
---|
40 | libdir = ${exec_prefix}/lib |
---|
41 | includedir = ${prefix}/include |
---|
42 | oldincludedir = /usr/include |
---|
43 | infodir = ${prefix}/info |
---|
44 | mandir = ${prefix}/man |
---|
45 | build_alias = |
---|
46 | host_alias = |
---|
47 | target_alias = |
---|
48 | build = x86_64-unknown-linux-gnu |
---|
49 | build_cpu = x86_64 |
---|
50 | build_vendor = unknown |
---|
51 | build_os = linux-gnu |
---|
52 | host = x86_64-unknown-linux-gnu |
---|
53 | host_cpu = x86_64 |
---|
54 | host_vendor = unknown |
---|
55 | host_os = linux-gnu |
---|
56 | just_make = /usr/bin/make |
---|
57 | |
---|
58 | # Version stuff... |
---|
59 | VERSION = 2 |
---|
60 | SUBVERSION = 7 |
---|
61 | PATCHLEVEL = 7 |
---|
62 | PACKAGE_NAME = antlr |
---|
63 | PACKAGE_VERSION = 2.7.7 |
---|
64 | versioneddir = antlr-2.7.7 |
---|
65 | |
---|
66 | # navigation |
---|
67 | builddir = /usr/neuro/local/yao/yao9/share/antlr-2.7.7 |
---|
68 | buildtree = /usr/neuro/local/yao/yao9/share/antlr-2.7.7 |
---|
69 | sourcetree = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/.. |
---|
70 | |
---|
71 | ## Two abbrevs to shorten things. $(thisdir) shall be the current |
---|
72 | ## working directory as absolute name and $(_srcdir) is it's |
---|
73 | ## source dir companion. That means that $(thisdir)/Makefile has |
---|
74 | ## been generated by $(_srcdir)/Makefile.in. |
---|
75 | _srcdir = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../$(subdir) |
---|
76 | thisdir = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/$(subdir) |
---|
77 | |
---|
78 | # variable 'srcdir' is deprecated - use sourcetree |
---|
79 | srcdir = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/.. |
---|
80 | # variable 'objdir' is deprecated - use buildtree |
---|
81 | objdir = /usr/neuro/local/yao/yao9/share/antlr-2.7.7 |
---|
82 | |
---|
83 | # other |
---|
84 | verbose = 0 |
---|
85 | |
---|
86 | ## SUBDIRS you want to exclude (separate them by using "|"). |
---|
87 | SUBDIRS_NOT := . |
---|
88 | |
---|
89 | CLR = /usr/bin/mono |
---|
90 | |
---|
91 | ANTLR_JAR = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/antlr/antlr.jar |
---|
92 | ANTLR_LIB = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/cpp/src/libantlr.a |
---|
93 | ANTLR_NET = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.runtime.dll |
---|
94 | ANTLR_PY = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/python/antlr/python.py |
---|
95 | ASTFRAME_NET = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.astframe.dll |
---|
96 | |
---|
97 | antlr_jar = antlr.jar |
---|
98 | antlr_lib = libantlr.a |
---|
99 | antlr_net = antlr.runtime.dll |
---|
100 | antlr_py = python.py |
---|
101 | astframe_net = antlr.astframe.dll |
---|
102 | |
---|
103 | ## two abbrevs to make shorten things |
---|
104 | _srcdir = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/examples/java/cpp/../../../examples/java/cpp |
---|
105 | thisdir = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/examples/java/cpp |
---|
106 | |
---|
107 | ## By default we compile class files so we are ready to carry |
---|
108 | ## out a test. Note that deps have been setup in such a way |
---|
109 | ## that you can do a 'make compile' whithout having made |
---|
110 | ## antlr.jar before. |
---|
111 | this : compile |
---|
112 | test :: test1 |
---|
113 | all :: compile |
---|
114 | |
---|
115 | ## All ANTLR grammar files |
---|
116 | g_FILES = \ |
---|
117 | $(_srcdir)/cpp.g \ |
---|
118 | $(eol) |
---|
119 | |
---|
120 | ## All java files generated |
---|
121 | g_src_FILES = \ |
---|
122 | $(thisdir)/cppLexer.java \ |
---|
123 | $(thisdir)/cppLexerTokenTypes.java \ |
---|
124 | $(eol) |
---|
125 | |
---|
126 | ## All "generated" class files |
---|
127 | g_class_FILES = \ |
---|
128 | $(thisdir)/cppLexer.class \ |
---|
129 | $(thisdir)/cppLexerTokenTypes.class \ |
---|
130 | $(eol) |
---|
131 | |
---|
132 | # All generated text files |
---|
133 | g_txt_FILES = \ |
---|
134 | $(thisdir)/cppLexerTokenTypes.txt \ |
---|
135 | $(eol) |
---|
136 | |
---|
137 | ## All generated files |
---|
138 | g_gen_FILES = \ |
---|
139 | $(g_src_FILES) \ |
---|
140 | $(g_txt_FILES) \ |
---|
141 | $(eol) |
---|
142 | |
---|
143 | ## All source files required for test1 |
---|
144 | test1_java_FILES = \ |
---|
145 | $(g_src_FILES) \ |
---|
146 | $(eol) |
---|
147 | |
---|
148 | ## All object files required for test1 |
---|
149 | test1_class_FILES = \ |
---|
150 | $(g_class_FILES) \ |
---|
151 | $(eol) |
---|
152 | |
---|
153 | ## Test commands .. |
---|
154 | test1_exe = $(test1_class_FILES) |
---|
155 | test1_cmd = /bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/java.sh cpp < $(_srcdir)/cpp.in |
---|
156 | |
---|
157 | ## Tests to be executed |
---|
158 | test1 : ${test1_exe} |
---|
159 | @ v="$(verbose)"; \ |
---|
160 | if test $$v -gt 0 ; then \ |
---|
161 | /bin/echo "$(test1_cmd)" ; \ |
---|
162 | else \ |
---|
163 | /bin/echo "exec test1 .."; \ |
---|
164 | fi |
---|
165 | @ $(test1_cmd) |
---|
166 | |
---|
167 | ## How to make binaries .. |
---|
168 | ${test1_exe} : $(test1_java_FILES) |
---|
169 | @/bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/javac.sh $(test1_java_FILES) |
---|
170 | |
---|
171 | ## When being asked to compile update/create class files. |
---|
172 | compile : ${test1_exe} |
---|
173 | |
---|
174 | ## How to compile ANTLR grammar files - to pass flags please |
---|
175 | ## use (environment variable) ANTLRFLAGS - for example, to |
---|
176 | ## enable trace information, please do a |
---|
177 | ## |
---|
178 | ## $ make ANTLRFLAGS="-trace" |
---|
179 | ## |
---|
180 | $(g_gen_FILES) : $(g_FILES) |
---|
181 | @ /bin/rm -r -f $(g_gen_FILES) |
---|
182 | @ /bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/antlr.sh $(g_FILES) |
---|
183 | |
---|
184 | ## In case antlr.jar has changed we need to recompile our |
---|
185 | ## grammar files - it might be the case that code generator has |
---|
186 | ## changed. |
---|
187 | $(g_gen_FILES) : /usr/neuro/local/yao/yao9/share/antlr-2.7.7/antlr/antlr.jar |
---|
188 | |
---|
189 | ## Housecleaning - note that we have to remove subdir "antlr" here. |
---|
190 | ## This directory exists due to a bug in Jikes. For details in this |
---|
191 | ## problem consult: |
---|
192 | ## http://www-124.ibm.com/developerworks/bugs/?group_id=10 |
---|
193 | ## Checkout bug #276. |
---|
194 | clean :: |
---|
195 | @/bin/rm -r -f *.o *.obj *.exe cpp $(g_gen_FILES) *.dll *.class antlr |
---|
196 | |
---|
197 | distclean :: clean |
---|
198 | /bin/rm -r -f Makefile |
---|
199 | |
---|
200 | ## If antlr.jar has changed we recompile Java files. That's bit |
---|
201 | ## against Java philosophy but we do it in any case - just to be |
---|
202 | ## sure. |
---|
203 | $(test1_exe) : /usr/neuro/local/yao/yao9/share/antlr-2.7.7/antlr/antlr.jar |
---|
204 | |
---|
205 | ## Recompile if our compiler has changed |
---|
206 | $(test1_exe) : /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/javac.sh |
---|
207 | |
---|
208 | ## Recompile if this file has changed |
---|
209 | $(test1_exe) : Makefile |
---|
210 | |
---|
211 | |
---|
212 | ### get configured dependencies - for example, just list |
---|
213 | ### autoconf variable ANTLR_JAR as reference and it will |
---|
214 | ### be done automatically as stddeps contains appropr. |
---|
215 | ### rule. For details, checkout scripts/config.vars[.in] |
---|
216 | |
---|
217 | ## --*- Makefile -*-- |
---|
218 | ## Make listed targets even in case a file with same name exists. |
---|
219 | .PHONY: \ |
---|
220 | this \ |
---|
221 | all clean install test distclean \ |
---|
222 | this-all this-clean this-install this-test this-distclean \ |
---|
223 | all-this clean-this install-this test-this distclean-this \ |
---|
224 | $(eof) |
---|
225 | |
---|
226 | ## delete suffix rules - shortens output when using -d and is not |
---|
227 | ## used anyway (and should not be used). |
---|
228 | .SUFFIXES: |
---|
229 | |
---|
230 | Makefile :: /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../$(subdir)/Makefile.in \ |
---|
231 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.deps \ |
---|
232 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.make \ |
---|
233 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.vars \ |
---|
234 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/config.status |
---|
235 | @echo "*** update $(subdir)/Makefile" |
---|
236 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES="$(subdir)/Makefile" /bin/sh ./config.status -q |
---|
237 | |
---|
238 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.deps : \ |
---|
239 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/config.deps.in |
---|
240 | @echo "*** update $@" |
---|
241 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/config.deps /bin/sh ./config.status -q |
---|
242 | |
---|
243 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.make : \ |
---|
244 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/config.make.in |
---|
245 | @echo "*** update $@" |
---|
246 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/config.make /bin/sh ./config.status -q |
---|
247 | |
---|
248 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.vars : \ |
---|
249 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/config.vars.in |
---|
250 | @echo "*** update $@" |
---|
251 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/config.vars /bin/sh ./config.status -q |
---|
252 | |
---|
253 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/config.status : \ |
---|
254 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../configure |
---|
255 | @echo "*** reconfigure $@ - stay tuned .." |
---|
256 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && /bin/sh ./config.status -q --recheck |
---|
257 | @echo "*** update all configured files .." |
---|
258 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && /bin/sh ./config.status -q |
---|
259 | |
---|
260 | ### In a pure devel mode there should be also a dependency listed on how |
---|
261 | ### to make configure out of configure.in. This requires that usr has |
---|
262 | ### m4 and autoconf (proper version) installed. Appropriate checks are |
---|
263 | ### not done in configure. If so, then uncomment next lines: |
---|
264 | ### |
---|
265 | ### @rule_configure_configure_in@ |
---|
266 | ### |
---|
267 | |
---|
268 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/antlr.sh : \ |
---|
269 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/antlr.sh.in |
---|
270 | @echo "*** update $@" |
---|
271 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/antlr.sh /bin/sh ./config.status -q |
---|
272 | |
---|
273 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/cpp.sh : \ |
---|
274 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/cpp.sh.in |
---|
275 | @echo "*** update $@" |
---|
276 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/cpp.sh /bin/sh ./config.status -q |
---|
277 | |
---|
278 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/csc.sh : \ |
---|
279 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/csc.sh.in |
---|
280 | @echo "*** update $@" |
---|
281 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/csc.sh /bin/sh ./config.status -q |
---|
282 | |
---|
283 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/cxx.sh : \ |
---|
284 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/cxx.sh.in |
---|
285 | @echo "*** update $@" |
---|
286 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/cxx.sh /bin/sh ./config.status -q |
---|
287 | |
---|
288 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/jar.sh : \ |
---|
289 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/jar.sh.in |
---|
290 | @echo "*** update $@" |
---|
291 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/jar.sh /bin/sh ./config.status -q |
---|
292 | |
---|
293 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/javac.sh : \ |
---|
294 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/javac.sh.in |
---|
295 | @echo "*** update $@" |
---|
296 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/javac.sh /bin/sh ./config.status -q |
---|
297 | |
---|
298 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/java.sh : \ |
---|
299 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/java.sh.in |
---|
300 | @echo "*** update $@" |
---|
301 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/java.sh /bin/sh ./config.status -q |
---|
302 | |
---|
303 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/lib.sh : \ |
---|
304 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/lib.sh.in |
---|
305 | @echo "*** update $@" |
---|
306 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/lib.sh /bin/sh ./config.status -q |
---|
307 | |
---|
308 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/link.sh : \ |
---|
309 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/link.sh.in |
---|
310 | @echo "*** update $@" |
---|
311 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/link.sh /bin/sh ./config.status -q |
---|
312 | |
---|
313 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/pyinst.sh : \ |
---|
314 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/pyinst.sh.in |
---|
315 | @echo "*** update $@" |
---|
316 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/pyinst.sh /bin/sh ./config.status -q |
---|
317 | |
---|
318 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/python.sh : \ |
---|
319 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/python.sh.in |
---|
320 | @echo "*** update $@" |
---|
321 | @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/python.sh /bin/sh ./config.status -q |
---|
322 | |
---|
323 | |
---|
324 | ## This rule shall ensure that ANTLR_NET is up-to-date. The rule is a |
---|
325 | ## double colon rule, ie. further rules with the same target may be |
---|
326 | ## added. For unknown reasons, double colon rules are always phony,ie. |
---|
327 | ## getting executed even in case target exists. We break the infinite |
---|
328 | ## loop, we only jump into subdir "lib/csharp/src" if we are not |
---|
329 | ## already in. It is very important that each Makefile[.in] sets the |
---|
330 | ## variable $(subdir) proper. |
---|
331 | |
---|
332 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.runtime.dll :: |
---|
333 | @ subdir="lib/csharp/antlr.runtime" ; \ |
---|
334 | case $(subdir) in \ |
---|
335 | $$subdir ) ;; \ |
---|
336 | * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \ |
---|
337 | test -f "$$d/Makefile" && { \ |
---|
338 | /usr/bin/make -C "$$d" $@ ; \ |
---|
339 | } \ |
---|
340 | ;; \ |
---|
341 | esac |
---|
342 | |
---|
343 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.astframe.dll :: |
---|
344 | @ subdir="lib/csharp/antlr.astframe" ; \ |
---|
345 | case $(subdir) in \ |
---|
346 | $$subdir ) ;; \ |
---|
347 | * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \ |
---|
348 | test -f "$$d/Makefile" && { \ |
---|
349 | /usr/bin/make -C "$$d" $@ ; \ |
---|
350 | } \ |
---|
351 | ;; \ |
---|
352 | esac |
---|
353 | |
---|
354 | |
---|
355 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/antlr/antlr.jar :: |
---|
356 | @ subdir="antlr" ; \ |
---|
357 | case $(subdir) in \ |
---|
358 | $$subdir ) ;; \ |
---|
359 | * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \ |
---|
360 | test -f "$$d/Makefile" && { \ |
---|
361 | /usr/bin/make -C "$$d" $@ ; \ |
---|
362 | } \ |
---|
363 | ;; \ |
---|
364 | esac |
---|
365 | |
---|
366 | |
---|
367 | /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/cpp/src/libantlr.a :: |
---|
368 | @ subdir="lib/cpp/src" ; \ |
---|
369 | case $(subdir) in \ |
---|
370 | $$subdir ) ;; \ |
---|
371 | * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \ |
---|
372 | test -f "$$d/Makefile" && { \ |
---|
373 | /usr/bin/make -C "$$d" $@ ; \ |
---|
374 | } \ |
---|
375 | ;; \ |
---|
376 | esac |
---|
377 | |
---|
378 | |
---|
379 | .PHONY: compile |
---|