Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update
[simgrid.git] / cruft / doc / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 # This is a blank Makefile.am for using gtk-doc.
4 # Copy this to your project's API docs directory and modify the variables to
5 # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
6 # of using the various options.
7
8 # The name of the module, e.g. 'glib'.
9 DOC_MODULE=gras
10 HTML_DIR=/usr/share/doc/gras/html
11
12 # The top-level SGML file. Change it if you want.
13 DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
14
15 # The directory containing the source code. Relative to $(srcdir).
16 # gtk-doc will search all .c & .h files beneath here for inline comments
17 # documenting functions and macros.
18 DOC_SOURCE_DIR=../src
19
20 # Extra options to pass to gtkdoc-scanobj or gtkdoc-scangobj.
21 SCANOBJ_OPTIONS=
22
23 # Extra options to supply to gtkdoc-scan.
24 SCAN_OPTIONS=
25
26 # Extra options to supply to gtkdoc-mkdb.
27 MKDB_OPTIONS=--sgml-mode --ignore-files="ddt_parse.yy.c"
28
29 # Extra options to supply to gtkdoc-fixref.
30 FIXXREF_OPTIONS=
31
32 # Used for dependencies.
33 HFILE_GLOB=$(shell find $(top_srcdir)/src -name "*.h")
34 CFILE_GLOB=$(shell find $(top_srcdir)/src -name "*.c"|grep -v ddt_parse.yy.c)
35 #CFILE_GLOB=$(top_srcdir)/src/core/*.c
36
37 # Header files to ignore when scanning.
38 IGNORE_HFILES=ddt_parse.yy.h
39
40 # Images to copy into HTML directory.
41 HTML_IMAGES =
42
43 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
44 content_files = overview.sgml
45
46 # Other files to distribute.
47 extra_files =
48
49 # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
50 # contains GtkObjects/GObjects and you want to document signals and properties.
51 GTKDOC_CFLAGS =
52 GTKDOC_LIBS =
53
54 #GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
55 #GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
56
57 # If you need to override some of the declarations, place them in the
58 # $(DOC_MODULE)-overrides.txt file and uncomment the second line here.
59 DOC_OVERRIDES =
60 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
61
62
63
64 ###########################################################################
65 # Everything below here is generic and you shouldn't need to change it.
66 ###########################################################################
67
68 TARGET_DIR=$(HTML_DIR)
69
70 EXTRA_DIST =                            \
71         $(content_files)                \
72         $(extra_files)                  \
73         $(HTML_IMAGES)                  \
74         $(DOC_MAIN_SGML_FILE)           \
75         $(DOC_MODULE)-sections.txt      \
76         $(DOC_OVERRIDES)
77
78 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
79            $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
80
81 SCANOBJ_FILES =                  \
82         $(DOC_MODULE).args       \
83         $(DOC_MODULE).hierarchy  \
84         $(DOC_MODULE).interfaces \
85         $(DOC_MODULE).prerequisites \
86         $(DOC_MODULE).signals
87
88 if ENABLE_GTK_DOC
89 all-local: html-build.stamp
90
91 TOOL_ROOT=$(shell if [ -e tools/gtkdoc-scan ] ; then echo "tools/"; else echo "" fi)
92 #### scan ####
93
94 scan-build.stamp: $(HFILE_GLOB)
95         @echo '*** Scanning header files ***'
96         cd $(srcdir) && \
97           $(TOOL_ROOT)gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
98         touch scan-build.stamp
99
100 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
101         @true
102
103 #### templates ####
104
105 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
106         @echo '*** Rebuilding template files ***'
107         cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
108         touch tmpl-build.stamp
109
110 tmpl.stamp: tmpl-build.stamp
111         @true
112
113 #### sgml ####
114
115 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
116         @echo '*** Building SGML ***'
117         cd $(srcdir) && \
118         $(TOOL_ROOT)gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
119         touch sgml-build.stamp
120
121 sgml.stamp: sgml-build.stamp
122         @true
123
124 #### html ####
125
126 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
127         @echo '*** Building HTML ***'
128         test -d $(srcdir)/html || mkdir $(srcdir)/html
129         cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
130         test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
131         @echo '-- Fixing Crossreferences' 
132         cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
133         touch html-build.stamp
134 else
135 all-local: 
136 endif
137
138 ##############
139
140 clean-local:
141         rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
142
143 maintainer-clean-local: clean
144         cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
145
146 install-data-local:
147         $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
148         (installfiles=`echo $(srcdir)/html/*.html`; \
149         if test "$$installfiles" = '$(srcdir)/html/*.html'; \
150         then echo '-- Nothing to install' ; \
151         else \
152           for i in $$installfiles; do \
153             echo '-- Installing '$$i ; \
154             $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
155           done; \
156           echo '-- Installing $(srcdir)/html/index.sgml' ; \
157           $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
158         fi)
159
160 #
161 # Require gtk-doc when making dist
162 #
163 if ENABLE_GTK_DOC
164 dist-check-gtkdoc:
165 else
166 dist-check-gtkdoc:
167         @echo "*** gtk-doc must be installed and enabled in order to make dist"
168         @false
169 endif
170
171 dist-hook: dist-check-gtkdoc dist-hook-local
172         mkdir $(distdir)/tmpl
173         mkdir $(distdir)/sgml
174         mkdir $(distdir)/html
175         -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
176         -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
177         -cp $(srcdir)/html/index.sgml $(distdir)/html
178         -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
179
180         images=$(HTML_IMAGES) ;               \
181         for i in $$images ; do                \
182           cp $(srcdir)/$$i $(distdir)/html ;  \
183         done
184
185 .PHONY : dist-hook-local