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-docs.sgml
9 # The directory containing the source code. Relative to $(srcdir)
10 DOC_SOURCE_DIR=../../../gdk
12 # Extra options to supply to gtkdoc-scan
13 SCAN_OPTIONS=--deprecated-guards="GDK_ENABLE_BROKEN|GDK_DISABLE_DEPRECATED"
15 # Extra options to supply to gtkdoc-mkdb
18 # Extra options to supply to gtkdoc-fixref
19 FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html
21 # Used for dependencies
22 HFILE_GLOB=$(top_srcdir)/gdk/*.h $(top_srcdir)/gdk/x11/gdkx.h
23 CFILE_GLOB=$(top_srcdir)/gdk/*.c
25 # Header files to ignore when scanning
37 # Extra files to add when scanning (relative to $srcdir)
39 ../../../gdk/x11/gdkx.h
41 # Images to copy into HTML directory
44 # Extra SGML files that are included by DOC_MAIN_SGML_FILE
47 # Other files to distribute
50 # CFLAGS and LDFLAGS for compiling scan program. Only needed
51 # if $(DOC_MODULE).types is non-empty.
55 # Commands for compiling and linking
56 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
57 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
60 ####################################
61 # Everything below here is generic #
62 ####################################
64 # We set GPATH here; this gives us semantics for GNU make
65 # which are more like other make's VPATH, when it comes to
66 # whether a source that is a target of one rule is then
67 # searched for in VPATH/GPATH.
71 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
77 $(DOC_MAIN_SGML_FILE) \
79 $(DOC_MODULE)-sections.txt \
80 $(DOC_MODULE)-overrides.txt
82 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
83 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
87 $(DOC_MODULE).hierarchy \
91 all-local: html-build.stamp
95 scan-build.stamp: $(HFILE_GLOB)
96 @echo '*** Scanning header files ***'
97 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
98 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
101 for i in $(SCANOBJ_FILES) ; do \
102 test -f $$i || touch $$i ; \
106 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
107 touch scan-build.stamp
109 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
114 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
115 @echo '*** Rebuilding template files ***'
116 cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
117 touch tmpl-build.stamp
119 tmpl.stamp: tmpl-build.stamp
124 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB)
125 @echo '*** Building SGML ***'
127 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) $(MKDB_OPTIONS)
128 touch sgml-build.stamp
130 sgml.stamp: sgml-build.stamp
135 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
136 @echo '*** Building HTML ***'
137 test -d $(srcdir)/html || mkdir $(srcdir)/html
138 cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
139 test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
140 @echo '-- Fixing Crossreferences'
141 cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
142 touch html-build.stamp
148 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
150 maintainer-clean-local: clean
151 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
154 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
155 (installfiles=`echo $(srcdir)/html/*.html`; \
156 if test "$$installfiles" = '$(srcdir)/html/*.html'; \
157 then echo '-- Nothing to install' ; \
159 for i in $$installfiles; do \
160 echo '-- Installing '$$i ; \
161 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
163 echo '-- Installing $(srcdir)/html/index.sgml' ; \
164 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
168 # Require gtk-doc when making dist
174 @echo "*** gtk-doc must be installed and enabled in order to make dist"
178 dist-hook: dist-check-gtkdoc dist-hook-local
179 mkdir $(distdir)/tmpl
180 mkdir $(distdir)/sgml
181 mkdir $(distdir)/html
182 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
183 -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
184 cp $(srcdir)/html/index.sgml $(distdir)/html
185 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
187 images=$(HTML_IMAGES) ; \
188 for i in $$images ; do \
189 cp $(srcdir)/$$i $(distdir)/html ; \
192 .PHONY : dist-hook-local