source: trunk/yao/share/antlr-2.7.7/examples/java/xml/Makefile.in @ 1

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

Initial import of YAO sources

File size: 2.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/java/xml
7
8## get  configured  (standard) variables - checkout or modify
9## scripts/config.vars[.in] for details.
10@stdvars@
11
12### how to get rid of damned dos line ending style and -- al-
13### most equally worse -- stupid tab character.
14### dos2unix  = perl -p -i.tmp -e 's,\r,,g;s,\t, ,g'
15dos2unix = :
16
17## get configured rules
18@stdmake@
19
20## By default we compile class files so we are ready to carry
21## out a test. Note that deps have been setup in such a way
22## that you can do a 'make compile' whithout having made
23## antlr.jar before.
24this : compile
25all  :: compile
26compile : .java
27test :: test1
28
29
30## My *.g files
31g_FILES  = \
32 $(_srcdir)/xml.g \
33 $(eol)
34
35## Java files generated by *.g
36g_src_FILES = \
37  $(thisdir)/XMLLexer.java \
38  $(thisdir)/XMLLexerTokenTypes.java \
39  $(eol)
40
41## Text files generated by *.gls
42g_txt_FILES = \
43        $(thisdir)/XMLLexerTokenTypes.txt \
44        $(eol)
45
46## All generated files by *.g
47g_gen_FILES = \
48        $(g_src_FILES) \
49        $(g_txt_FILES) \
50        $(eol)
51
52# All Java files
53j_src_FILES = \
54        $(g_src_FILES) \
55  $(_srcdir)/Main.java \
56        $(eol)
57
58## Dependencies of test 1
59test1_deps = \
60        .java \
61        $(buildtree)/scripts/javac.sh \
62        $(eol)
63
64## Dependencies of test 1
65test2_deps = \
66        .java \
67        $(buildtree)/scripts/javac.sh \
68        $(eol)
69
70## Test 1
71test1_cmd = \
72        @ @JAVA_CMD@ Main < $(_srcdir)/test.xml \
73        $(eol)
74
75
76## Tests
77test1 : $(test1_deps)
78        @ $(test1_cmd)
79
80test2 : $(test2_deps)
81        @ $(test2_cmd)
82
83
84## How to generated *.java ..
85$(g_src_FILES) : $(g_FILES)
86        @ @RMF@ $(g_src_FILES)
87        @ @ANTLR_COMPILE_CMD@ $(g_FILES)
88        @ $(dos2unix) $(g_src_FILES)
89
90$(g_src_FILES) : @ANTLR_JAR@
91$(g_src_FILES) : $(buildtree)/scripts/antlr.sh
92
93## How to generate class files
94.java : $(j_src_FILES)
95        @-@RMF@ $@
96        @@JAVA_COMPILE_CMD@  $(j_src_FILES) && @ECHO@ > $@
97
98.java : $(buildtree)/scripts/javac.sh
99
100### cleanup astsupport
101clean ::
102        @@ECHO@ cleaning $(subdir) ...
103        @ -@RMF@ .java *.class $(g_gen_FILES)
104        @ -@RMF@ *.pyc *.tmp *TokenTypes.txt *TokenTypes
105
106
107
108### get configured dependencies - for example, just list
109### autoconf variable ANTLR_JAR as reference and it will
110### be  done  automatically  as stddeps contains appropr.
111### rule. For details, checkout scripts/config.vars[.in]
112@stddeps@
113
114.PHONY: compile
115.PHONY: test1
Note: See TracBrowser for help on using the repository browser.