File: Makefile.in

package info (click to toggle)
antlr 2.7.7%2Bdfsg-14
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,016 kB
  • sloc: java: 54,649; cs: 12,537; makefile: 8,854; cpp: 7,359; pascal: 5,273; sh: 4,333; python: 4,297; lisp: 1,969; xml: 220; lex: 192; ansic: 127
file content (133 lines) | stat: -rw-r--r-- 3,466 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
## This file is part of ANTLR (http://www.antlr.org).  Have a
## look into LICENSE.txt for  license  details. This file has 
## been written by (C) Wolfgang Haefelinger, 2004.

## do not change this value 
subdir=examples/java/calc

## get  configured  (standard) variables - checkout or modify
## scripts/config.vars[.in] for details.
@stdvars@

## two abbrevs to make shorten things
_srcdir = @abs_top_srcdir@/examples/java/calc
thisdir = @abs_this_builddir@/examples/java/calc

## By default we compile class files so we are ready to carry
## out a test. Note that deps have been setup in such a way
## that you can do a 'make compile' whithout having made 
## antlr.jar before. 
this : compile
test :: test1
all  :: compile

## All ANTLR grammar files
g_FILES = \
	$(_srcdir)/calc.g \
	$(eol)

## All java files generated 
g_src_FILES = \
  $(thisdir)/CalcLexer.java \
	$(thisdir)/CalcParser.java \
	$(thisdir)/CalcTreeWalker.java \
	$(thisdir)/CalcParserTokenTypes.java \
  $(eol)

## All "generated" class files
g_class_FILES = \
  $(thisdir)/CalcLexer.class \
	$(thisdir)/CalcParser.class \
	$(thisdir)/CalcTreeWalker.class \
	$(thisdir)/CalcParserTokenTypes.class \
  $(eol)

# All generated text files
g_txt_FILES = \
	$(thisdir)/CalcParserTokenTypes.txt \
	$(eol)

## All generated files
g_gen_FILES = \
	$(g_src_FILES) \
	$(g_txt_FILES) \
	$(eol)

## All source files required for test1 
test1_java_FILES = \
	$(g_src_FILES) \
	$(_srcdir)/Calc.java  \
	$(eol)

## All object files required for test1
test1_class_FILES = \
	$(g_class_FILES) \
	$(thisdir)/Calc.class  \
	$(eol)

## Test commands ..
test1_exe = $(test1_class_FILES)
test1_cmd = @JAVA_CMD@ Calc < $(_srcdir)/test.in

## Tests to be executed
test1 : ${test1_exe}
	@ v="$(verbose)"; \
    if test $$v -gt 0 ; then \
      @ECHO@ "$(test1_cmd)" ; \
    else \
      @ECHO@ "exec test1 .."; \
    fi
	@ $(test1_cmd)

## How to make binaries ..
${test1_exe} : $(test1_java_FILES)
	@@JAVA_COMPILE_CMD@ $(test1_java_FILES)

## When being asked to compile update/create class files. 
compile : ${test1_exe} 

## How to compile ANTLR grammar files - to pass flags please
## use (environment variable) ANTLRFLAGS - for example, to 
## enable trace information, please do a 
##
##  $ make ANTLRFLAGS="-trace"
##
$(g_gen_FILES) : $(g_FILES) 
	@ @RMF@ $(g_gen_FILES)
	@ @ANTLR_COMPILE_CMD@  $(g_FILES)

## In  case  antlr.jar  has  changed  we  need to recompile our
## grammar files - it might be the case that code generator has
## changed.
$(g_gen_FILES) : @ANTLR_JAR@

## Housecleaning - note that we have to remove subdir "antlr" here.
## This directory exists due to a bug in Jikes. For details in this
## problem consult:
##   http://www-124.ibm.com/developerworks/bugs/?group_id=10
## Checkout bug #276.
clean ::
	@RMF@ *.o *.obj *.exe calc1  $(g_gen_FILES) *.dll *.class antlr

distclean :: clean
	@RMF@ Makefile

## If  antlr.jar has changed we recompile Java files. That's bit
## against Java philosophy but we do it in any case - just to be
## sure.
$(test1_exe) : @ANTLR_JAR@

## Recompile if our compiler has changed
$(test1_exe) : @abs_this_builddir@/scripts/javac.sh

## Recompile if this file has changed
$(test1_exe) : Makefile


### get configured dependencies - for example, just list
### autoconf variable ANTLR_JAR as reference and it will
### be  done  automatically  as stddeps contains appropr.
### rule. For details, checkout scripts/config.vars[.in] 
@stddeps@

.PHONY: compile