* docs.make, Makefile.am: Build mono-file-formats{.tree,.zip},
[mono.git] / mcs / docs / Makefile
1 thisdir = docs
2 SUBDIRS = 
3 include ../build/rules.make
4
5 DISTFILES = \
6         clr-abi.txt                 \
7         compiler.txt                \
8         control-flow-analysis.txt   \
9         cs-errors.config            \
10         monodoc.xml                 \
11         new-anonymous-design.txt    \
12         order.txt                   \
13         $(DOC_SOURCE_FILES)         \
14         $(wildcard ecma334/*.xml)
15
16 DOC_SOURCE_FILES = \
17         lang-csharp.source          \
18         Mono.source                 \
19         netdocs.source              \
20         Novell.source               \
21         nunit-docs.source
22
23 ASSEMBLED_DOCS = \
24         cs-errors.tree cs-errors.zip      \
25         ecma334.tree ecma334.zip          \
26         Mono.tree Mono.zip                \
27         netdocs.tree netdocs.zip          \
28         Novell.tree Novell.zip            \
29         nunit-docs.tree nunit-docs.zip
30
31 MONODOC_SOURCES_INSTALL_FILES = \
32         $(ASSEMBLED_DOCS)             \
33         $(DOC_SOURCE_FILES)
34
35 CLEAN_FILES += $(ASSEMBLED_DOCS)
36
37 ifeq (net_2_0, $(PROFILE))
38 all-local: build-documentation
39 endif
40
41 all-local test-local run-test-local run-test-ondotnet-local doc-update:
42
43 clean-local:
44         -rm $(CLEAN_FILES)
45
46 dist-local: dist-default
47
48 MONODOC_INSTALL_DIR = $(DESTDIR)$(mono_libdir)/monodoc
49
50 install-local:
51         $(MKINSTALLDIRS) $(MONODOC_INSTALL_DIR) $(MONODOC_INSTALL_DIR)/sources
52         $(INSTALL_DATA) $(MONODOC_SOURCES_INSTALL_FILES) $(MONODOC_INSTALL_DIR)/sources
53         $(INSTALL_DATA) monodoc.xml $(MONODOC_INSTALL_DIR)
54
55 uninstall-local:
56         -rm -f $(MONODOC_INSTALL_DIR)/monodoc.xml
57         -rm -f $(addprefix $(MONODOC_INSTALL_DIR)/sources/,$(MONODOC_SOURCES_INSTALL_FILES))
58
59 NETDOCS_DIRS = \
60         $(topdir)/class/corlib/Documentation/en                       \
61         $(topdir)/class/System/Documentation/en                       \
62         $(topdir)/class/System.Core/Documentation/en                  \
63         $(topdir)/class/System.XML/Documentation/en                   \
64         $(topdir)/class/System.Web/Documentation/en                   \
65         $(topdir)/class/System.Web.Services/Documentation/en          \
66         $(topdir)/class/System.Data/Documentation/en                  \
67         $(topdir)/class/System.DirectoryServices/Documentation/en     \
68         $(topdir)/class/System.Drawing/Documentation/en               \
69         $(topdir)/class/System.Security/Documentation/en              \
70         $(topdir)/class/Microsoft.Build.Framework/Documentation/en    \
71         $(topdir)/class/Microsoft.Build.Engine/Documentation/en       \
72         $(topdir)/class/Microsoft.Build.Utilities/Documentation/en
73
74 MONO_DIRS = \
75         $(topdir)/class/Commons.Xml.Relaxng/Documentation/en          \
76         $(topdir)/class/Mono.Cairo/Documentation/en                   \
77         $(topdir)/class/Mono.Data.SqliteClient/Documentation/en       \
78         $(topdir)/class/Mono.GetOptions/Documentation/en              \
79         $(topdir)/class/Mono.Options/Documentation/en                 \
80         $(topdir)/class/Mono.Posix/Documentation/en                   \
81         $(topdir)/class/Mono.Security.Win32/Documentation/en          \
82         $(topdir)/class/Mono.Security/Documentation/en                \
83         $(topdir)/class/Mono.Simd/Documentation/en                    \
84         $(topdir)/tools/csharplib/en
85
86 NOVELL_DIRS = \
87         $(topdir)/class/Novell.Directory.Ldap/Documentation/en
88
89 NUNIT_DIRS = \
90         $(topdir)/nunit20/core/Documentation/en       \
91         $(topdir)/nunit20/framework/Documentation/en  \
92         $(topdir)/nunit20/mocks/Documentation/en      \
93         $(topdir)/nunit20/util/Documentation/en
94
95 build-documentation: $(ASSEMBLED_DOCS)
96
97 # To support `make -jN`, we can't mention multiple targets in the same rule;
98 # DO NOT DO THIS:
99 #
100 #         foo.tree foo.zip : Makefile
101 #     $(MDOC) assemble -o foo $(FOO_DIRS)
102 #
103 # If you do, make will try to biuld foo.tree & foo.zip concurrently, which
104 # breaks things badly... (read: "mdoc: sharing violation on path...foo.zip").
105 #
106 # The proper solution is to chain the rule dependencies so that only one file
107 # is the target of a rule.
108
109 netdocs.zip : netdocs.tree
110 netdocs.tree: Makefile
111         $(MDOC) assemble -o netdocs $(NETDOCS_DIRS)
112
113 Mono.zip : Mono.tree
114 Mono.tree: Makefile
115         $(MDOC) assemble -o Mono $(MONO_DIRS)
116
117 Novell.zip : Novell.tree
118 Novell.tree: Makefile
119         $(MDOC) assemble -o Novell $(NOVELL_DIRS)
120
121 nunit-docs.zip : nunit-docs.tree
122 nunit-docs.tree: Makefile
123         $(MDOC) assemble -o nunit-docs $(NUNIT_DIRS)
124
125 cs-errors.zip : cs-errors.tree
126 cs-errors.tree: cs-errors.config Makefile
127         $(MDOC) assemble -o cs-errors -f error $<
128
129 ecma334.zip : ecma334.tree
130 ecma334.tree: Makefile
131         $(MDOC) assemble -o ecma334 -f ecmaspec ecma334
132