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=$(DOC_MODULE)-docs.sgml
9 # The directory containing the source code. Relative to $(srcdir)
10 DOC_SOURCE_DIR=../../loudmouth
12 # Extra options to pass to gtkdoc-scangobj
15 # Extra options to supply to gtkdoc-scan
16 #SCAN_OPTIONS=--deprecated-guards="GTK_ENABLE_BROKEN|GTK_DISABLE_DEPRECATED"
18 # Extra options to supply to gtkdoc-mkdb
19 MKDB_OPTIONS=--sgml-mode --output-format=xml
21 # Extra options to supply to gtkdoc-fixref
22 #FIXXREF_OPTIONS=--extra-dir=../file-modules/html --extra-dir=../file-modules/html
24 # Used for dependencies
25 HFILE_GLOB=$(top_srcdir)/loudmouth/*.h
26 CFILE_GLOB=$(top_srcdir)/loudmouth/*.c
28 # Header files to ignore when scanning
29 IGNORE_HFILES= lm-internals.h lm-sha.h lm-parser.h loudmouth.h
31 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
34 # Other files to distribute
37 # CFLAGS and LDFLAGS for compiling scan program. Only needed
38 # if $(DOC_MODULE).types is non-empty.
43 -I$(top_builddir)/loudmouth
47 $(top_builddir)/loudmouth/libloudmouth.la
50 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
51 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
54 ####################################
55 # Everything below here is generic #
56 ####################################
58 # We set GPATH here; this gives us semantics for GNU make
59 # which are more like other make's VPATH, when it comes to
60 # whether a source that is a target of one rule is then
61 # searched for in VPATH/GPATH.
65 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
70 $(DOC_MAIN_SGML_FILE) \
72 $(DOC_MODULE)-sections.txt \
73 $(DOC_MODULE)-overrides.txt
75 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
76 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
80 $(DOC_MODULE).hierarchy \
81 $(DOC_MODULE).interfaces \
82 $(DOC_MODULE).prerequisites \
86 all-local: html-build.stamp
90 scan-build.stamp: $(HFILE_GLOB)
91 @echo '*** Scanning header files ***'
92 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
93 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
96 for i in $(SCANOBJ_FILES) ; do \
97 test -f $$i || touch $$i ; \
101 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
102 touch scan-build.stamp
104 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
109 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
110 @echo '*** Rebuilding template files ***'
111 cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
112 touch tmpl-build.stamp
114 tmpl.stamp: tmpl-build.stamp
119 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
120 @echo '*** Building SGML ***'
122 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) $(MKDB_OPTIONS)
123 touch sgml-build.stamp
125 sgml.stamp: sgml-build.stamp
130 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
131 @echo '*** Building HTML ***'
132 rm -rf $(srcdir)/html
134 cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
135 test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
136 @echo '-- Fixing Crossreferences'
137 cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
138 touch html-build.stamp
144 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
146 maintainer-clean-local: clean
147 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
151 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
152 (installfiles=`echo $(srcdir)/html/*`; \
153 if test "$$installfiles" = '$(srcdir)/html/*'; \
154 then echo '-- Nothing to install' ; \
156 for i in $$installfiles; do \
157 echo '-- Installing '$$i ; \
158 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
160 echo '-- Installing $(srcdir)/html/index.sgml' ; \
161 $(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
181 mkdir $(distdir)/html
182 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
183 -cp $(srcdir)/xml/*.xml $(distdir)/xml
184 -cp $(srcdir)/html/* $(distdir)/html
186 .PHONY : dist-hook-local