1 ## Process this file with automake to produce Makefile.in
3 # The name of the module.
6 # The top-level SGML file.
7 DOC_MAIN_SGML_FILE=gdk-pixbuf.sgml
9 # The directory containing the source code. Relative to $(srcdir)
10 DOC_SOURCE_DIR=../../../gdk-pixbuf
12 # Extra options to supply to gtkdoc-scan
13 SCAN_OPTIONS=--source-dir=../../../contrib/gdk-pixbuf-xlib --deprecated-guards="GDK_PIXBUF_ENABLE_BROKEN|GDK_PIXBUF_DISABLE_DEPRECATED"
15 # Extra options to supply to gtkdoc-mkdb
16 MKDB_OPTIONS=--sgml-mode --source-dir=../../../contrib/gdk-pixbuf-xlib
18 # Extra options to supply to gtkdoc-fixref
21 # Used for dependencies
22 HFILE_GLOB=$(top_srcdir)/gdk-pixbuf/*.h $(top_srcdir)/contrib/gdk-pixbuf-xlib/*.h
23 CFILE_GLOB=$(top_srcdir)/gdk-pixbuf/*.c $(top_srcdir)/contrib/gdk-pixbuf-xlib/*.c
25 # Header files to ignore when scanning
28 gdk-pixbuf-marshal.h \
29 gdk-pixbuf-xlib-private.h \
31 gdk-pixbuf-private.h \
35 # Extra files to add when scanning
38 # Images to copy into HTML directory
41 # Extra SGML files that are included by DOC_MAIN_SGML_FILE
44 porting-from-imlib.sgml
46 # Other files to distribute
49 # CFLAGS and LDFLAGS for compiling scan program. Only needed
50 # if $(DOC_MODULE).types is non-empty.
51 GTKDOC_CFLAGS = @STRIP_BEGIN@ \
55 -I$(top_builddir)/gdk \
60 GTKDOC_LIBS = @STRIP_BEGIN@ \
61 $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la \
62 $(top_builddir)/gdk/@gdktargetlib@ \
63 $(top_builddir)/gtk/@gtktargetlib@ \
67 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
68 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
71 ####################################
72 # Everything below here is generic #
73 ####################################
75 # We set GPATH here; this gives us semantics for GNU make
76 # which are more like other make's VPATH, when it comes to
77 # whether a source that is a target of one rule is then
78 # searched for in VPATH/GPATH.
82 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
88 $(DOC_MAIN_SGML_FILE) \
90 $(DOC_MODULE)-sections.txt \
91 $(DOC_MODULE)-overrides.txt
93 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
94 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
98 $(DOC_MODULE).hierarchy \
102 all-local: html-build.stamp
106 scan-build.stamp: $(HFILE_GLOB)
107 @echo '*** Scanning header files ***'
108 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
109 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
112 for i in $(SCANOBJ_FILES) ; do \
113 test -f $$i || touch $$i ; \
117 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
118 touch scan-build.stamp
120 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
125 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
126 @echo '*** Rebuilding template files ***'
127 cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
128 touch tmpl-build.stamp
130 tmpl.stamp: tmpl-build.stamp
135 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
136 @echo '*** Building SGML ***'
138 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) $(MKDB_OPTIONS)
139 touch sgml-build.stamp
141 sgml.stamp: sgml-build.stamp
146 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
147 @echo '*** Building HTML ***'
148 rm -rf $(srcdir)/html
150 cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
151 test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
152 @echo '-- Fixing Crossreferences'
153 cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
154 touch html-build.stamp
160 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
162 maintainer-clean-local: clean
163 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
166 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
167 (installfiles=`echo $(srcdir)/html/*`; \
168 if test "$$installfiles" = '$(srcdir)/html/*'; \
169 then echo '-- Nothing to install' ; \
171 for i in $$installfiles; do \
172 echo '-- Installing '$$i ; \
173 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
175 echo '-- Installing $(srcdir)/html/index.sgml' ; \
176 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
180 # Require gtk-doc when making dist
186 @echo "*** gtk-doc must be installed and enabled in order to make dist"
190 dist-hook: dist-check-gtkdoc dist-hook-local
191 mkdir $(distdir)/tmpl
192 mkdir $(distdir)/sgml
193 mkdir $(distdir)/html
194 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
195 -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
196 -cp $(srcdir)/html/* $(distdir)/html
198 .PHONY : dist-hook-local