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/includeFile
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)/P.g \
33  $(eol)
34
35## Java files generated by *.g
36g_src_FILES = \
37	$(thisdir)/PLexer.java \
38	$(thisdir)/PParser.java \
39	$(thisdir)/PParserTokenTypes.java \
40  $(eol)
41
42## Text files generated by *.g
43g_txt_FILES = \
44  $(thisdir)/PParserTokenTypes.txt \
45	$(eol)
46
47## All generated files by *.g
48g_gen_FILES = \
49	$(g_src_FILES) \
50	$(g_txt_FILES) \
51	$(eol)
52
53# All Java files
54j_src_FILES = \
55	$(g_src_FILES) \
56  $(_srcdir)/Main.java \
57	$(eol)
58
59## Dependencies of test 1
60test1_deps = \
61	.java \
62	subincl.h \
63	incl.h \
64	$(buildtree)/scripts/javac.sh \
65	$(eol)
66
67## Test 1
68test1_cmd = \
69	@ @JAVA_CMD@ Main < $(_srcdir)/test.c \
70	$(eol)
71
72%.h : $(_srcdir)/%.h
73	@CP@ $< $@
74
75## Tests
76test1 : $(test1_deps)
77	@ $(test1_cmd)
78
79## How to generated *.java ..
80$(g_src_FILES) : $(g_FILES)
81	@ @RMF@ $(g_src_FILES)
82	@ @ANTLR_COMPILE_CMD@ $(g_FILES)
83	@ $(dos2unix) $(g_src_FILES)
84
85$(g_src_FILES) : @ANTLR_JAR@
86$(g_src_FILES) : $(buildtree)/scripts/antlr.sh
87
88## How to generate class files
89.java : $(j_src_FILES)
90	@-@RMF@ $@
91	@@JAVA_COMPILE_CMD@  $(j_src_FILES) && @ECHO@ > $@
92
93.java : $(buildtree)/scripts/javac.sh
94
95### cleanup astsupport
96clean ::
97	@@ECHO@ cleaning $(subdir) ...
98	@ -@RMF@ .java *.class $(g_gen_FILES) tinybasic
99	@ -@RMF@ *.pyc *.tmp *TokenTypes.txt *TokenTypes
100
101
102
103### get configured dependencies - for example, just list
104### autoconf variable ANTLR_JAR as reference and it will
105### be  done  automatically  as stddeps contains appropr.
106### rule. For details, checkout scripts/config.vars[.in]
107@stddeps@
108
109.PHONY: compile
110.PHONY: test1
111