## 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/tinybasic

##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          = basic_l.py basic_p.py basic_w.py
g_FILES            = $(srcdir)/basic.g $(srcdir)/basic_w.g

all :: $(gen_FILES)

test :: $(gen_FILES) basic.py
	$(python) basic_l.py   < $(srcdir)/basic.in
	$(python) basic.py     < $(srcdir)/basic.in
	$(python) basic.py     < $(srcdir)/basic1.in
	$(python) basic.py     < $(srcdir)/basic2.in

basic : test

basic.py : $(srcdir)/basic.py
	@-rm -f $@ && cp $< .

$(gen_FILES) : $(g_FILES)
	@ rm -f $(gen_FILES)
	@ @ANTLR_COMPILE_CMD@ $(g_FILES)
	@ $(dos2unix) $(gen_FILES)

$(gen_FILES) : @ANTLR_JAR@

### cleanup basic
clean ::
	@echo cleaning basic ...
	@ -rm -f $(gen_FILES)
	@ -rm -f *.pyc *.tmp *TokenTypes.txt *TokenTypes



.PHONY: basic
.PHONY: test1
