## This file is part of PyANTLR. See LICENSE.txt for license
## details..........Copyright (C) Wolfgang Haefelinger, 2004.
##
## do not change this value 
subdir=examples/python/java

##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@stdvars@
##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

### how to get rid of damned dos line ending style and -- al-
### most equally worse -- stupid tab character.
### dos2unix  = perl -p -i.tmp -e 's,\r,,g;s,\t, ,g' 
dos2unix = :

### when running python we invoke python like ..
python    = /bin/sh @abs_this_builddir@/scripts/python.sh

## get configured rules
@stdmake@


## get configured standard deps
@stddeps@

srcdir          = @abs_top_srcdir@/$(subdir)
gen_FILES       = java_l.py java_p.py java_w.py
g_FILES         = $(srcdir)/java.g $(srcdir)/java_w.g

all :: $(gen_FILES)

test :: $(gen_FILES) java.py
	$(python) java_l.py < $(srcdir)/java.in
	$(python) java.py   < $(srcdir)/java.in

java : test

java.py : $(srcdir)/java.py
	@-@RMF@ $@ && @CP@ $< .

$(gen_FILES) : $(g_FILES)
	@ @RMF@ $(gen_FILES)
	@ @ANTLR_COMPILE_CMD@ $(g_FILES)
	@ $(dos2unix) $(gen_FILES)

$(gen_FILES) : @ANTLR_JAR@

### cleanup java
clean ::
	@@ECHO@ cleaning java ...
	@ -@RMF@ $(gen_FILES)
	@ -@RMF@ *.pyc *.tmp *TokenTypes.txt *TokenTypes


.PHONY: java
