source: trunk/yao/share/antlr-2.7.7/examples/csharp/heteroAST/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: 16.4 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/csharp/heteroAST
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### how to get rid of damned dos line ending style and -- al-
104### most equally worse -- stupid tab character.
105### dos2unix  = perl -p -i.tmp -e 's,\r,,g;s,\t, ,g'
106dos2unix = :
107
108## get configured rules
109
110##xxxxxxxxxxxxxxxxxxxxxx --*- Makefile -*-- xxxxxxxxxxxxxxxx>>> config.make
111## By default, make will jump into any sub directory that contains a   file
112## named "Makefile". This is done  in the order implied by "/bin/ls"  which
113## is in almost  all  cases  correct  (note  that  you  should  not  design
114## Makefiles which depend on a specific invocation order). You can override
115## specific  behaviour  by  using  variable SUBDIRS. If given and not empty,
116## "/bin/ls" is not used. Also,  if you want to disable jumping subdirs you
117## may  use  either ".", ".."  as  value for SUBDIRS. Note that SUBDIRS may
118## contain any directory (except "." and "..).
119
120## This is very much  GNU specific, sigh.  Variable SUBDIRS is used to tell
121## make which  subdirectory to jump. It's  value is normally preset or just
122## empty, in which case /bin/ls is used as discussed above. However, I also
123## want that a user can say
124##
125##  make SUBDIRS="d1 d2 .. dn"
126##
127## That means, ignore defaults and go ahead and make exactly this director-
128## ies mentioned. Of course, this should only have  an  impact  on Makefile
129## being used  by  "make"  but not for any makefils in d1 .. dn, right? For
130## example, if di  needs  to  make directories a,b and c, then they need to
131## be made of course. So all burns down to the question how to prevent a
132## variable from being passed to submakes. Below you can see the answer. If
133## you believe that there's a simpler answer to the problem don't hesistate
134## to try it out. If  it  works, send me an email: ora dot et dot labora at
135## web dot de. But be warned - you need to try all variations.
136##
137## Here is in short what  I  found  and how  it  works.  Variables given on
138## command line  are  saved  in  variable  MAKEOVERRIDES. This  variable is
139## exported  and  passed down. On  invocation  of a submake file, make will
140## have a  look  into MAKEOVERRIDES  and unpack each variable found therein.
141## Therefore I'm just going to  remove  every (?) occurance of SUBDIRS from
142## this variable.
143MAKEOVERRIDES := $(patsubst SUBDIRS=%,,$(MAKEOVERRIDES))
144
145
146## The actuall rule on how to make a recursive target.
147all clean distclean test install force-target clean-target :: 
148        @dirs="$(SUBDIRS)" ; \
149        test -z "$${dirs}" && { \
150                dirs=`/bin/ls` ; \
151  } ; \
152        for d in . $${dirs} ; do \
153                case $${d} in \
154                . | .. ) ;; \
155          $(SUBDIRS_NOT) ) ;; \
156                *) \
157                if test -f "$${d}/Makefile" ; then \
158                  echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" ; \
159                  echo ">> /usr/bin/make -C $(subdir)/$${d} $@                          " ; \
160                        echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" ; \
161                        /usr/bin/make -C "$$d" $@ || exit 1 ;\
162                fi ; \
163                ;; \
164                esac ; \
165        done
166
167## For historical  reasons only you can make local targets as "this-*" or
168## "*-this" rules. The  default is to do nothing. Although this targets
169## exists, it is recommended to define further "all", "clean" etc. double
170## colon rules.
171 
172all       :: this-all all-this
173clean     :: this-clean clean-this
174distclean :: this-distclean distclean-this
175test      :: this-test test-this
176install   :: this-install install-this
177
178this-all ::
179this-clean ::
180this-distclean ::
181this-test ::
182this-install ::
183
184all-this ::
185clean-this ::
186distclean-this ::
187test-this ::
188install-this ::
189
190force-target :: clean-target all
191
192distclean :: clean
193
194distclean ::
195        $(RM) Makefile
196
197## xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<< config.make
198
199## By default we compile class files so we are ready to carry
200## out a test. Note that deps have been setup in such a way
201## that you can do a 'make compile' whithout having made
202## antlr.jar before.
203this : compile
204all  :: compile
205compile : $(test1_exe)
206test :: test1
207
208
209## My *.g files
210g_FILES  = \
211 $(_srcdir)/calc.g \
212 $(eol)
213
214## Java files generated by *.g
215g_src_FILES = \
216        $(thisdir)/CalcLexer.cs \
217  $(thisdir)/CalcParser.cs \
218  $(thisdir)/CalcParserTokenTypes.cs \
219  $(eol)
220
221## Text files generated by *.g
222g_txt_FILES = \
223        $(thisdir)/CalcParserTokenTypes.txt \
224        $(eol)
225
226## All generated files by *.g
227g_gen_FILES = \
228        $(g_src_FILES) \
229        $(g_txt_FILES) \
230        $(eol)
231
232## Dependencies of g_src_FILES
233g_src_DEPS = \
234        $(g_FILES) \
235        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/antlr/antlr.jar \
236        $(buildtree)/scripts/antlr.sh \
237        $(eol)
238
239# All source files for test1
240test1_exe_FILES = \
241        $(g_src_FILES) \
242  $(_srcdir)/BinaryOperatorAST.cs \
243  $(_srcdir)/CalcAST.cs \
244  $(_srcdir)/INTNode.cs \
245  $(_srcdir)/Main.cs \
246  $(_srcdir)/MULTNode.cs \
247  $(_srcdir)/PLUSNode.cs \
248        $(eol)
249
250test1_exe = \
251        test1.exe \
252        $(eol)
253
254test1_exe_DEPS = \
255        $(test1_exe_FILES) \
256        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.runtime.dll \
257        $(buildtree)/scripts/csc.sh \
258        $(eol)
259
260## Dependencies of test 1
261test1_DEPS = \
262        antlr.runtime.dll \
263        test1.exe \
264        $(eol)
265
266## Test 1
267test1_CMD = \
268        @ $(CLR) ./test1.exe < $(_srcdir)/test.in \
269        $(eol)
270
271
272## we need a local copy of ANTLR_NET in this directory to be
273## able to execute tests!
274antlr.runtime.dll : /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.runtime.dll
275        /bin/cp $< $@
276
277## *.g -> *.cs
278$(g_src_FILES) : $(g_src_DEPS)
279        @ /bin/rm -r -f $(g_src_FILES)
280        @ /bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/antlr.sh $(g_FILES)
281        @ $(dos2unix) $(g_src_FILES)
282
283## How to create test1
284$(test1_exe) : $(test1_exe_DEPS)
285        @ -/bin/rm -r -f $@
286        @/bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/csc.sh  $@ $(test1_exe_FILES)
287
288## Tests
289test1 : $(test1_DEPS)
290        @ $(test1_CMD)
291
292### cleanup astsupport
293clean ::
294        @/bin/echo cleaning $(subdir) ...
295        @ -/bin/rm -r -f .compile.st *.class $(g_gen_FILES) antlr.runtime.dll
296        @ -/bin/rm -r -f *.pyc *.tmp *TokenTypes.txt *TokenTypes *.exe
297
298
299
300### get configured dependencies - for example, just list
301### autoconf variable ANTLR_JAR as reference and it will
302### be  done  automatically  as stddeps contains appropr.
303### rule. For details, checkout scripts/config.vars[.in]
304
305## --*- Makefile -*--
306## Make listed targets even in case a file with same name exists.
307.PHONY: \
308 this \
309 all clean install test distclean \
310 this-all this-clean this-install this-test this-distclean \
311 all-this clean-this install-this test-this distclean-this \
312 $(eof)
313
314## delete suffix rules - shortens output when using -d and is not
315## used anyway (and should not be used).
316.SUFFIXES:
317
318Makefile :: /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../$(subdir)/Makefile.in  \
319            /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.deps \
320                                          /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.make \
321                                          /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.vars \
322            /usr/neuro/local/yao/yao9/share/antlr-2.7.7/config.status
323        @echo "*** update $(subdir)/Makefile"
324        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES="$(subdir)/Makefile" /bin/sh ./config.status -q
325
326/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.deps : \
327        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/config.deps.in
328        @echo "*** update $@"
329        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/config.deps /bin/sh ./config.status -q
330
331/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.make : \
332        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/config.make.in
333        @echo "*** update $@"
334        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/config.make /bin/sh ./config.status -q
335
336/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.vars : \
337        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/config.vars.in
338        @echo "*** update $@"
339        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/config.vars /bin/sh ./config.status -q
340
341/usr/neuro/local/yao/yao9/share/antlr-2.7.7/config.status : \
342        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../configure
343        @echo "*** reconfigure $@ - stay tuned .."
344        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && /bin/sh ./config.status -q --recheck
345        @echo "*** update all configured files .."
346        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && /bin/sh ./config.status -q
347
348### In a pure devel mode there should be also a dependency listed on how
349### to make configure out of  configure.in.  This  requires that usr has
350### m4  and  autoconf (proper version) installed. Appropriate checks are
351### not done in configure. If so, then uncomment next lines:
352###
353###   @rule_configure_configure_in@
354###
355
356/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/antlr.sh : \
357        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/antlr.sh.in
358        @echo "*** update $@"
359        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/antlr.sh /bin/sh ./config.status -q
360
361/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/cpp.sh : \
362        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/cpp.sh.in
363        @echo "*** update $@"
364        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/cpp.sh /bin/sh ./config.status -q
365
366/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/csc.sh : \
367        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/csc.sh.in
368        @echo "*** update $@"
369        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/csc.sh /bin/sh ./config.status -q
370
371/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/cxx.sh : \
372        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/cxx.sh.in
373        @echo "*** update $@"
374        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/cxx.sh /bin/sh ./config.status -q
375
376/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/jar.sh : \
377        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/jar.sh.in
378        @echo "*** update $@"
379        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/jar.sh /bin/sh ./config.status -q
380
381/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/javac.sh : \
382        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/javac.sh.in
383        @echo "*** update $@"
384        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/javac.sh /bin/sh ./config.status -q
385
386/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/java.sh : \
387        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/java.sh.in
388        @echo "*** update $@"
389        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/java.sh /bin/sh ./config.status -q
390
391/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/lib.sh : \
392        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/lib.sh.in
393        @echo "*** update $@"
394        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/lib.sh /bin/sh ./config.status -q
395
396/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/link.sh : \
397        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/link.sh.in
398        @echo "*** update $@"
399        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/link.sh /bin/sh ./config.status -q
400
401/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/pyinst.sh : \
402        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/pyinst.sh.in
403        @echo "*** update $@"
404        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/pyinst.sh /bin/sh ./config.status -q
405
406/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/python.sh : \
407        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/python.sh.in
408        @echo "*** update $@"
409        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/python.sh /bin/sh ./config.status -q
410
411
412## This rule shall ensure that ANTLR_NET is up-to-date. The rule is a
413## double colon rule, ie. further  rules  with the same target may be
414## added. For unknown reasons, double colon rules are always phony,ie.
415## getting executed even in case target exists. We break the infinite
416## loop,  we only  jump  into  subdir  "lib/csharp/src" if we are not
417## already in. It is very important that  each Makefile[.in] sets the
418## variable $(subdir) proper.
419
420/usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.runtime.dll ::
421        @ subdir="lib/csharp/antlr.runtime" ; \
422    case $(subdir) in \
423          $$subdir ) ;; \
424          * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \
425        test -f "$$d/Makefile" && {  \
426         /usr/bin/make -C "$$d" $@ ; \
427        }       \
428        ;; \
429    esac
430
431/usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.astframe.dll ::
432        @ subdir="lib/csharp/antlr.astframe" ; \
433    case $(subdir) in \
434          $$subdir ) ;; \
435          * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \
436        test -f "$$d/Makefile" && {  \
437         /usr/bin/make -C "$$d" $@ ; \
438        }       \
439        ;; \
440    esac
441
442
443/usr/neuro/local/yao/yao9/share/antlr-2.7.7/antlr/antlr.jar ::
444        @ subdir="antlr" ; \
445    case $(subdir) in \
446          $$subdir ) ;; \
447          * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \
448        test -f "$$d/Makefile" && {  \
449         /usr/bin/make -C "$$d" $@ ; \
450        }       \
451        ;; \
452    esac
453
454
455/usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/cpp/src/libantlr.a ::
456        @ subdir="lib/cpp/src" ; \
457    case $(subdir) in \
458          $$subdir ) ;; \
459          * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \
460        test -f "$$d/Makefile" && {  \
461         /usr/bin/make -C "$$d" $@ ; \
462        }       \
463        ;; \
464    esac
465
466
467.PHONY: compile
468.PHONY: test1
469.PHONY: test2
Note: See TracBrowser for help on using the repository browser.