source: trunk/yao/share/antlr-2.7.7/examples/python/tinybasic/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: 15.0 KB
Line 
1## This file is part of PyANTLR. See LICENSE.txt for license
2## details..........Copyright (C) Wolfgang Haefelinger, 2004.
3##
4## do not change this value
5subdir=examples/python/tinybasic
6
7##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
8
9## --*- Makefile -*--
10SUBDIRS         := 
11
12## helper utilities ..
13INSTALL         = /usr/bin/install -c
14MKDIR           = /bin/mkdir
15RM              = /bin/rm -r -f
16RMF             = /bin/rm -r -f
17TAR             = /bin/tar
18TOUCH           = /bin/touch
19CHMOD           = /bin/chmod
20SED             = /bin/sed
21GREP            = /bin/grep
22CAT             = /bin/cat
23CHMOD           = /bin/chmod
24CP              = /bin/cp
25ECHO            = /bin/echo
26
27# usual dribble
28exec_prefix     = ${prefix}
29prefix          = /usr/local
30program_transform_name = s,x,x,
31bindir          = ${exec_prefix}/bin
32sbindir         = ${exec_prefix}/sbin
33libexecdir      = ${exec_prefix}/libexec
34datadir         = ${prefix}/share
35sysconfdir      = ${prefix}/etc
36sharedstatedir  = ${prefix}/com
37localstatedir   = ${prefix}/var
38libdir          = ${exec_prefix}/lib
39includedir      = ${prefix}/include
40oldincludedir   = /usr/include
41infodir         = ${prefix}/info
42mandir          = ${prefix}/man
43build_alias     = 
44host_alias      = 
45target_alias    = 
46build           = x86_64-unknown-linux-gnu
47build_cpu       = x86_64
48build_vendor    = unknown
49build_os        = linux-gnu
50host            = x86_64-unknown-linux-gnu
51host_cpu        = x86_64
52host_vendor     = unknown
53host_os         = linux-gnu
54just_make       = /usr/bin/make
55
56# Version stuff...
57VERSION         = 2
58SUBVERSION      = 7
59PATCHLEVEL      = 7
60PACKAGE_NAME    = antlr
61PACKAGE_VERSION = 2.7.7
62versioneddir    = antlr-2.7.7
63
64# navigation
65builddir        = /usr/neuro/local/yao/yao9/share/antlr-2.7.7
66buildtree       = /usr/neuro/local/yao/yao9/share/antlr-2.7.7
67sourcetree      = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/..
68
69## Two abbrevs to shorten things. $(thisdir) shall be the current
70## working  directory  as  absolute  name  and $(_srcdir) is it's
71## source dir companion. That means that  $(thisdir)/Makefile has
72## been generated by $(_srcdir)/Makefile.in.
73_srcdir         = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../$(subdir)
74thisdir         = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/$(subdir)
75
76# variable 'srcdir' is deprecated - use sourcetree
77srcdir          = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/..
78# variable 'objdir' is deprecated - use buildtree
79objdir          = /usr/neuro/local/yao/yao9/share/antlr-2.7.7
80
81# other
82verbose         = 0
83
84## SUBDIRS you want to exclude (separate them by using "|").
85SUBDIRS_NOT    := .
86
87CLR            = /usr/bin/mono
88
89ANTLR_JAR      = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/antlr/antlr.jar
90ANTLR_LIB      = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/cpp/src/libantlr.a
91ANTLR_NET      = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.runtime.dll
92ANTLR_PY       = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/python/antlr/python.py
93ASTFRAME_NET   = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.astframe.dll
94
95antlr_jar      = antlr.jar
96antlr_lib      = libantlr.a
97antlr_net      = antlr.runtime.dll
98antlr_py       = python.py
99astframe_net   = antlr.astframe.dll
100##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
101
102### how to get rid of damned dos line ending style and -- al-
103### most equally worse -- stupid tab character.
104### dos2unix  = perl -p -i.tmp -e 's,\r,,g;s,\t, ,g'
105dos2unix = :
106
107### when running python we invoke python like ..
108python    = /bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/python.sh
109
110## get configured rules
111
112##xxxxxxxxxxxxxxxxxxxxxx --*- Makefile -*-- xxxxxxxxxxxxxxxx>>> config.make
113## By default, make will jump into any sub directory that contains a   file
114## named "Makefile". This is done  in the order implied by "/bin/ls"  which
115## is in almost  all  cases  correct  (note  that  you  should  not  design
116## Makefiles which depend on a specific invocation order). You can override
117## specific  behaviour  by  using  variable SUBDIRS. If given and not empty,
118## "/bin/ls" is not used. Also,  if you want to disable jumping subdirs you
119## may  use  either ".", ".."  as  value for SUBDIRS. Note that SUBDIRS may
120## contain any directory (except "." and "..).
121
122## This is very much  GNU specific, sigh.  Variable SUBDIRS is used to tell
123## make which  subdirectory to jump. It's  value is normally preset or just
124## empty, in which case /bin/ls is used as discussed above. However, I also
125## want that a user can say
126##
127##  make SUBDIRS="d1 d2 .. dn"
128##
129## That means, ignore defaults and go ahead and make exactly this director-
130## ies mentioned. Of course, this should only have  an  impact  on Makefile
131## being used  by  "make"  but not for any makefils in d1 .. dn, right? For
132## example, if di  needs  to  make directories a,b and c, then they need to
133## be made of course. So all burns down to the question how to prevent a
134## variable from being passed to submakes. Below you can see the answer. If
135## you believe that there's a simpler answer to the problem don't hesistate
136## to try it out. If  it  works, send me an email: ora dot et dot labora at
137## web dot de. But be warned - you need to try all variations.
138##
139## Here is in short what  I  found  and how  it  works.  Variables given on
140## command line  are  saved  in  variable  MAKEOVERRIDES. This  variable is
141## exported  and  passed down. On  invocation  of a submake file, make will
142## have a  look  into MAKEOVERRIDES  and unpack each variable found therein.
143## Therefore I'm just going to  remove  every (?) occurance of SUBDIRS from
144## this variable.
145MAKEOVERRIDES := $(patsubst SUBDIRS=%,,$(MAKEOVERRIDES))
146
147
148## The actuall rule on how to make a recursive target.
149all clean distclean test install force-target clean-target :: 
150        @dirs="$(SUBDIRS)" ; \
151        test -z "$${dirs}" && { \
152                dirs=`/bin/ls` ; \
153  } ; \
154        for d in . $${dirs} ; do \
155                case $${d} in \
156                . | .. ) ;; \
157          $(SUBDIRS_NOT) ) ;; \
158                *) \
159                if test -f "$${d}/Makefile" ; then \
160                  echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" ; \
161                  echo ">> /usr/bin/make -C $(subdir)/$${d} $@                          " ; \
162                        echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" ; \
163                        /usr/bin/make -C "$$d" $@ || exit 1 ;\
164                fi ; \
165                ;; \
166                esac ; \
167        done
168
169## For historical  reasons only you can make local targets as "this-*" or
170## "*-this" rules. The  default is to do nothing. Although this targets
171## exists, it is recommended to define further "all", "clean" etc. double
172## colon rules.
173 
174all       :: this-all all-this
175clean     :: this-clean clean-this
176distclean :: this-distclean distclean-this
177test      :: this-test test-this
178install   :: this-install install-this
179
180this-all ::
181this-clean ::
182this-distclean ::
183this-test ::
184this-install ::
185
186all-this ::
187clean-this ::
188distclean-this ::
189test-this ::
190install-this ::
191
192force-target :: clean-target all
193
194distclean :: clean
195
196distclean ::
197        $(RM) Makefile
198
199## xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<< config.make
200
201
202## get configured standard deps
203
204## --*- Makefile -*--
205## Make listed targets even in case a file with same name exists.
206.PHONY: \
207 this \
208 all clean install test distclean \
209 this-all this-clean this-install this-test this-distclean \
210 all-this clean-this install-this test-this distclean-this \
211 $(eof)
212
213## delete suffix rules - shortens output when using -d and is not
214## used anyway (and should not be used).
215.SUFFIXES:
216
217Makefile :: /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../$(subdir)/Makefile.in  \
218            /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.deps \
219                                          /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.make \
220                                          /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.vars \
221            /usr/neuro/local/yao/yao9/share/antlr-2.7.7/config.status
222        @echo "*** update $(subdir)/Makefile"
223        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES="$(subdir)/Makefile" /bin/sh ./config.status -q
224
225/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.deps : \
226        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/config.deps.in
227        @echo "*** update $@"
228        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/config.deps /bin/sh ./config.status -q
229
230/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.make : \
231        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/config.make.in
232        @echo "*** update $@"
233        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/config.make /bin/sh ./config.status -q
234
235/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.vars : \
236        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/config.vars.in
237        @echo "*** update $@"
238        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/config.vars /bin/sh ./config.status -q
239
240/usr/neuro/local/yao/yao9/share/antlr-2.7.7/config.status : \
241        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../configure
242        @echo "*** reconfigure $@ - stay tuned .."
243        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && /bin/sh ./config.status -q --recheck
244        @echo "*** update all configured files .."
245        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && /bin/sh ./config.status -q
246
247### In a pure devel mode there should be also a dependency listed on how
248### to make configure out of  configure.in.  This  requires that usr has
249### m4  and  autoconf (proper version) installed. Appropriate checks are
250### not done in configure. If so, then uncomment next lines:
251###
252###   @rule_configure_configure_in@
253###
254
255/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/antlr.sh : \
256        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/antlr.sh.in
257        @echo "*** update $@"
258        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/antlr.sh /bin/sh ./config.status -q
259
260/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/cpp.sh : \
261        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/cpp.sh.in
262        @echo "*** update $@"
263        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/cpp.sh /bin/sh ./config.status -q
264
265/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/csc.sh : \
266        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/csc.sh.in
267        @echo "*** update $@"
268        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/csc.sh /bin/sh ./config.status -q
269
270/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/cxx.sh : \
271        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/cxx.sh.in
272        @echo "*** update $@"
273        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/cxx.sh /bin/sh ./config.status -q
274
275/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/jar.sh : \
276        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/jar.sh.in
277        @echo "*** update $@"
278        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/jar.sh /bin/sh ./config.status -q
279
280/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/javac.sh : \
281        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/javac.sh.in
282        @echo "*** update $@"
283        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/javac.sh /bin/sh ./config.status -q
284
285/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/java.sh : \
286        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/java.sh.in
287        @echo "*** update $@"
288        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/java.sh /bin/sh ./config.status -q
289
290/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/lib.sh : \
291        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/lib.sh.in
292        @echo "*** update $@"
293        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/lib.sh /bin/sh ./config.status -q
294
295/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/link.sh : \
296        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/link.sh.in
297        @echo "*** update $@"
298        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/link.sh /bin/sh ./config.status -q
299
300/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/pyinst.sh : \
301        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/pyinst.sh.in
302        @echo "*** update $@"
303        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/pyinst.sh /bin/sh ./config.status -q
304
305/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/python.sh : \
306        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/python.sh.in
307        @echo "*** update $@"
308        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/python.sh /bin/sh ./config.status -q
309
310
311## This rule shall ensure that ANTLR_NET is up-to-date. The rule is a
312## double colon rule, ie. further  rules  with the same target may be
313## added. For unknown reasons, double colon rules are always phony,ie.
314## getting executed even in case target exists. We break the infinite
315## loop,  we only  jump  into  subdir  "lib/csharp/src" if we are not
316## already in. It is very important that  each Makefile[.in] sets the
317## variable $(subdir) proper.
318
319/usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.runtime.dll :: 
320        @ subdir="lib/csharp/antlr.runtime" ; \
321    case $(subdir) in \
322          $$subdir ) ;; \
323          * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \
324        test -f "$$d/Makefile" && {  \
325         /usr/bin/make -C "$$d" $@ ; \
326        }       \
327        ;; \
328    esac
329
330/usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.astframe.dll :: 
331        @ subdir="lib/csharp/antlr.astframe" ; \
332    case $(subdir) in \
333          $$subdir ) ;; \
334          * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \
335        test -f "$$d/Makefile" && {  \
336         /usr/bin/make -C "$$d" $@ ; \
337        }       \
338        ;; \
339    esac
340
341
342/usr/neuro/local/yao/yao9/share/antlr-2.7.7/antlr/antlr.jar ::
343        @ subdir="antlr" ; \
344    case $(subdir) in \
345          $$subdir ) ;; \
346          * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \
347        test -f "$$d/Makefile" && {  \
348         /usr/bin/make -C "$$d" $@ ; \
349        }       \
350        ;; \
351    esac
352
353
354/usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/cpp/src/libantlr.a ::
355        @ subdir="lib/cpp/src" ; \
356    case $(subdir) in \
357          $$subdir ) ;; \
358          * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \
359        test -f "$$d/Makefile" && {  \
360         /usr/bin/make -C "$$d" $@ ; \
361        }       \
362        ;; \
363    esac
364
365
366srcdir             = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/examples/python/tinybasic/../../../$(subdir)
367gen_FILES          = basic_l.py basic_p.py basic_w.py
368g_FILES            = $(srcdir)/basic.g $(srcdir)/basic_w.g
369
370all :: $(gen_FILES)
371
372test :: $(gen_FILES) basic.py
373        $(python) basic_l.py   < $(srcdir)/basic.in
374        $(python) basic.py     < $(srcdir)/basic.in
375        $(python) basic.py     < $(srcdir)/basic1.in
376        $(python) basic.py     < $(srcdir)/basic2.in
377
378basic : test
379
380basic.py : $(srcdir)/basic.py
381        @-/bin/rm -r -f $@ && /bin/cp $< .
382
383$(gen_FILES) : $(g_FILES)
384        @ /bin/rm -r -f $(gen_FILES)
385        @ /bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/antlr.sh $(g_FILES)
386        @ $(dos2unix) $(gen_FILES)
387
388$(gen_FILES) : /usr/neuro/local/yao/yao9/share/antlr-2.7.7/antlr/antlr.jar
389
390### cleanup basic
391clean ::
392        @/bin/echo cleaning basic ...
393        @ -/bin/rm -r -f $(gen_FILES)
394        @ -/bin/rm -r -f *.pyc *.tmp *TokenTypes.txt *TokenTypes
395
396
397
398.PHONY: basic
399.PHONY: test1
Note: See TracBrowser for help on using the repository browser.