1 | ##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
---|
2 | @stdvars@ |
---|
3 | ##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
---|
4 | |
---|
5 | ## do not change this value |
---|
6 | subdir=lib/csharp/antlr.astframe |
---|
7 | |
---|
8 | all :: lib |
---|
9 | |
---|
10 | lib: @astframe_net@ |
---|
11 | |
---|
12 | ## Get all files in directory. |
---|
13 | antlr_cs_FILES = $(shell @FIND@ $(_srcdir) -name \*.cs) |
---|
14 | |
---|
15 | |
---|
16 | ## Next rule is about to compile antlr.astframe.dll. The whole |
---|
17 | ## rule looks bit complicated. |
---|
18 | ## - First we remove the target. Later we check then wether the |
---|
19 | ## target has really been created. Due to experience we don't |
---|
20 | ## trust our tool's exit code. |
---|
21 | ## - Our target depends on antlr.runtime.dll and so we need to |
---|
22 | ## add (+) it via appropriate environment variable CSHARPCFLAGS. |
---|
23 | ## - Then we check whether target really has been made. |
---|
24 | ## - Finally we make sure to update ASTFRAME_NET. ASTFRAME_NET |
---|
25 | ## may point anywhere in the filesystem, especially also in this |
---|
26 | ## directory. We can't therefore remove ASTFRAME_NET as astframe_ |
---|
27 | ## net and ASTFRAME_NET can be identical. To avoid this we make |
---|
28 | ## a copy of astframe_net which dies not clash with ASTFRAME_NET |
---|
29 | ## by adding the process id to the filename. Finally we copy |
---|
30 | ## and remove temporaries. |
---|
31 | @astframe_net@ : $(antlr_cs_FILES) @ANTLR_NET@ |
---|
32 | @-@RMF@ $@ |
---|
33 | @ @CSHARP_COMPILE_CMD@ $@ $(antlr_cs_FILES) |
---|
34 | @test -f $@ || exit 1 |
---|
35 | @ @CP@ $@ $@.$$$$ && @RMF@ @ASTFRAME_NET@ ; \ |
---|
36 | @CP@ $@.$$$$ @ASTFRAME_NET@ ; \ |
---|
37 | @CP@ @ASTFRAME_NET@ $@ ; \ |
---|
38 | @RMF@ $@.$$$$ |
---|
39 | |
---|
40 | clean :: |
---|
41 | @RMF@ *.obj *.o *.a *.lib *.so *.dll *~ @astframe_net@ @ASTFRAME_NET@ |
---|
42 | |
---|
43 | distclean :: clean |
---|
44 | @RMF@ Makefile |
---|
45 | |
---|
46 | ## install our target .. |
---|
47 | install :: @ASTFRAME_NET@ |
---|
48 | @$(MKDIR) -p "$(libdir)" |
---|
49 | @@ECHO@ "install C# core files .. " |
---|
50 | @for f in @ASTFRAME_NET@ ; do \ |
---|
51 | @ECHO@ "install $${f}" ; \ |
---|
52 | if test -f "$${f}" ; then \ |
---|
53 | $(INSTALL) -m 444 "$${f}" "$(libdir)" ; \ |
---|
54 | $(INSTALL) -m 444 "$${f}" "$(datadir)/$(versioneddir)" ; \ |
---|
55 | fi ;\ |
---|
56 | done |
---|
57 | |
---|
58 | ## dependencies |
---|
59 | @astframe_net@ : Makefile |
---|
60 | @astframe_net@ : @abs_this_builddir@/scripts/csc.sh |
---|
61 | |
---|
62 | ## other dependencies to be listed below |
---|
63 | @stddeps@ |
---|