~ubuntu-branches/ubuntu/breezy/antlr/breezy

« back to all changes in this revision

Viewing changes to examples/java/HTML/Makefile.in

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2005-06-29 16:11:22 UTC
  • mfrom: (0.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050629161122-g81crc3z92p5xhsg
Tags: 2.7.5-6ubuntu4
Build depend on java-gcj-compat-dev, depend on java-gcj-compat.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 
 
6
subdir=examples/java/HTML
 
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' 
 
15
dos2unix = :
 
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. 
 
24
this : compile
 
25
all  :: compile
 
26
compile : .java
 
27
test :: test1
 
28
 
 
29
 
 
30
## My *.g files 
 
31
g_FILES  = \
 
32
 $(_srcdir)/html.g \
 
33
 $(eol)
 
34
 
 
35
## Java files generated by *.g
 
36
g_src_FILES = \
 
37
  $(thisdir)/HTMLLexer.java \
 
38
  $(thisdir)/HTMLParser.java \
 
39
  $(thisdir)/HTMLTokenTypes.java \
 
40
  $(eol)
 
41
 
 
42
## Text files generated by *.g
 
43
g_txt_FILES = \
 
44
        $(thisdir)/HTMLTokenTypes.txt \
 
45
        $(eol)
 
46
 
 
47
## All generated files by *.g
 
48
g_gen_FILES = \
 
49
        $(g_src_FILES) \
 
50
        $(g_txt_FILES) \
 
51
        $(eol)
 
52
 
 
53
# All Java files
 
54
j_src_FILES = \
 
55
        $(g_src_FILES) \
 
56
  $(_srcdir)/Main.java \
 
57
        $(eol)
 
58
 
 
59
## Dependencies of test 1
 
60
test1_deps = \
 
61
        .java \
 
62
        $(buildtree)/scripts/javac.sh \
 
63
        $(eol)
 
64
 
 
65
## Dependencies of test 1
 
66
test2_deps = \
 
67
        .java \
 
68
        $(buildtree)/scripts/javac.sh \
 
69
        $(eol)
 
70
 
 
71
## Test 1
 
72
test1_cmd = \
 
73
        @ @JAVA_CMD@ Main < $(_srcdir)/test.html \
 
74
        $(eol)
 
75
 
 
76
 
 
77
## Tests
 
78
test1 : $(test1_deps)
 
79
        @ $(test1_cmd)
 
80
 
 
81
test2 : $(test2_deps)
 
82
        @ $(test2_cmd)
 
83
 
 
84
 
 
85
## How to generated *.java ..
 
86
$(g_src_FILES) : $(g_FILES)
 
87
        @ rm -f $(g_src_FILES)
 
88
        @ @ANTLR_COMPILE_CMD@ $(g_FILES)
 
89
        @ $(dos2unix) $(g_src_FILES)
 
90
 
 
91
$(g_src_FILES) : @ANTLR_JAR@
 
92
$(g_src_FILES) : $(buildtree)/scripts/antlr.sh
 
93
 
 
94
## How to generate class files
 
95
.java : $(j_src_FILES)
 
96
        @-rm -f $@
 
97
        @@JAVA_COMPILE_CMD@  $(j_src_FILES) && echo > $@
 
98
 
 
99
.java : $(buildtree)/scripts/javac.sh
 
100
 
 
101
### cleanup astsupport
 
102
clean ::
 
103
        @echo cleaning $(subdir) ...
 
104
        @ -rm -f .java *.class $(g_gen_FILES)
 
105
        @ -rm -f *.pyc *.tmp *TokenTypes.txt *TokenTypes
 
106
 
 
107
 
 
108
 
 
109
### get configured dependencies - for example, just list
 
110
### autoconf variable ANTLR_JAR as reference and it will
 
111
### be  done  automatically  as stddeps contains appropr.
 
112
### rule. For details, checkout scripts/config.vars[.in] 
 
113
@stddeps@
 
114
 
 
115
.PHONY: compile
 
116
.PHONY: test1