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