Fix ignored headers.
[shishi.git] / doc / reference / Makefile.am
blobf1bc1e46d112018949e44b3b73685a882f9d8964
1 ## Process this file with automake to produce Makefile.in
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.
8 # The name of the module, e.g. 'glib'.
9 DOC_MODULE=shishi
11 # The top-level SGML file. Change it if you want.
12 DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
14 # The directory containing the source code. Relative to $(srcdir).
15 # gtk-doc will search all .c & .h files beneath here for inline comments
16 # documenting functions and macros.
17 DOC_SOURCE_DIR=../../lib
19 # Extra options to pass to gtkdoc-scanobj or gtkdoc-scangobj.
20 SCANOBJ_OPTIONS=
22 # Extra options to supply to gtkdoc-scan.
23 SCAN_OPTIONS=
25 # Extra options to supply to gtkdoc-mkdb.
26 MKDB_OPTIONS=
28 # Extra options to supply to gtkdoc-fixref.
29 FIXXREF_OPTIONS=
31 # Used for dependencies.
32 HFILE_GLOB=$(top_srcdir)/lib/*.h
33 CFILE_GLOB=$(top_srcdir)/lib/*.c
35 # Header files to ignore when scanning.
36 IGNORE_HFILES=internal.h crypto.h shishi-int.h
38 # Images to copy into HTML directory.
39 HTML_IMAGES =
41 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
42 content_files =
44 # Other files to distribute.
45 extra_files =
47 # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
48 # contains GtkObjects/GObjects and you want to document signals and properties.
49 GTKDOC_CFLAGS =
50 GTKDOC_LIBS =
52 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
53 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
55 # If you need to override some of the declarations, place them in the
56 # $(DOC_MODULE)-overrides.txt file and uncomment the second line here.
57 DOC_OVERRIDES =
58 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
62 ###########################################################################
63 # Everything below here is generic and you shouldn't need to change it.
64 ###########################################################################
66 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
68 EXTRA_DIST =                            \
69         $(content_files)                \
70         $(extra_files)                  \
71         $(HTML_IMAGES)                  \
72         $(DOC_MAIN_SGML_FILE)           \
73         $(DOC_MODULE).types             \
74         $(DOC_MODULE)-sections.txt      \
75         $(DOC_OVERRIDES)
77 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
78            $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
80 SCANOBJ_FILES =                 \
81         $(DOC_MODULE).args      \
82         $(DOC_MODULE).hierarchy \
83         $(DOC_MODULE).signals
85 if ENABLE_GTK_DOC
86 all-local: html-build.stamp
88 #### scan ####
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-scanobj $(SCANOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
94         else \
95             cd $(srcdir) ; \
96             for i in $(SCANOBJ_FILES) ; do \
97                test -f $$i || touch $$i ; \
98             done \
99         fi
100         cd $(srcdir) && \
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
105         @true
107 #### templates ####
109 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
110         @echo '*** Rebuilding template files ***'
111         cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
112         touch tmpl-build.stamp
114 tmpl.stamp: tmpl-build.stamp
115         @true
117 #### sgml ####
119 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
120         @echo '*** Building SGML ***'
121         cd $(srcdir) && \
122         gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
123         touch sgml-build.stamp
125 sgml.stamp: sgml-build.stamp
126         @true
128 #### html ####
130 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
131         @echo '*** Building HTML ***'
132         test -d $(srcdir)/html || mkdir $(srcdir)/html
133         cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
134         test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
135         @echo '-- Fixing Crossreferences' 
136         cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
137         touch html-build.stamp
138 else
139 all-local:
140 endif
142 ##############
144 clean-local:
145         rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
147 maintainer-clean-local: clean
148         cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
149         cd $(srcdir) && rm -f shishi-sections.txt shishi-undocumented.txt shishi.types
150         cd $(srcdir) && rm -f tmpl/shishi*
152 install-data-local:
153         $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
154         (installfiles=`echo $(srcdir)/html/*.html`; \
155         if test "$$installfiles" = '$(srcdir)/html/*.html'; \
156         then echo '-- Nothing to install' ; \
157         else \
158           for i in $$installfiles; do \
159             echo '-- Installing '$$i ; \
160             $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
161           done; \
162           echo '-- Installing $(srcdir)/html/index.sgml' ; \
163           $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
164         fi)
166 ##############
168 uninstall-local:
169         (uninstallfiles=`cd $(srcdir)/html/; echo *.html`; \
170         if test "$$uninstallfiles" = '*.html'; \
171         then echo '-- Nothing to uninstall' ; \
172         else \
173           for i in $$uninstallfiles; do \
174             echo '-- Uninstalling '$$i ; \
175             rm -f $(DESTDIR)$(TARGET_DIR)/$$i; \
176           done; \
177           echo '-- Uninstalling $(srcdir)/html/index.sgml' ; \
178           rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml; \
179           echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)' ; \
180           test ! -d $(DESTDIR)$(TARGET_DIR) || rmdir $(DESTDIR)$(TARGET_DIR); \
181         fi)
184 # Require gtk-doc when making dist
186 if ENABLE_GTK_DOC
187 dist-check-gtkdoc:
188 else
189 dist-check-gtkdoc:
190         @echo "*** gtk-doc must be installed and enabled in order to make dist"
191         -@false
192 endif
194 dist-hook: dist-check-gtkdoc dist-hook-local
195         mkdir $(distdir)/tmpl
196         mkdir $(distdir)/sgml
197         mkdir $(distdir)/html
198         -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
199         -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
200         -cp $(srcdir)/html/index.sgml $(distdir)/html
201         -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
203         images=$(HTML_IMAGES) ;               \
204         for i in $$images ; do                \
205           cp $(srcdir)/$$i $(distdir)/html ;  \
206         done
208 .PHONY : dist-hook-local