Merge pull request #495 from nicolas-raoul/fix-for-issue2907-with-no-formatting-changes
[mono.git] / mcs / tools / monkeydoc / Makefile
1 thisdir = tools/monkeydoc
2 SUBDIRS = 
3 include ../../build/rules.make
4
5 LIBRARY = monkeydoc.dll
6 LIBRARY_PACKAGE = monkeydoc
7 # Remove a bunch of "obsolete"-type warning for Lucene.NET
8 LOCAL_MCS_FLAGS = /nowarn:618,612,672,809
9
10 JAY_FLAGS = -ct
11
12 IMAGES = \
13         Resources/images/bc_bg.png              \
14         Resources/images/bc_separator.png       \
15         Resources/images/error.png              \
16         Resources/images/hatch.png              \
17         Resources/images/headerbg.png           \
18         Resources/images/help.png               \
19         Resources/images/house.png              \
20         Resources/images/members.png            \
21         Resources/images/namespace.png          \
22         Resources/images/privclass.png          \
23         Resources/images/privdelegate.png       \
24         Resources/images/privenumeration.png    \
25         Resources/images/privevent.png          \
26         Resources/images/privextension.png      \
27         Resources/images/privfield.png          \
28         Resources/images/privinterface.png      \
29         Resources/images/privmethod.png         \
30         Resources/images/privproperty.png       \
31         Resources/images/privstructure.png      \
32         Resources/images/protclass.png          \
33         Resources/images/protdelegate.png       \
34         Resources/images/protenumeration.png    \
35         Resources/images/protevent.png          \
36         Resources/images/protextension.png      \
37         Resources/images/protfield.png          \
38         Resources/images/protinterface.png      \
39         Resources/images/protmethod.png         \
40         Resources/images/protproperty.png       \
41         Resources/images/protstructure.png      \
42         Resources/images/pubclass.png           \
43         Resources/images/pubdelegate.png        \
44         Resources/images/pubenumeration.png     \
45         Resources/images/pubevent.png           \
46         Resources/images/pubextension.png       \
47         Resources/images/pubfield.png           \
48         Resources/images/pubinterface.png       \
49         Resources/images/pubmethod.png          \
50         Resources/images/pubproperty.png        \
51         Resources/images/pubstructure.png       \
52         Resources/images/reference.png          \
53         Resources/images/treebg.png             
54
55 IMAGE_RESOURCE_COMMAND = $(foreach file,$(IMAGES),/resource:$(file),$(notdir $(file)))
56
57 RESOURCE_FILES = \
58         ../../docs/monodoc.xml            \
59         Resources/base.css                \
60         Resources/ecmaspec-html-css.xsl   \
61         Resources/ecmaspec-html.xsl       \
62         Resources/ecmaspec.css            \
63         Resources/helper.js               \
64         Resources/home.html               \
65         Resources/Lminus.gif              \
66         Resources/Lplus.gif               \
67         Resources/mdoc-html-format.xsl    \
68         Resources/mdoc-html-utils.xsl     \
69         Resources/mdoc-sections-css.xsl   \
70         Resources/mdoc-sections.xsl       \
71         Resources/mono-ecma-css.xsl       \
72         Resources/mono-ecma-impl.xsl      \
73         Resources/mono-ecma.css           \
74         Resources/mono-ecma.xsl                 \
75         Resources/toc-html.xsl           \
76         $(IMAGES)
77
78 EXTRA_DISTFILES = \
79         monkeydoc.dll.config.in   \
80         $(RESOURCE_FILES)
81
82 LIB_MCS_FLAGS = \
83         /unsafe                                                           \
84         /codepage:utf8                                                    \
85         /nowarn:169,164,162,168,219,618,612                               \
86         /r:Commons.Xml.Relaxng                                            \
87         /resource:../../docs/monodoc.xml,monodoc.xml                      \
88         /resource:Resources/base.css,base.css                             \
89         /resource:Resources/ecmaspec-html-css.xsl,ecmaspec-html-css.xsl   \
90         /resource:Resources/ecmaspec-html.xsl,ecmaspec-html.xsl           \
91         /resource:Resources/ecmaspec.css,ecmaspec.css                     \
92         /resource:Resources/helper.js,helper.js                           \
93         /resource:Resources/home.html,home.html                           \
94         /resource:Resources/Lminus.gif,Lminus.gif                         \
95         /resource:Resources/Lplus.gif,Lplus.gif                           \
96         /resource:Resources/mdoc-html-format.xsl,mdoc-html-format.xsl     \
97         /resource:Resources/mdoc-html-utils.xsl,mdoc-html-utils.xsl       \
98         /resource:Resources/mdoc-sections-css.xsl,mdoc-sections-css.xsl   \
99         /resource:Resources/mdoc-sections.xsl,mdoc-sections.xsl           \
100         /resource:Resources/mono-ecma-css.xsl,mono-ecma-css.xsl           \
101         /resource:Resources/mono-ecma-impl.xsl,mono-ecma-impl.xsl         \
102         /resource:Resources/mono-ecma.css,mono-ecma.css                   \
103         /resource:Resources/mono-ecma.xsl,mono-ecma.xsl                   \
104         /resource:Resources/toc-html.xsl,toc-html.xsl                     \
105         $(IMAGE_RESOURCE_COMMAND)                                                             \
106         /r:ICSharpCode.SharpZipLib                                        \
107         /r:$(corlib)                                                      \
108         /r:System.dll                                                     \
109         /r:System.Core.dll                                                \
110         /r:System.Xml.dll                                                 \
111         /r:System.Xml.Linq.dll                                            \
112         /r:System.Configuration.dll
113
114 TEST_MCS_FLAGS = /r:System.Core.dll
115
116 DOC_SOURCE_DIRS = \
117         ../../docs \
118         ../../../docs
119
120 DOC_SOURCES = $(foreach dir,$(DOC_SOURCE_DIRS),$(wildcard $(dir)/*.source $(dir)/*.tree $(dir)/*.zip))
121
122 include ../../build/library.make
123
124 $(the_lib): Makefile $(RESOURCE_FILES)
125
126 all-local: $(the_lib).config Monkeydoc.Ecma/EcmaUrlParser.cs
127
128 test-local: setup-doc-sources
129
130 $(the_lib).config: Makefile
131         sed 's,@monodoc_refdir@,$(mono_libdir)/monodoc,g' monkeydoc.dll.config.in > $@
132
133 Monkeydoc.Ecma/EcmaUrlParser.cs: Monkeydoc.Ecma/EcmaUrlParser.jay $(topdir)/jay/skeleton.cs
134         $(topdir)/jay/jay $(JAY_FLAGS) < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
135
136 parser.exe: Monkeydoc.Ecma/EcmaUrlParser.cs Monkeydoc.Ecma/EcmaUrlTokenizer.cs Monkeydoc.Ecma/EcmaUrlParserDriver.cs Monkeydoc.Ecma/EcmaDesc.cs
137         mcs /out:$@ /debug $^
138
139 setup-doc-sources: $(DOC_SOURCES)
140         mkdir -p ./Test/monodoc/sources/
141         cp $(DOC_SOURCES) ./Test/monodoc/sources/