source: trunk/yao/share/antlr-2.7.7/examples/cpp/lexRewrite/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.4 KB
Line 
1##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2
3## --*- Makefile -*--
4SUBDIRS         := 
5
6## helper utilities ..
7INSTALL         = /usr/bin/install -c
8MKDIR           = /bin/mkdir
9RM              = /bin/rm -r -f
10RMF             = /bin/rm -r -f
11TAR             = /bin/tar
12TOUCH           = /bin/touch
13CHMOD           = /bin/chmod
14SED             = /bin/sed
15GREP            = /bin/grep
16CAT             = /bin/cat
17CHMOD           = /bin/chmod
18CP              = /bin/cp
19ECHO            = /bin/echo
20
21# usual dribble
22exec_prefix     = ${prefix}
23prefix          = /usr/local
24program_transform_name = s,x,x,
25bindir          = ${exec_prefix}/bin
26sbindir         = ${exec_prefix}/sbin
27libexecdir      = ${exec_prefix}/libexec
28datadir         = ${prefix}/share
29sysconfdir      = ${prefix}/etc
30sharedstatedir  = ${prefix}/com
31localstatedir   = ${prefix}/var
32libdir          = ${exec_prefix}/lib
33includedir      = ${prefix}/include
34oldincludedir   = /usr/include
35infodir         = ${prefix}/info
36mandir          = ${prefix}/man
37build_alias     = 
38host_alias      = 
39target_alias    = 
40build           = x86_64-unknown-linux-gnu
41build_cpu       = x86_64
42build_vendor    = unknown
43build_os        = linux-gnu
44host            = x86_64-unknown-linux-gnu
45host_cpu        = x86_64
46host_vendor     = unknown
47host_os         = linux-gnu
48just_make       = /usr/bin/make
49
50# Version stuff...
51VERSION         = 2
52SUBVERSION      = 7
53PATCHLEVEL      = 7
54PACKAGE_NAME    = antlr
55PACKAGE_VERSION = 2.7.7
56versioneddir    = antlr-2.7.7
57
58# navigation
59builddir        = /usr/neuro/local/yao/yao9/share/antlr-2.7.7
60buildtree       = /usr/neuro/local/yao/yao9/share/antlr-2.7.7
61sourcetree      = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/..
62
63## Two abbrevs to shorten things. $(thisdir) shall be the current
64## working  directory  as  absolute  name  and $(_srcdir) is it's
65## source dir companion. That means that  $(thisdir)/Makefile has
66## been generated by $(_srcdir)/Makefile.in.
67_srcdir         = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../$(subdir)
68thisdir         = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/$(subdir)
69
70# variable 'srcdir' is deprecated - use sourcetree
71srcdir          = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/..
72# variable 'objdir' is deprecated - use buildtree
73objdir          = /usr/neuro/local/yao/yao9/share/antlr-2.7.7
74
75# other
76verbose         = 0
77
78## SUBDIRS you want to exclude (separate them by using "|").
79SUBDIRS_NOT    := .
80
81CLR            = /usr/bin/mono
82
83ANTLR_JAR      = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/antlr/antlr.jar
84ANTLR_LIB      = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/cpp/src/libantlr.a
85ANTLR_NET      = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.runtime.dll
86ANTLR_PY       = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/python/antlr/python.py
87ASTFRAME_NET   = /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.astframe.dll
88
89antlr_jar      = antlr.jar
90antlr_lib      = libantlr.a
91antlr_net      = antlr.runtime.dll
92antlr_py       = python.py
93astframe_net   = antlr.astframe.dll
94##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
95
96## do not change this value
97
98subdir=examples/cpp/lexRewrite
99
100srcdir=/usr/neuro/local/yao/yao9/share/antlr-2.7.7/examples/cpp/lexRewrite/../../../examples/cpp/lexRewrite
101objdir=/usr/neuro/local/yao/yao9/share/antlr-2.7.7/examples/cpp/lexRewrite
102
103this : test
104test : test1
105
106all: lexRewrite test
107
108rewrite_g_FILES = \
109        $(srcdir)/rewrite.g \
110        $(eol)
111
112rewrite_g_cxx_FILES = \
113        $(objdir)/Rewrite.cpp \
114        $(eol)
115
116rewrite_g_hpp_FILES = \
117        $(objdir)/Rewrite.hpp \
118        $(objdir)/RewriteTokenTypes.hpp \
119        $(eol)
120
121rewrite_g_txt_FILES = \
122        $(objdir)/RewriteTokenTypes.txt \
123        $(eol)
124
125rewrite_g_gen_FILES = \
126        $(rewrite_g_cxx_FILES) \
127        $(rewrite_g_hpp_FILES) \
128        $(rewrite_g_txt_FILES) \
129        $(eol)
130
131rewrite_g_obj_FILES = \
132        $(objdir)/Rewrite.o \
133        $(eol)
134
135## Source files
136lexRewrite_cxx_FILES = \
137        $(rewrite_g_cxx_files) \
138        $(srcdir)/Main.cpp \
139        $(srcdir)/Rewrite.cpp \
140        $(eol)
141
142## Object files
143lexRewrite_obj_FILES = \
144        $(rewrite_g_obj_files) \
145        $(objdir)/Main.o \
146        $(objdir)/Rewrite.o \
147        $(eol)
148
149## Test commands
150test1_cmd = $(objdir)/lexRewrite < $(srcdir)/test.in
151
152## Tests to be executed
153test1: lexRewrite
154        @ v="$(verbose)"; if test $$v -gt 0 ; then  /bin/echo "$(test1_cmd)" ;  else  /bin/echo "exec test1 .."fi
155        @ $(test1_cmd)
156
157## How to make binaries
158lexRewrite : $(lexRewrite_obj_FILES) /usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/cpp/src/libantlr.a
159        /bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/link.sh $@ $(lexRewrite_obj_FILES)
160
161## How to compile ANTLR grammar files
162$(objdir)/.rewrite.g : $(srcdir)/rewrite.g /usr/neuro/local/yao/yao9/share/antlr-2.7.7/antlr/antlr.jar
163        /bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/antlr.sh $(srcdir)/rewrite.g
164        $(TOUCH) `echo $(objdir)/.rewrite.g`
165
166$(rewrite_g_gen_FILES): $(objdir)/.rewrite.g
167
168## GNU make - how to make object file
169$(objdir)/%.o : $(srcdir)/%.cpp
170        @ /bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/cxx.sh $<
171
172## GNU make - how to make object file
173$(objdir)/%.o : $(objdir)/%.cpp
174        @ /bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/cxx.sh $<
175
176## GNU make - how to make object file
177%.o : $(srcdir)/%.cpp
178        @ /bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/cxx.sh $<
179
180## GNU make - how to make object file
181%.o : $(objdir)/%.cpp
182        @ /bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/cxx.sh $<
183
184#####
185## GNU make - how to make object file
186$(objdir)/%.o : $(srcdir)/%.c
187        @ /bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/c.sh $<
188
189## GNU make - how to make object file
190$(objdir)/%.o : $(objdir)/%.c
191        @ /bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/c.sh $<
192
193## GNU make - how to make object file
194%.o : $(srcdir)/%.c
195        @ /bin/sh /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/c.sh $<
196
197## Housecleaning
198clean:
199        - /bin/rm -r -f *.o *.obj *.exe \
200        $(rewrite_g_gen_FILES) \
201        $(objdir)/.rewrite.g \
202        lexRewrite
203
204distclean: clean
205        /bin/rm -r -f Makefile
206
207## If cxx.sh script changed ..
208$(rewrite_g_obj_FILES) : /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/cxx.sh
209## If link.sh script changed ..
210$(rewrite_g_obj_FILES) : /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/link.sh
211
212$(objdir)/Main.o: \
213        $(srcdir)/Main.cpp \
214        $(objdir)/Rewrite.hpp \
215        $(sourcetree)/lib/cpp/antlr/config.hpp \
216        $(sourcetree)/lib/cpp/antlr/CommonToken.hpp \
217        $(sourcetree)/lib/cpp/antlr/Token.hpp \
218        $(sourcetree)/lib/cpp/antlr/TokenRefCount.hpp \
219        $(sourcetree)/lib/cpp/antlr/InputBuffer.hpp \
220        $(sourcetree)/lib/cpp/antlr/CircularQueue.hpp \
221        $(sourcetree)/lib/cpp/antlr/BitSet.hpp \
222        $(objdir)/RewriteTokenTypes.hpp \
223        $(sourcetree)/lib/cpp/antlr/CharScanner.hpp \
224        $(sourcetree)/lib/cpp/antlr/TokenStream.hpp \
225        $(sourcetree)/lib/cpp/antlr/RecognitionException.hpp \
226        $(sourcetree)/lib/cpp/antlr/ANTLRException.hpp \
227        $(sourcetree)/lib/cpp/antlr/SemanticException.hpp \
228        $(sourcetree)/lib/cpp/antlr/MismatchedCharException.hpp \
229        $(sourcetree)/lib/cpp/antlr/LexerSharedInputState.hpp \
230        $(sourcetree)/lib/cpp/antlr/RefCount.hpp \
231        $(sourcetree)/lib/cpp/antlr/CharBuffer.hpp
232
233$(objdir)/Rewrite.o: \
234        $(objdir)/Rewrite.cpp \
235        $(objdir)/Rewrite.hpp \
236        $(sourcetree)/lib/cpp/antlr/config.hpp \
237        $(sourcetree)/lib/cpp/antlr/CommonToken.hpp \
238        $(sourcetree)/lib/cpp/antlr/Token.hpp \
239        $(sourcetree)/lib/cpp/antlr/TokenRefCount.hpp \
240        $(sourcetree)/lib/cpp/antlr/InputBuffer.hpp \
241        $(sourcetree)/lib/cpp/antlr/CircularQueue.hpp \
242        $(sourcetree)/lib/cpp/antlr/BitSet.hpp \
243        $(objdir)/RewriteTokenTypes.hpp \
244        $(sourcetree)/lib/cpp/antlr/CharScanner.hpp \
245        $(sourcetree)/lib/cpp/antlr/TokenStream.hpp \
246        $(sourcetree)/lib/cpp/antlr/RecognitionException.hpp \
247        $(sourcetree)/lib/cpp/antlr/ANTLRException.hpp \
248        $(sourcetree)/lib/cpp/antlr/SemanticException.hpp \
249        $(sourcetree)/lib/cpp/antlr/MismatchedCharException.hpp \
250        $(sourcetree)/lib/cpp/antlr/LexerSharedInputState.hpp \
251        $(sourcetree)/lib/cpp/antlr/RefCount.hpp \
252        $(sourcetree)/lib/cpp/antlr/CharBuffer.hpp \
253        $(sourcetree)/lib/cpp/antlr/TokenStreamException.hpp \
254        $(sourcetree)/lib/cpp/antlr/TokenStreamIOException.hpp \
255        $(sourcetree)/lib/cpp/antlr/TokenStreamRecognitionException.hpp \
256        $(sourcetree)/lib/cpp/antlr/CharStreamException.hpp \
257        $(sourcetree)/lib/cpp/antlr/CharStreamIOException.hpp \
258        $(sourcetree)/lib/cpp/antlr/NoViableAltForCharException.hpp
259
260##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
261
262## --*- Makefile -*--
263## Make listed targets even in case a file with same name exists.
264.PHONY: \
265 this \
266 all clean install test distclean \
267 this-all this-clean this-install this-test this-distclean \
268 all-this clean-this install-this test-this distclean-this \
269 $(eof)
270
271## delete suffix rules - shortens output when using -d and is not
272## used anyway (and should not be used).
273.SUFFIXES:
274
275Makefile :: /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../$(subdir)/Makefile.in  \
276            /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.deps \
277                                          /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.make \
278                                          /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.vars \
279            /usr/neuro/local/yao/yao9/share/antlr-2.7.7/config.status
280        @echo "*** update $(subdir)/Makefile"
281        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES="$(subdir)/Makefile" /bin/sh ./config.status -q
282
283/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.deps : \
284        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/config.deps.in
285        @echo "*** update $@"
286        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/config.deps /bin/sh ./config.status -q
287
288/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.make : \
289        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/config.make.in
290        @echo "*** update $@"
291        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/config.make /bin/sh ./config.status -q
292
293/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/config.vars : \
294        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/config.vars.in
295        @echo "*** update $@"
296        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/config.vars /bin/sh ./config.status -q
297
298/usr/neuro/local/yao/yao9/share/antlr-2.7.7/config.status : \
299        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../configure
300        @echo "*** reconfigure $@ - stay tuned .."
301        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && /bin/sh ./config.status -q --recheck
302        @echo "*** update all configured files .."
303        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && /bin/sh ./config.status -q
304
305### In a pure devel mode there should be also a dependency listed on how
306### to make configure out of  configure.in.  This  requires that usr has
307### m4  and  autoconf (proper version) installed. Appropriate checks are
308### not done in configure. If so, then uncomment next lines:
309###
310###   @rule_configure_configure_in@
311###
312
313/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/antlr.sh : \
314        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/antlr.sh.in
315        @echo "*** update $@"
316        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/antlr.sh /bin/sh ./config.status -q
317
318/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/cpp.sh : \
319        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/cpp.sh.in
320        @echo "*** update $@"
321        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/cpp.sh /bin/sh ./config.status -q
322
323/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/csc.sh : \
324        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/csc.sh.in
325        @echo "*** update $@"
326        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/csc.sh /bin/sh ./config.status -q
327
328/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/cxx.sh : \
329        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/cxx.sh.in
330        @echo "*** update $@"
331        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/cxx.sh /bin/sh ./config.status -q
332
333/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/jar.sh : \
334        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/jar.sh.in
335        @echo "*** update $@"
336        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/jar.sh /bin/sh ./config.status -q
337
338/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/javac.sh : \
339        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/javac.sh.in
340        @echo "*** update $@"
341        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/javac.sh /bin/sh ./config.status -q
342
343/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/java.sh : \
344        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/java.sh.in
345        @echo "*** update $@"
346        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/java.sh /bin/sh ./config.status -q
347
348/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/lib.sh : \
349        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/lib.sh.in
350        @echo "*** update $@"
351        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/lib.sh /bin/sh ./config.status -q
352
353/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/link.sh : \
354        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/link.sh.in
355        @echo "*** update $@"
356        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/link.sh /bin/sh ./config.status -q
357
358/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/pyinst.sh : \
359        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/pyinst.sh.in
360        @echo "*** update $@"
361        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/pyinst.sh /bin/sh ./config.status -q
362
363/usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/python.sh : \
364        /usr/neuro/local/yao/yao9/share/antlr-2.7.7/scripts/../scripts/python.sh.in
365        @echo "*** update $@"
366        @cd /usr/neuro/local/yao/yao9/share/antlr-2.7.7 && CONFIG_FILES=scripts/python.sh /bin/sh ./config.status -q
367
368
369## This rule shall ensure that ANTLR_NET is up-to-date. The rule is a
370## double colon rule, ie. further  rules  with the same target may be
371## added. For unknown reasons, double colon rules are always phony,ie.
372## getting executed even in case target exists. We break the infinite
373## loop,  we only  jump  into  subdir  "lib/csharp/src" if we are not
374## already in. It is very important that  each Makefile[.in] sets the
375## variable $(subdir) proper.
376
377/usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.runtime.dll ::
378        @ subdir="lib/csharp/antlr.runtime" ; \
379    case $(subdir) in \
380          $$subdir ) ;; \
381          * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \
382        test -f "$$d/Makefile" && {  \
383         /usr/bin/make -C "$$d" $@ ; \
384        }       \
385        ;; \
386    esac
387
388/usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/antlr.astframe.dll ::
389        @ subdir="lib/csharp/antlr.astframe" ; \
390    case $(subdir) in \
391          $$subdir ) ;; \
392          * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \
393        test -f "$$d/Makefile" && {  \
394         /usr/bin/make -C "$$d" $@ ; \
395        }       \
396        ;; \
397    esac
398
399
400/usr/neuro/local/yao/yao9/share/antlr-2.7.7/antlr/antlr.jar ::
401        @ subdir="antlr" ; \
402    case $(subdir) in \
403          $$subdir ) ;; \
404          * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \
405        test -f "$$d/Makefile" && {  \
406         /usr/bin/make -C "$$d" $@ ; \
407        }       \
408        ;; \
409    esac
410
411
412/usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/cpp/src/libantlr.a ::
413        @ subdir="lib/cpp/src" ; \
414    case $(subdir) in \
415          $$subdir ) ;; \
416          * ) d="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/$$subdir" ; \
417        test -f "$$d/Makefile" && {  \
418         /usr/bin/make -C "$$d" $@ ; \
419        }       \
420        ;; \
421    esac
422
423##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Note: See TracBrowser for help on using the repository browser.