]> Pileus Git - ~andy/gtk/blob - docs/reference/gdk/Makefile.am
Add some missing files.
[~andy/gtk] / docs / reference / gdk / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 # The name of the module.
4 DOC_MODULE=gdk
5
6 # The top-level SGML file.
7 DOC_MAIN_SGML_FILE=gdk-docs.sgml
8
9 # The directory containing the source code. Relative to $(srcdir)
10 DOC_SOURCE_DIR=../../../gdk
11
12 # Extra options to supply to gtkdoc-scan
13 SCAN_OPTIONS=--deprecated-guards="GDK_ENABLE_BROKEN|GDK_DISABLE_DEPRECATED"
14
15 # Extra options to supply to gtkdoc-mkdb
16 MKDB_OPTIONS=--sgml-mode --output-format=xml
17
18 # Extra options to supply to gtkdoc-fixref
19 FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html
20
21 # Used for dependencies
22 HFILE_GLOB=$(top_srcdir)/gdk/*.h $(top_srcdir)/gdk/x11/gdkx.h
23 CFILE_GLOB=$(top_srcdir)/gdk/*.c
24
25 # Header files to ignore when scanning
26 IGNORE_HFILES=                  \
27         gdkintl.h               \
28         gdkmarshalers.h         \
29         gdkkeysyms.h            \
30         gdkinternals.h          \
31         gdkprivate.h            \
32         gdkpoly-generic.h       \
33         gdkregion-generic.h     \
34         linux-fb                \
35         nanox                   \
36         win32                   \
37         x11
38
39 # Extra files to add when scanning (relative to $srcdir)
40 EXTRA_HFILES=                   \
41         ../../../gdk/x11/gdkx.h 
42
43 # Images to copy into HTML directory
44 HTML_IMAGES =                           \
45         images/X_cursor.png             \
46         images/arrow.png                \
47         images/based_arrow_down.png     \
48         images/based_arrow_up.png       \
49         images/boat.png                 \
50         images/bogosity.png             \
51         images/bottom_left_corner.png   \
52         images/bottom_right_corner.png  \
53         images/bottom_side.png          \
54         images/bottom_tee.png           \
55         images/box_spiral.png           \
56         images/center_ptr.png           \
57         images/circle.png               \
58         images/clock.png                \
59         images/coffee_mug.png           \
60         images/cross.png                \
61         images/cross_reverse.png        \
62         images/crosshair.png            \
63         images/diamond_cross.png        \
64         images/dot.png                  \
65         images/dotbox.png               \
66         images/double_arrow.png         \
67         images/draft_large.png          \
68         images/draft_small.png          \
69         images/draped_box.png           \
70         images/exchange.png             \
71         images/fleur.png                \
72         images/gobbler.png              \
73         images/gumby.png                \
74         images/hand1.png                \
75         images/hand2.png                \
76         images/heart.png                \
77         images/icon.png                 \
78         images/iron_cross.png           \
79         images/left_ptr.png             \
80         images/left_side.png            \
81         images/left_tee.png             \
82         images/leftbutton.png           \
83         images/ll_angle.png             \
84         images/lr_angle.png             \
85         images/man.png                  \
86         images/middlebutton.png         \
87         images/mouse.png                \
88         images/pencil.png               \
89         images/pirate.png               \
90         images/plus.png                 \
91         images/question_arrow.png       \
92         images/right_ptr.png            \
93         images/right_side.png           \
94         images/right_tee.png            \
95         images/rightbutton.png          \
96         images/rtl_logo.png             \
97         images/sailboat.png             \
98         images/sb_down_arrow.png        \
99         images/sb_h_double_arrow.png    \
100         images/sb_left_arrow.png        \
101         images/sb_right_arrow.png       \
102         images/sb_up_arrow.png          \
103         images/sb_v_double_arrow.png    \
104         images/shuttle.png              \
105         images/sizing.png               \
106         images/spider.png               \
107         images/spraycan.png             \
108         images/star.png                 \
109         images/target.png               \
110         images/tcross.png               \
111         images/top_left_arrow.png       \
112         images/top_left_corner.png      \
113         images/top_right_corner.png     \
114         images/top_side.png             \
115         images/top_tee.png              \
116         images/trek.png                 \
117         images/ul_angle.png             \
118         images/umbrella.png             \
119         images/ur_angle.png             \
120         images/watch.png                \
121         images/xterm.png 
122
123 # Extra SGML files that are included by DOC_MAIN_SGML_FILE
124 content_files = multihead.sgml
125
126 # Other files to distribute
127 extra_files =
128
129 # CFLAGS and LDFLAGS for compiling scan program. Only needed
130 # if $(DOC_MODULE).types is non-empty.
131 GTKDOC_CFLAGS = @STRIP_BEGIN@                           \
132         @CFLAGS@                                        \
133         -I$(top_srcdir)                                 \
134         -I$(top_builddir)                               \
135         -I$(top_builddir)/gdk                           \
136         @GTK_DEBUG_FLAGS@                               \
137         @GDK_DEP_CFLAGS@                                \
138 @STRIP_END@
139
140 GTKDOC_LIBS = @STRIP_BEGIN@                                             \
141         $(top_builddir)/gdk/@gdktargetlib@                              \
142 @STRIP_END@
143
144 # Commands for compiling and linking 
145 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
146 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
147
148
149 ####################################
150 # Everything below here is generic #
151 ####################################
152
153 # We set GPATH here; this gives us semantics for GNU make
154 # which are more like other make's VPATH, when it comes to
155 # whether a source that is a target of one rule is then
156 # searched for in VPATH/GPATH.
157 #
158 GPATH = $(srcdir)
159
160 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
161
162 EXTRA_DIST =                            \
163         $(content_files)                \
164         $(extra_files)                  \
165         $(HTML_IMAGES)                  \
166         $(DOC_MAIN_SGML_FILE)           \
167         $(DOC_MODULE).types             \
168         $(DOC_MODULE)-sections.txt      \
169         $(DOC_MODULE)-overrides.txt
170
171 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
172            $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
173
174 SCANOBJ_FILES =                  \
175         $(DOC_MODULE).args       \
176         $(DOC_MODULE).hierarchy  \
177         $(DOC_MODULE).interfaces \
178         $(DOC_MODULE).signals
179
180 if ENABLE_GTK_DOC
181 all-local: html-build.stamp
182
183 #### scan ####
184
185 scan-build.stamp: $(HFILE_GLOB)
186         @echo '*** Scanning header files ***'
187         if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
188             CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
189         else \
190             cd $(srcdir) ; \
191             for i in $(SCANOBJ_FILES) ; do \
192                test -f $$i || touch $$i ; \
193             done \
194         fi
195         cd $(srcdir) && \
196           gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
197         touch scan-build.stamp
198
199 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
200         @true
201
202 #### templates ####
203
204 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
205         @echo '*** Rebuilding template files ***'
206         cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
207         touch tmpl-build.stamp
208
209 tmpl.stamp: tmpl-build.stamp
210         @true
211
212 #### sgml ####
213
214 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
215         @echo '*** Building SGML ***'
216         cd $(srcdir) && \
217         gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) $(MKDB_OPTIONS)
218         touch sgml-build.stamp
219
220 sgml.stamp: sgml-build.stamp
221         @true
222
223 #### html ####
224
225 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
226         @echo '*** Building HTML ***'
227         rm -rf $(srcdir)/html 
228         mkdir $(srcdir)/html
229         cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
230         test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
231         @echo '-- Fixing Crossreferences' 
232         cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
233         touch html-build.stamp
234 endif
235
236 ##############
237
238 clean-local:
239         rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
240
241 maintainer-clean-local: clean
242         cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
243
244 install-data-local:
245         $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
246         (installfiles=`echo $(srcdir)/html/*`; \
247         if test "$$installfiles" = '$(srcdir)/html/*'; \
248         then echo '-- Nothing to install' ; \
249         else \
250           for i in $$installfiles; do \
251             echo '-- Installing '$$i ; \
252             $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
253           done; \
254           echo '-- Installing $(srcdir)/html/index.sgml' ; \
255           $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
256         fi)
257
258 #
259 # Require gtk-doc when making dist
260 #
261 if ENABLE_GTK_DOC
262 dist-check-gtkdoc:
263 else
264 dist-check-gtkdoc:
265         @echo "*** gtk-doc must be installed and enabled in order to make dist"
266         @false
267 endif
268
269 dist-hook: dist-check-gtkdoc dist-hook-local
270         mkdir $(distdir)/tmpl
271         mkdir $(distdir)/xml
272         mkdir $(distdir)/html
273         -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
274         -cp $(srcdir)/xml/*.xml $(distdir)/xml
275         -cp $(srcdir)/html/* $(distdir)/html
276
277 .PHONY : dist-hook-local