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/csharp/unicode 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 : $(test1_exe) 27test :: test1 28 29 30## My *.g files 31g_FILES = \ 32 $(_srcdir)/unicode.g \ 33 $(eol) 34 35## Java files generated by *.g 36g_src_FILES = \ 37 $(thisdir)/L.cs \ 38 $(thisdir)/LTokenTypes.cs \ 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## Dependencies of g_src_FILES 53g_src_DEPS = \ 54 $(g_FILES) \ 55 @ANTLR_JAR@ \ 56 $(buildtree)/scripts/antlr.sh \ 57 $(eol) 58 59# All source files for test1 60test1_exe_FILES = \ 61 $(g_src_FILES) \ 62 $(_srcdir)/csccbug.cs \ 63 $(eol) 64 65test1_exe = \ 66 test1.exe \ 67 $(eol) 68 69test1_exe_DEPS = \ 70 $(test1_exe_FILES) \ 71 @ANTLR_NET@ \ 72 $(buildtree)/scripts/csc.sh \ 73 $(eol) 74 75## Dependencies of test 1 76test1_DEPS = \ 77 @antlr_net@ \ 78 test1.exe \ 79 $(eol) 80 81## Test 1 82test1_CMD = \ 83 @ $(CLR) ./test1.exe < $(_srcdir)/test.in \ 84 $(eol) 85 86 87## we need a local copy of ANTLR_NET in this directory to be 88## able to execute tests! 89@antlr_net@ : @ANTLR_NET@ 90 @CP@ $< $@ 91 92%.txt : $(_srcdir)/%.txt 93 @ @CP@ $< $@ 94 95## *.g -> *.cs 96$(g_src_FILES) : $(g_src_DEPS) 97 @ @RMF@ $(g_src_FILES) 98 @ @ANTLR_COMPILE_CMD@ $(g_FILES) 99 @ $(dos2unix) $(g_src_FILES) 100 101## How to create test1 102$(test1_exe) : $(test1_exe_DEPS) 103 @ -@RMF@ $@ 104 @@CSHARP_COMPILE_CMD@ $@ $(test1_exe_FILES) 105 106## Tests 107test1 : $(test1_DEPS) 108 @ $(test1_CMD) 109 110### cleanup astsupport 111clean :: 112 @@ECHO@ cleaning $(subdir) ... 113 @ -@RMF@ .compile.st *.class $(g_gen_FILES) @antlr_net@ 114 @ -@RMF@ *.pyc *.tmp *TokenTypes.txt *TokenTypes *.exe 115 116 117 118### get configured dependencies - for example, just list 119### autoconf variable ANTLR_JAR as reference and it will 120### be done automatically as stddeps contains appropr. 121### rule. For details, checkout scripts/config.vars[.in] 122@stddeps@ 123 124.PHONY: compile 125.PHONY: test1 126.PHONY: test2