## Process this file with automake to produce Makefile.in # The name of the module, e.g. 'glib'. DOC_MODULE=dc-common # When generating XML IDs, prefix every ID starting with $(SYMBOL_PREFIX) # with $(ID_PREFIX) SYMBOL_PREFIX= ID_PREFIX= # The top-level SGML file. You can change this if you want to. DOC_MAIN_SGML_FILE=../dc-docs.xml # The directory containing the source code. Relative to $(srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting the functions and macros. DOC_SOURCE_DIR=../../include # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" SCAN_OPTIONS= # Extra options to supply to gtkdoc-mkdb. # e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml MKDB_OPTIONS=--sgml-mode --output-format=xml # Extra options to supply to gtkdoc-mktmpl # e.g. MKTMPL_OPTIONS=--only-section-tmpl MKTMPL_OPTIONS= # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB=../../include/dc_common.h CFILE_GLOB= # Header files to ignore when scanning. # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h IGNORE_HFILES=config.h dc.h dc_client.h # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml content_files= # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded # These files must be listed here *and* in content_files # e.g. expand_content_files=running.sgml expand_content_files= # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) INCLUDES= GTKDOC_LIBS= #################################### # Everything below here is generic # #################################### if GTK_DOC_USE_LIBTOOL GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) else GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) endif # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) EXTRA_DIST = \ $(content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp \ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp CLEANFILES = $(DOC_MODULE)-unused.txt $(DOC_STAMPS) if ENABLE_GTK_DOC all-local: sgml.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo 'gtk-doc: Scanning header files' @-chmod -R u+w $(srcdir) cd $(srcdir) ; \ cd $(srcdir) && \ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) touch scan-build.stamp $(DOC_MODULE)-decl.txt: scan-build.stamp @true #### templates #### tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo 'gtk-doc: Rebuilding template files' @-chmod -R u+w $(srcdir) cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true #### xml #### sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml $(expand_content_files) @echo 'gtk-doc: Building XML' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) for i in $(srcdir)/xml/*.xml; do \ sed -e 's/id="$(SYMBOL_PREFIX)/id="$(ID_PREFIX)$(SYMBOL_PREFIX)/' \ -e 's/linkend="$(SYMBOL_PREFIX)/linkend="$(ID_PREFIX)$(SYMBOL_PREFIX)/' "$$i" > "$$i.tmp"; \ mv -f "$$i.tmp" "$$i"; \ done touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true else all-local: endif ############## clean-local: rm -f *~ *.bak rm -rf .libs maintainer-clean-local: clean cd $(srcdir) && rm -rf xml $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt # # Require gtk-doc when making dist # if ENABLE_GTK_DOC dist-check-gtkdoc: else dist-check-gtkdoc: @echo "*** gtk-doc must be installed and enabled in order to make dist" @false endif dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/tmpl mkdir $(distdir)/xml -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl -cp $(srcdir)/xml/*.xml $(distdir)/xml if test -f $(srcdir)/$(DOC_MODULE).types; then \ cp $(srcdir)/$(DOC_MODULE).types $(distdir)/$(DOC_MODULE).types; \ fi .PHONY : dist-hook-local