source: trunk/yao/share/antlr-2.7.7/examples/java/calc/Makefile @ 1

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

Initial import of YAO sources

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