diff options
-rw-r--r-- | Makefile.am | 8 | ||||
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | README | 5 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | doc/design-2.x.txt | 9 | ||||
-rw-r--r-- | gtk-doc.make | 35 | ||||
-rw-r--r-- | gtk-doc.notmpl.make | 299 | ||||
-rwxr-xr-x | gtkdoc-mkdb.in | 8 | ||||
-rwxr-xr-x | gtkdoc-mktmpl.in | 1274 | ||||
-rw-r--r-- | gtkdocize.in | 10 | ||||
-rw-r--r-- | help/manual/C/README | 4 | ||||
-rw-r--r-- | help/manual/C/index.docbook | 57 | ||||
-rw-r--r-- | tests/annotations/docs/Makefile.am | 6 | ||||
-rw-r--r-- | tests/bugs/docs/Makefile.am | 6 | ||||
-rw-r--r-- | tests/empty/docs/Makefile.am | 6 | ||||
-rw-r--r-- | tests/fail/docs/Makefile.am | 5 | ||||
-rw-r--r-- | tests/gobject/docs/Makefile.am | 6 | ||||
-rw-r--r-- | tests/gtk-doc.make (renamed from tests/gtk-doc.notmpl.make) | 1 | ||||
-rw-r--r-- | tests/program/docs/Makefile.am | 6 | ||||
-rw-r--r-- | tests/tools.sh.in | 2 |
20 files changed, 39 insertions, 1711 deletions
diff --git a/Makefile.am b/Makefile.am index cadb286..03641be 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,7 +10,6 @@ bin_SCRIPTS = \ gtkdoc-mkhtml \ gtkdoc-mkman \ gtkdoc-mkpdf \ - gtkdoc-mktmpl \ gtkdoc-rebase \ gtkdoc-scan \ gtkdoc-scangobj \ @@ -31,9 +30,7 @@ gtkdocdata_DATA = \ devhelp2.xsd \ devhelp2.xsl \ gtk-doc.make \ - gtk-doc.notmpl.make \ gtk-doc.flat.make \ - gtk-doc.notmpl-flat.make \ style/home.png \ style/left.png \ style/left-insensitive.png \ @@ -55,9 +52,6 @@ sgml_DATA = gtk-doc.cat gtk-doc.flat.make: gtk-doc.make @$(SED) -e "s/EXTRA_DIST =/EXTRA_DIST +=/" $< >$@ -gtk-doc.notmpl-flat.make: gtk-doc.notmpl.make - @$(SED) -e "s/EXTRA_DIST =/EXTRA_DIST +=/" $< >$@ - EXTRA_DIST = \ MAINTAINERS \ $(gtkdocdata_DATA) \ @@ -85,7 +79,6 @@ EXTRA_DIST = \ CLEANFILES = \ gtk-doc.flat.make \ - gtk-doc.notmpl-flat.make \ gtkdoc-depscanc DISTCLEANFILES = \ @@ -100,7 +93,6 @@ DISTCLEANFILES = \ gtkdoc-mkhtml \ gtkdoc-mkman \ gtkdoc-mkpdf \ - gtkdoc-mktmpl \ gtk-doc.pc \ gtkdoc-rebase \ gtkdoc-scangobj \ @@ -1,6 +1,8 @@ GTK-Doc 1.25.1 (... .. ....) ============== +Remove tmpl support (gtkdoc-mktmpl). + GTK-Doc 1.25 (Mar 21 2016) ============== @@ -25,9 +25,8 @@ The generated HTML documentation can be browsed in an ordinary web browser or by using the special Devhelp API browser (see http://developer.imendio.com/wiki/Devhelp). -Please don't use template files in new projects. Support for for those will -be removed at some point in the future (together with gtkdoc-mktmpl). Please -also use DoxBook XML instead of DocBook SGML. +Please use DoxBook XML instead of DocBook SGML - support for the later will be +dropped. Requirements ============ diff --git a/configure.ac b/configure.ac index 29238be..1c0db4c 100644 --- a/configure.ac +++ b/configure.ac @@ -274,7 +274,6 @@ AC_CONFIG_FILES([gtkdoc-mkdb], [chmod +x gtkdoc-mkdb]) AC_CONFIG_FILES([gtkdoc-mkhtml], [chmod +x gtkdoc-mkhtml]) AC_CONFIG_FILES([gtkdoc-mkman], [chmod +x gtkdoc-mkman]) AC_CONFIG_FILES([gtkdoc-mkpdf], [chmod +x gtkdoc-mkpdf]) -AC_CONFIG_FILES([gtkdoc-mktmpl], [chmod +x gtkdoc-mktmpl]) AC_CONFIG_FILES([gtkdoc-rebase], [chmod +x gtkdoc-rebase]) AC_CONFIG_FILES([gtkdoc-scan], [chmod +x gtkdoc-scan]) AC_CONFIG_FILES([gtkdoc-scangobj], [chmod +x gtkdoc-scangobj]) diff --git a/doc/design-2.x.txt b/doc/design-2.x.txt index 572c8b5..7c0d319 100644 --- a/doc/design-2.x.txt +++ b/doc/design-2.x.txt @@ -7,7 +7,6 @@ Its not about Gtk. Its about C APIs with GObject support. g-doc, gapi-doc, gnome-api-doc, ... == remove and deprecate = -- get rid of anything related to tmpl (gtkdoc-mktmpl, the makefile rules, ..) - get rid of sgml, we will only use docbook xml - rename generated index.sgml to something like index.idx - it is not wellformed sgml @@ -19,7 +18,7 @@ g-doc, gapi-doc, gnome-api-doc, ... === proper xml-id namesspaces === We need proper xml-id namesspaces for document structure and symbols to avoid clashes e.g. between GtkWidget as a section and as a struct. Normal symbols -should only be mangled to be a valid xml-id. Document structure ids should +should only be mangled to be a valid xml-id. Document structure ids should contain a prefix. These are the rules regarding id-attributes: @@ -33,10 +32,10 @@ http://www.w3.org/TR/xml-id/#id-avn "Attributes of type ID are subject to additional normalization rules: removing leading and trailing space characters and replacing sequences of spaces with a single space." - + http://www.w3.org/TR/xml11/#NT-Name http://www.w3.org/TR/REC-xml/#NT-Name - + So we could easily use "DOC:" as a prefix for document structure ids. In 1.x we add :CAPS as a suffix to avoid clashes between lower and uppercase constructs. XML-IDs are not case insensitive, so we don't need that. @@ -49,7 +48,7 @@ If the ID contain a ':' xml processors belive it is using a namespace. - we could have a "Section:" tag for non-section comments to add them to a non default section - we could have a "Private_Symbols:" tag in section to list symbols that - should be in private subsection + should be in private subsection - the $module.types file need manual maintenance if one need special includes - can we make the scanner smarter? diff --git a/gtk-doc.make b/gtk-doc.make index b091d88..5709b54 100644 --- a/gtk-doc.make +++ b/gtk-doc.make @@ -34,9 +34,9 @@ EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) -DOC_STAMPS=setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ +DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ - tmpl.stamp sgml.stamp html.stamp pdf.stamp + sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ @@ -96,9 +96,6 @@ setup-build.stamp: cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ - test -d $(abs_srcdir)/tmpl && \ - { cp -pR $(abs_srcdir)/tmpl $(abs_builddir)/; \ - chmod -R u+w $(abs_builddir)/tmpl; } \ fi $(AM_V_at)touch setup-build.stamp @@ -138,35 +135,14 @@ scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true -#### templates #### - -GTK_DOC_V_TMPL=$(GTK_DOC_V_TMPL_$(V)) -GTK_DOC_V_TMPL_=$(GTK_DOC_V_TMPL_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_TMPL_0=@echo " DOC Rebuilding template files"; - -tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt - $(GTK_DOC_V_TMPL)gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) - $(AM_V_at)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - if test -w $(abs_srcdir) ; then \ - cp -pR $(abs_builddir)/tmpl $(abs_srcdir)/; \ - fi \ - fi - $(AM_V_at)touch tmpl-build.stamp - -tmpl.stamp: tmpl-build.stamp - @true - -$(srcdir)/tmpl/*.sgml: - @true - #### xml #### GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V)) GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XML_0=@echo " DOC Building XML"; -sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) xml/gtkdocentities.ent - -$(GTK_DOC_V_XML)chmod -R u+w $(srcdir) && _source_dir='' ; \ +sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent + $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ @@ -263,7 +239,6 @@ distclean-local: $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ - rm -rf tmpl; \ fi maintainer-clean-local: @@ -313,9 +288,7 @@ dist-check-gtkdoc: endif dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local - @mkdir $(distdir)/tmpl @mkdir $(distdir)/html - @-cp ./tmpl/*.sgml $(distdir)/tmpl @cp ./html/* $(distdir)/html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ diff --git a/gtk-doc.notmpl.make b/gtk-doc.notmpl.make deleted file mode 100644 index 5709b54..0000000 --- a/gtk-doc.notmpl.make +++ /dev/null @@ -1,299 +0,0 @@ -# -*- mode: makefile -*- - -#################################### -# Everything below here is generic # -#################################### - -if GTK_DOC_USE_LIBTOOL -GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -GTKDOC_RUN = $(LIBTOOL) --mode=execute -else -GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -GTKDOC_RUN = -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) - -TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) - -SETUP_FILES = \ - $(content_files) \ - $(expand_content_files) \ - $(DOC_MAIN_SGML_FILE) \ - $(DOC_MODULE)-sections.txt \ - $(DOC_MODULE)-overrides.txt - -EXTRA_DIST = \ - $(HTML_IMAGES) \ - $(SETUP_FILES) - -DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \ - html-build.stamp pdf-build.stamp \ - sgml.stamp html.stamp pdf.stamp - -SCANOBJ_FILES = \ - $(DOC_MODULE).args \ - $(DOC_MODULE).hierarchy \ - $(DOC_MODULE).interfaces \ - $(DOC_MODULE).prerequisites \ - $(DOC_MODULE).signals - -REPORT_FILES = \ - $(DOC_MODULE)-undocumented.txt \ - $(DOC_MODULE)-undeclared.txt \ - $(DOC_MODULE)-unused.txt - -gtkdoc-check.test: Makefile - $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ - echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ - chmod +x $@ - -CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test - -if GTK_DOC_BUILD_HTML -HTML_BUILD_STAMP=html-build.stamp -else -HTML_BUILD_STAMP= -endif -if GTK_DOC_BUILD_PDF -PDF_BUILD_STAMP=pdf-build.stamp -else -PDF_BUILD_STAMP= -endif - -all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) -.PHONY: all-gtk-doc - -if ENABLE_GTK_DOC -all-local: all-gtk-doc -endif - -docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) - -$(REPORT_FILES): sgml-build.stamp - -#### setup #### - -GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_$(V)) -GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_SETUP_0=@echo " DOC Preparing build"; - -setup-build.stamp: - -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ - if test "x$$files" != "x" ; then \ - for file in $$files ; do \ - destdir=`dirname $(abs_builddir)/$$file`; \ - test -d "$$destdir" || mkdir -p "$$destdir"; \ - test -f $(abs_srcdir)/$$file && \ - cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ - done; \ - fi; \ - fi - $(AM_V_at)touch setup-build.stamp - -#### scan #### - -GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V)) -GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files"; - -GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V)) -GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; - -scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) - $(GTK_DOC_V_SCAN)_source_dir='' ; \ - for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) - $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ - scanobj_options=""; \ - gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - scanobj_options="--verbose"; \ - fi; \ - fi; \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ - gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ - else \ - for i in $(SCANOBJ_FILES) ; do \ - test -f $$i || touch $$i ; \ - done \ - fi - $(AM_V_at)touch scan-build.stamp - -$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp - @true - -#### xml #### - -GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V)) -GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_XML_0=@echo " DOC Building XML"; - -sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent - $(GTK_DOC_V_XML)_source_dir='' ; \ - for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) - $(AM_V_at)touch sgml-build.stamp - -sgml.stamp: sgml-build.stamp - @true - -xml/gtkdocentities.ent: Makefile - $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ - echo "<!ENTITY package \"$(PACKAGE)\">"; \ - echo "<!ENTITY package_bugreport \"$(PACKAGE_BUGREPORT)\">"; \ - echo "<!ENTITY package_name \"$(PACKAGE_NAME)\">"; \ - echo "<!ENTITY package_string \"$(PACKAGE_STRING)\">"; \ - echo "<!ENTITY package_tarname \"$(PACKAGE_TARNAME)\">"; \ - echo "<!ENTITY package_url \"$(PACKAGE_URL)\">"; \ - echo "<!ENTITY package_version \"$(PACKAGE_VERSION)\">"; \ - ) > $@ - -#### html #### - -GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V)) -GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_HTML_0=@echo " DOC Building HTML"; - -GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V)) -GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references"; - -html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) - $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ - mkhtml_options=""; \ - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - mkhtml_options="$$mkhtml_options --verbose"; \ - fi; \ - fi; \ - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ - if test "$$?" = "0"; then \ - mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ - fi; \ - cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - -@test "x$(HTML_IMAGES)" = "x" || \ - for file in $(HTML_IMAGES) ; do \ - test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ - test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \ - done; - $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) - $(AM_V_at)touch html-build.stamp - -#### pdf #### - -GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V)) -GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_PDF_0=@echo " DOC Building PDF"; - -pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) - $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ - mkpdf_options=""; \ - gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - mkpdf_options="$$mkpdf_options --verbose"; \ - fi; \ - fi; \ - if test "x$(HTML_IMAGES)" != "x"; then \ - for img in $(HTML_IMAGES); do \ - part=`dirname $$img`; \ - echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ - if test $$? != 0; then \ - mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ - fi; \ - done; \ - fi; \ - gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) - $(AM_V_at)touch pdf-build.stamp - -############## - -clean-local: - @rm -f *~ *.bak - @rm -rf .libs - @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ - rm -f $(DOC_MODULE).types; \ - fi - @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ - rm -f $(DOC_MODULE)-sections.txt; \ - fi - -distclean-local: - @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ - $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt - @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ - fi - -maintainer-clean-local: - @rm -rf xml html - -install-data-local: - @installfiles=`echo $(builddir)/html/*`; \ - if test "$$installfiles" = '$(builddir)/html/*'; \ - then echo 1>&2 'Nothing to install' ; \ - else \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - $(mkinstalldirs) $${installdir} ; \ - for i in $$installfiles; do \ - echo ' $(INSTALL_DATA) '$$i ; \ - $(INSTALL_DATA) $$i $${installdir}; \ - done; \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ - fi; \ - $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ - fi - -uninstall-local: - @if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - rm -rf $${installdir} - -# -# Require gtk-doc when making dist -# -if HAVE_GTK_DOC -dist-check-gtkdoc: docs -else -dist-check-gtkdoc: - @echo "*** gtk-doc is needed to run 'make dist'. ***" - @echo "*** gtk-doc was not found when 'configure' ran. ***" - @echo "*** please install gtk-doc and rerun 'configure'. ***" - @false -endif - -dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local - @mkdir $(distdir)/html - @cp ./html/* $(distdir)/html - @-cp ./$(DOC_MODULE).pdf $(distdir)/ - @-cp ./$(DOC_MODULE).types $(distdir)/ - @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ - @cd $(distdir) && rm -f $(DISTCLEANFILES) - @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html - -.PHONY : dist-hook-local docs diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in index 91cccec..f065344 100755 --- a/gtkdoc-mkdb.in +++ b/gtkdoc-mkdb.in @@ -5712,12 +5712,6 @@ sub MarkDownParse { } ############################################################################# -# LIBRARY FUNCTIONS - These functions are used in both gtkdoc-mkdb and -# gtkdoc-mktmpl and should eventually be moved to a -# separate library. -############################################################################# - -############################################################################# # Function : ReadDeclarationsFile # Description : This reads in a file containing the function/macro/enum etc. # declarations. @@ -5922,8 +5916,6 @@ sub ReadSignalsFile { # insert the documentation at the appropriate places. # It outputs %SymbolTypes, %SymbolDocs and %SymbolParams, which # is a hash of arrays. -# NOTE: This function is duplicated in gtkdoc-mktmpl (but -# slightly different). # Arguments : $docsfile - the template file to read in. # $skip_unused_params - 1 if the unused parameters should be # skipped. diff --git a/gtkdoc-mktmpl.in b/gtkdoc-mktmpl.in deleted file mode 100755 index c64dfd3..0000000 --- a/gtkdoc-mktmpl.in +++ /dev/null @@ -1,1274 +0,0 @@ -#!@PERL@ -w -# -*- cperl -*- -# -# gtk-doc - GTK DocBook documentation generator. -# Copyright (C) 1998 Damon Chaplin -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# - -############################################################################# -# Script : gtkdoc-mktmpl -# Description : This creates or updates the template files which contain the -# manually-edited documentation. (A 'template' is a simple text -# form which is filled in with the description of a function, -# macro, enum, or struct. For functions and macros it also -# contains fields for describing the parameters.) -# -# This script reads in the existing templates, found in -# tmpl/*.sgml, moves these files to tmpl/*.sgml.bak, and then -# recreates the .sgml files according to the structure given in -# the file $MODULE-sections.txt. -# -# Any new templates added, or new function parameters, are -# marked with 'FIXME' so you can do a grep to see which parts -# need updating. -# -# Any templates which are no longer used (i.e. they are remove -# from $MODULE-sections.txt) are placed in the file -# tmpl/$MODULE-unused.sgml. If they are included again later -# they are automatically copied back into position. -# If you are certain that these templates will never be used -# again you can delete them from tmpl/$MODULE-unused.sgml. -# -# Any parameters to functions which are no longer used are -# separated from the rest of the parameters with the line -# '<!-- # Unused Parameters # -->'. It may be that the parameter -# name has just been changed, in which case you can copy the -# description to the parameter with the new name. You can delete -# the unused parameter descriptions when no longer needed. -############################################################################# - -use strict; -use Getopt::Long; - -push @INC, '@PACKAGE_DATA_DIR@'; -require "gtkdoc-common.pl"; - -# Options - -# name of documentation module -my $MODULE; -my $TMPL_DIR; -my $FLAG_CHANGES; -my $PRINT_VERSION; -my $PRINT_HELP; -my $ONLY_SECTION_TMPL; - -my %optctl = ('module' => \$MODULE, - 'flag-changes' => \$FLAG_CHANGES, - 'output-dir' => \$TMPL_DIR, - 'only-section-tmpl' => \$ONLY_SECTION_TMPL, - 'version' => \$PRINT_VERSION, - 'help' => \$PRINT_HELP); -GetOptions(\%optctl, "module=s", "flag-changes!", "output-dir:s", "only-section-tmpl!", "version", "help"); - -if ($PRINT_VERSION) { - print "@VERSION@\n"; - exit 0; -} - -if (!$MODULE) { - $PRINT_HELP = 1; -} - -if ($PRINT_HELP) { - print <<EOF; -gtkdoc-mktmpl version @VERSION@ - generate documentation templates - ---module=MODULE_NAME Name of the doc module being parsed ---flag-changes If specified, changes in templates are flagged ---output-dir=DIRNAME The directory where the results are stored ---only-section-tmpl Only include section information in templates ---version Print the version of this program ---help Print this help -EOF - exit 0; -} - -print <<EOF; -############################################################################### -gtkdoc-mktmpl is deprecated and will be removed from one of the next gtk-doc -release. -Please refer to the documentation "Modernizing the documentation"/"GTK-Doc 1.9". -############################################################################### -EOF - -my $ROOT_DIR = "."; - -# The directory containing the template files. -$TMPL_DIR = $TMPL_DIR ? $TMPL_DIR : "$ROOT_DIR/tmpl"; - -# This file contains the object hierarchy. -my $OBJECT_TREE_FILE = "$ROOT_DIR/$MODULE.hierarchy"; - -# The file containing signal handler prototype information. -my $SIGNALS_FILE = "$ROOT_DIR/$MODULE.signals"; - -# The file containing Arg information. -my $ARGS_FILE = "$ROOT_DIR/$MODULE.args"; - -# Set the flag to indicate changes, if requested. -my $CHANGES_FLAG = $FLAG_CHANGES ? "FIXME" : ""; - -# These global arrays store information on signals. Each signal has an entry -# in each of these arrays at the same index, like a multi-dimensional array. -my @SignalObjects; # The GtkObject which emits the signal. -my @SignalNames; # The signal name. -my @SignalReturns; # The return type. -my @SignalFlags; # Flags for the signal -my @SignalPrototypes; # The rest of the prototype of the signal handler. - -# These global arrays store information on Args. Each Arg has an entry -# in each of these arrays at the same index, like a multi-dimensional array. -my @ArgObjects; # The GtkObject which has the Arg. -my @ArgNames; # The Arg name. -my @ArgTypes; # The Arg type - gint, GtkArrowType etc. -my @ArgFlags; # How the Arg can be used - readable/writable etc. - -# These global hashes store declaration info keyed on a symbol name. -my %Declarations; -my %DeclarationTypes; -my %DeclarationConditional; -my %DeclarationOutput; - -# These global hashes store the existing documentation. -my %SymbolDocs; -my %SymbolTypes; -my %SymbolParams; -my %SymbolSourceFile; -my %SymbolSourceLine; - -# These global arrays store GObject and subclasses and the hierarchy. -my @Objects; -my @ObjectLevels; - -&ReadSignalsFile ($SIGNALS_FILE); -&ReadArgsFile ($ARGS_FILE); -&ReadObjectHierarchy; - -&ReadDeclarationsFile ("$ROOT_DIR/$MODULE-decl.txt", 0); -if (-f "$ROOT_DIR/$MODULE-overrides.txt") { - &ReadDeclarationsFile ("$ROOT_DIR/$MODULE-overrides.txt", 1); -} -&ReadExistingTemplates; - -my $changed = 0; - -if (&UpdateTemplates ("$ROOT_DIR/$MODULE-sections.txt")) { - $changed = 1; -} -&OutputUnusedTemplates; -if (&CheckAllDeclarationsOutput) { - $changed = 1; -} - -if ($changed || ! -e "$ROOT_DIR/tmpl.stamp") { - open (TIMESTAMP, ">$ROOT_DIR/tmpl.stamp") - || die "Can't create $ROOT_DIR/tmpl.stamp"; - print (TIMESTAMP "timestamp"); - close (TIMESTAMP); -} - -############################################################################# -# Function : ReadExistingTemplates -# Description : This reads in all the existing documentation, into the global -# variables %SymbolDocs, %SymbolTypes, and %SymbolParams (a -# hash of arrays). -# Arguments : none -############################################################################# - -sub ReadExistingTemplates { - %SymbolDocs = (); - %SymbolTypes = (); - %SymbolParams = (); - - # Read the unused docs first, so they get overridden by any real docs. - # (though this shouldn't happen often). - my $unused_doc = "$TMPL_DIR/$MODULE-unused.sgml"; - if (-e $unused_doc) { - &ReadTemplateFile ($unused_doc, 0); - } - - while (<$TMPL_DIR/*.sgml>) { -# print "Reading $_\n"; - if ($_ eq $unused_doc) { -# print "skipping $unused_doc\n"; - } else { - &ReadTemplateFile ($_, 0); - } - } -} - - -############################################################################# -# Function : UpdateTemplates -# Description : This collects the output for each section of the docs, and -# outputs each file when the end of the section is found. -# Arguments : $file - the file containing the sections of the docs. -############################################################################# - -sub UpdateTemplates { - my ($file) = @_; -# print "Reading: $file\n"; - - open (INPUT, $file) - || die "Can't open $file"; - - # Create the top output directory if it doesn't exist. - if (! -e $TMPL_DIR) { - mkdir ("$TMPL_DIR", 0777) - || die "Can't create directory: $TMPL_DIR"; - } - - my $filename = ""; - my $title = ""; - my $subsection = ""; - my $output; - my $changed = 0; - while (<INPUT>) { - if (m/^#/) { - next; - - } elsif (m/^<SECTION>/) { - $output = ""; - - } elsif (m/^<SUBSECTION\s*(.*)>/i) { - $subsection = $1; - next; - - } elsif (m/^<TITLE>(.*)<\/TITLE>/) { - $title = $1; -# print "Section: $title\n"; - - } elsif (m/^<FILE>(.*)<\/FILE>/) { - $filename = $1; - - } elsif (m/^<INCLUDE>(.*)<\/INCLUDE>/) { - next; - - } elsif (m/^<\/SECTION>/) { - if ($title eq "") { - $title = $filename; - } -# print "End of section: $title\n"; - - $filename =~ s/\s/_/g; - $filename .= ".sgml"; - - if (&OutputTemplateFile ($filename, $title, \$output)) { - $changed = 1; - } - - $title = ""; - $subsection = ""; - - } elsif (m/^(\S+)/) { - my $symbol = $1; -# print " Symbol: $symbol\n"; - - my $declaration = $Declarations{$1}; - if (defined ($declaration)) { - # We don't want templates for standard macros/functions of - # GObjects or private declarations. - if ($subsection ne "Standard" && $subsection ne "Private") { - $output .= &OutputDeclaration ($DeclarationTypes {$symbol}, - $symbol, $declaration); - - $output .= &OutputSignalTemplates ($symbol); - $output .= &OutputArgTemplates ($symbol); - } - - # Note that the declaration has been output. - $DeclarationOutput{$symbol} = 1; - - if ($declaration eq '##conditional##') { -# print "Conditional $DeclarationTypes{$symbol}\n"; - } - - } else { - &LogWarning ($file, $., "No declaration found for: $1"); - } - } - } - close (INPUT); - - return $changed; -} - - -############################################################################# -# Function : CheckAllDeclarationsOutput -# Description : This steps through all the declarations that were loaded, and -# makes sure that each one has been output, by checking the -# corresponding flag in the %DeclarationOutput hash. It is -# intended to check that any new declarations in new versions -# of the module get added to the $MODULE-sections.txt file. -# Arguments : none -############################################################################# - -sub CheckAllDeclarationsOutput { - my $num_unused = 0; - - my $old_unused_file = "$ROOT_DIR/$MODULE-unused.txt"; - my $new_unused_file = "$ROOT_DIR/$MODULE-unused.new"; - - open (UNUSED, ">$new_unused_file") - || die "Can't open $new_unused_file"; - my ($symbol); - foreach $symbol (sort keys (%Declarations)) { - if (!defined ($DeclarationOutput{$symbol})) { - print (UNUSED "$symbol\n"); - $num_unused++; - } - } - close (UNUSED); - if ($num_unused != 0) { - &LogWarning ($old_unused_file, 1, "$num_unused unused declarations.". - "They should be added to $MODULE-sections.txt in the appropriate place."); - } - - return &UpdateFileIfChanged ($old_unused_file, $new_unused_file, 0); -} - - -############################################################################# -# Function : OutputDeclaration -# Description : This returns the template for one symbol & declaration. -# Note that it uses the global %SymbolDocs and %SymbolParams to -# lookup any existing documentation. -# Arguments : $type - the type of the symbol ('FUNCTION'/'MACRO' etc.) -# $symbol - the symbol name. -# $declaration - the declaration of the symbol. -############################################################################# - -sub OutputDeclaration { - my ($type, $symbol, $declaration) = @_; - my ($output) = ""; - - #print "Outputting $type: $symbol\n"; - - # See if symbol already has a description. - my ($symbol_desc) = $SymbolDocs{$symbol}; - my ($template_exists); - if (defined ($symbol_desc)) { - $template_exists = 1; - $symbol_desc =~ s/\s+$//; - } else { - $template_exists = 0; - $symbol_desc = "<para>\n$CHANGES_FLAG\n</para>"; - } - - $output .= <<EOF; -<!-- ##### $type $symbol ##### --> -$symbol_desc - -EOF - - # For functions, function typedefs and macros, we output the arguments. - # For functions and function typedefs we also output the return value. - if ($type eq "FUNCTION" || $type eq "USER_FUNCTION") { - # Take out the return type - $declaration =~ s/<RETURNS>\s*(.*?)<\/RETURNS>\n//; - my $ret_type_decl = $1; - my $ret_type_modifier; - my $ret_type; - my $ret_type_pointer; - - if ($ret_type_decl =~ m/((const\s+|G_CONST_RETURN\s+|unsigned\s+|signed\s+|long\s+|short\s+|struct\s+|enum\s+)*)(\w+)\s*(\**\s*(const|G_CONST_RETURN)?\s*\**\s*(restrict)?\s*)/) { - $ret_type_modifier = defined($1) ? $1 : ""; - $ret_type = $3; - $ret_type_pointer = $4; - } else { - $ret_type = "void"; - } - - my @fields = ParseFunctionDeclaration($declaration); - - for (my $i = 0; $i <= $#fields; $i += 2) { - my $field_name = $fields[$i]; - $output .= &OutputParam ($symbol, $field_name, $template_exists, 1, ""); - } - - if ($ret_type ne "void" || $ret_type_modifier || $ret_type_pointer) { - $output .= &OutputParam ($symbol, "Returns", $template_exists, 1, ""); - } - - $output .= &OutputParam ($symbol, "Deprecated", $template_exists, 0, ""); - $output .= &OutputParam ($symbol, "Since", $template_exists, 0, ""); - $output .= &OutputParam ($symbol, "Stability", $template_exists, 0, ""); - $output .= &OutputOldParams ($symbol); - $output .= "\n"; - } - - if ($type eq "MACRO") { - my @fields = ParseMacroDeclaration($declaration); - - for (my $i = 0; $i <= $#fields; $i +=2) { - my $field_name = $fields[$i]; - - $output .= &OutputParam ($symbol, $field_name, $template_exists, - 1, ""); - } - $output .= &OutputParam ($symbol, "Returns", $template_exists, 0, ""); - $output .= &OutputParam ($symbol, "Deprecated", $template_exists, 0, ""); - $output .= &OutputParam ($symbol, "Since", $template_exists, 0, ""); - $output .= &OutputParam ($symbol, "Stability", $template_exists, 0, ""); - $output .= &OutputOldParams ($symbol); - $output .= "\n"; - } - - if ($type eq "STRUCT") { - my $is_object_struct = CheckIsObject ($symbol); - my @fields = ParseStructDeclaration($declaration, $is_object_struct, 1); - - for (my $i = 0; $i <= $#fields; $i += 2) { - my $field_name = $fields[$i]; - $output .= &OutputParam ($symbol, $field_name, $template_exists, 1, ""); - } - $output .= &OutputParam ($symbol, "Deprecated", $template_exists, 0, ""); - $output .= &OutputParam ($symbol, "Since", $template_exists, 0, ""); - $output .= &OutputParam ($symbol, "Stability", $template_exists, 0, ""); - } - - if ($type eq "ENUM") { - my @members = ParseEnumDeclaration($declaration); - - for my $member (@members) { - $output .= &OutputParam ($symbol, $member, $template_exists, 1, ""); - } - $output .= &OutputParam ($symbol, "Deprecated", $template_exists, 0, ""); - $output .= &OutputParam ($symbol, "Since", $template_exists, 0, ""); - $output .= &OutputParam ($symbol, "Stability", $template_exists, 0, ""); - } - - $output .= "\n"; - - # Remove the used docs from the hashes. - if ($template_exists) { - delete $SymbolDocs{$symbol}; - delete $SymbolParams{$symbol}; - } - - return $output; -} - - -############################################################################# -# Function : OutputParam -# Description : This outputs the part of a template for one parameter. -# It first checks if the parameter is already described, and if -# so it uses that description, and clears it so it isn't output -# as an old param. -# Arguments : $symbol - the symbol (function or macro) name. -# $param_to_output - the parameter to add. -# $template_exists - TRUE if the template already existed in -# template files. If it did, then we will flag any changes -# with 'FIXME'. -# $force_output - TRUE if the parameter should be output even -# if it didn't already exist in the template. (The return -# values of macros are added manually if required, and so we -# never add it here - we only copy it if it already exists.) -# $default_description - the default description of the -# parameter to be used if it doesn't already exist. (Signal -# handlers have a few common parameters.) -############################################################################# - -sub OutputParam { - my ($symbol, $param_to_output, $template_exists, - $force_output, $default_description) = @_; - my ($j); - - my ($params) = $SymbolParams{$symbol}; - if (defined ($params)) { - for ($j = 0; $j <= $#$params; $j += 2) { - my $param_name = $$params[$j]; - my $param_desc = $$params[$j + 1]; - - if ($param_name eq $param_to_output) { - $param_desc =~ s/\s+$//; - $$params[$j] = ""; - $$params[$j + 1] = ""; - return "\@$param_name: $param_desc\n"; - } - } - } - - # If the template was already in a file, flag the new parameter. - # If not, the template itself will be flagged, so we don't need to flag - # all the new parameters as well. - if ($force_output) { - if ($default_description ne "") { - $default_description =~ s/\s+$//; - return "\@$param_to_output: $default_description\n"; - } else { - if ($template_exists) { - return "\@$param_to_output: $CHANGES_FLAG\n"; - } else { - return "\@$param_to_output: \n"; - } - } - } - return ""; -} - - -############################################################################# -# Function : OutputOldParams -# Description : This returns all the existing documentation for parameters of -# the given function/macro/signal symbol which are unused, with -# a comment before them. -# Arguments : $symbol - the symbol (function/macro/signal) name. -############################################################################# - -sub OutputOldParams { - my ($symbol) = @_; - my $output = ""; - - my ($params) = $SymbolParams{$symbol}; - if (defined ($params)) { - my $j; - for ($j = 0; $j <= $#$params; $j += 2) { - my $param_name = $$params[$j]; - my $param_desc = $$params[$j + 1]; - - if ($param_name ne "") { - $param_desc =~ s/\s+$//; - - # There's no point keeping it if it has no docs. - if ($param_desc ne "") { - $output .= "\@$param_name: $param_desc\n"; - } - } - } - } - if ($output) { - $output = "<!-- # Unused Parameters # -->\n" . $output; - } - return $output; -} - - -############################################################################# -# Function : OutputTemplateFile -# Description : This outputs one template file. -# Arguments : $file - the basename of the file to output. -# $title - the title from the $MODULE-sections.txt file. This -# will be overridden by any title given in the template file. -# $output - reference to the templates to output. -############################################################################# - -sub OutputTemplateFile { - my ($file, $title, $output) = @_; - - my ($short_desc, $long_desc, $see_also, $stability, $image); - - if (defined ($SymbolDocs{"$TMPL_DIR/$file:Title"})) { - $title = $SymbolDocs{"$TMPL_DIR/$file:Title"}; - delete $SymbolDocs{"$TMPL_DIR/$file:Title"}; - } - if (defined ($SymbolDocs{"$TMPL_DIR/$file:Short_Description"})) { - $short_desc = $SymbolDocs{"$TMPL_DIR/$file:Short_Description"}; - delete $SymbolDocs{"$TMPL_DIR/$file:Short_Description"}; - } else { - $short_desc = ""; - } - if (defined ($SymbolDocs{"$TMPL_DIR/$file:Long_Description"})) { - $long_desc = $SymbolDocs{"$TMPL_DIR/$file:Long_Description"}; - delete $SymbolDocs{"$TMPL_DIR/$file:Long_Description"}; - } else { - $long_desc = "<para>\n\n</para>\n"; - } - if (defined ($SymbolDocs{"$TMPL_DIR/$file:See_Also"})) { - $see_also = $SymbolDocs{"$TMPL_DIR/$file:See_Also"}; - delete $SymbolDocs{"$TMPL_DIR/$file:See_Also"}; - } else { - $see_also = "<para>\n\n</para>\n"; - } - if (defined ($SymbolDocs{"$TMPL_DIR/$file:Stability_Level"})) { - $stability = $SymbolDocs{"$TMPL_DIR/$file:Stability_Level"}; - delete $SymbolDocs{"$TMPL_DIR/$file:Stability_Level"}; - } else { - $stability = ""; - } - if (defined ($SymbolDocs{"$TMPL_DIR/$file:Image"})) { - $image = $SymbolDocs{"$TMPL_DIR/$file:Image"}; - delete $SymbolDocs{"$TMPL_DIR/$file:Image"}; - } else { - $image = ""; - } - - - my $old_tmpl_file = "$TMPL_DIR/$file"; - my $new_tmpl_file = "$TMPL_DIR/$file.new"; - - open (OUTPUT, ">$new_tmpl_file") - || die "Can't create $new_tmpl_file"; - - print (OUTPUT <<EOF); -<!-- ##### SECTION Title ##### --> -$title - -<!-- ##### SECTION Short_Description ##### --> -$short_desc - -<!-- ##### SECTION Long_Description ##### --> -$long_desc - -<!-- ##### SECTION See_Also ##### --> -$see_also - -<!-- ##### SECTION Stability_Level ##### --> -$stability - -<!-- ##### SECTION Image ##### --> -$image - -EOF - - print (OUTPUT $$output) unless $ONLY_SECTION_TMPL; - close (OUTPUT); - - return &UpdateFileIfChanged ($old_tmpl_file, $new_tmpl_file, 1); -} - - -############################################################################# -# Function : OutputSignalTemplates -# Description : Outputs templates for signal handlers. -# Arguments : $title - the title from the $MODULE-sections.txt file. If the -# file is describing a GtkObject subclass, the title should -# be the name of the class, e.g. 'GtkButton'. -############################################################################# - -sub OutputSignalTemplates { - my ($title) = @_; - - my $output = ""; - my ($i, $template_exists); - for ($i = 0; $i <= $#SignalObjects; $i++) { - if ($SignalObjects[$i] eq $title) { -# print "Found signal: $SignalObjects[$i]\n"; - my ($symbol) = "$SignalObjects[$i]::$SignalNames[$i]"; - - # See if symbol already has a description. - my ($symbol_desc) = $SymbolDocs{$symbol}; - if (defined ($symbol_desc)) { - $template_exists = 1; - $symbol_desc =~ s/\s+$//; - delete $SymbolDocs{$symbol}; - } else { - $template_exists = 0; - $symbol_desc = "<para>\n$CHANGES_FLAG\n</para>"; - } - - $output .= <<EOF; -<!-- ##### SIGNAL $symbol ##### --> -$symbol_desc - -EOF - my $sourceparams = $SymbolParams{$symbol}; - my @params = split ("[,\n]", $SignalPrototypes[$i]); - my ($j, $name); - for ($j = 0; $j <= $#params; $j++) { - my $param = $params[$j]; - $param =~ s/^\s+//; - $param =~ s/\s*$//; - if ($param =~ m/^\s*$/) { next; } - if ($param =~ m/^void$/) { next; } - - if ($param =~ m/^\s*(\w+)\s*(\**)\s*([\w\[\]]+)?\s*$/) { - if (defined ($sourceparams)) { - $name = $$sourceparams[2 * $j]; - } else { - $name = $3; - } - - if (!defined ($name)) { - $name = "Param" . ($j + 1); - } - - if ($j == 0) { - $output .= &OutputParam ($symbol, $name, - $template_exists, 1, - "the object which received the signal."); - } else { - $output .= &OutputParam ($symbol, $name, - $template_exists, 1, ""); - } - } - } - - if ($SignalReturns[$i] ne "void") { - $output .= &OutputParam ($symbol, "Returns", $template_exists, - 1, ""); - } - $output .= &OutputOldParams ($symbol); - $output .= "\n"; - } - } - return $output; -} - - -############################################################################# -# Function : OutputArgTemplates -# Description : Outputs templates for Args. -# Arguments : $title - the title from the $MODULE-sections.txt file. If the -# file is describing a GtkObject subclass, the title should -# be the name of the class, e.g. 'GtkButton'. -############################################################################# - -sub OutputArgTemplates { - my ($title) = @_; - - my $output = ""; - my $i; - for ($i = 0; $i <= $#ArgObjects; $i++) { - if ($ArgObjects[$i] eq $title) { -# print "Found arg: $ArgObjects[$i]\n"; - # I've only used one colon so we don't clash with signals. - my ($symbol) = "$ArgObjects[$i]:$ArgNames[$i]"; - - # See if symbol already has a description. - my ($symbol_desc) = $SymbolDocs{$symbol}; - if (defined ($symbol_desc)) { - delete $SymbolDocs{$symbol}; - $symbol_desc =~ s/\s+$//; - } else { - $symbol_desc = "<para>\n$CHANGES_FLAG\n</para>"; - } - - $output .= <<EOF; -<!-- ##### ARG $symbol ##### --> -$symbol_desc - -EOF - } - } - return $output; -} - - -############################################################################# -# Function : OutputUnusedTemplates -# Description : This saves any unused documentation into $MODULE-unused.sgml. -# Arguments : none -############################################################################# - -sub OutputUnusedTemplates { - my ($old_unused_file) = "$TMPL_DIR/$MODULE-unused.sgml"; - my ($new_unused_file) = "$TMPL_DIR/$MODULE-unused.new"; - - open (UNUSED, ">$new_unused_file") - || die "Can't open file: $new_unused_file"; - - my $output = ""; - my ($symbol, $symbol_desc); - for $symbol (sort keys %SymbolDocs) { - $symbol_desc = $SymbolDocs{$symbol}; - -# print "Unused: $symbol\n"; - - my $type = $SymbolTypes{$symbol}; - if (!defined ($type)) { - $type = "UNKNOWN"; - &LogWarning ($SymbolSourceFile{$symbol},$SymbolSourceLine{$symbol}, "Unused symbol $symbol has unknown type."); - } - - $output .= <<EOF; -<!-- ##### $type $symbol ##### --> -$symbol_desc - -EOF - - my ($params) = $SymbolParams{$symbol}; - if (defined ($params)) { - my $j; - for ($j = 0; $j <= $#$params; $j += 2) { - my $param_name = $$params[$j]; - my $param_desc = $$params[$j + 1]; - $param_desc =~ s/\s+$//; - $output .= "\@$param_name: $param_desc\n"; - } - } - $output .= "\n"; - } - - print UNUSED $output; - close (UNUSED); - - &UpdateFileIfChanged ($old_unused_file, $new_unused_file, 1); -} - - -############################################################################# -# LIBRARY FUNCTIONS - These functions are used in both gtkdoc-mkdb and -# gtkdoc-mktmpl and should eventually be moved to a -# separate library. -############################################################################# - -############################################################################# -# Function : ReadDeclarationsFile -# Description : This reads in a file containing the function/macro/enum etc. -# declarations. -# -# Note that in some cases there are several declarations with -# the same name, e.g. for conditional macros. In this case we -# set a flag in the %DeclarationConditional hash so the -# declaration is not shown in the docs. -# -# If a macro and a function have the same name, e.g. for -# gtk_object_ref, the function declaration takes precedence. -# -# Some opaque structs are just declared with 'typedef struct -# _name name;' in which case the declaration may be empty. -# The structure may have been found later in the header, so -# that overrides the empty declaration. -# -# Arguments : $file - the declarations file to read -# $override - if declarations in this file should override -# any current declaration. -############################################################################# - -sub ReadDeclarationsFile { - my ($file, $override) = @_; - - if ($override == 0) { - %Declarations = (); - %DeclarationTypes = (); - %DeclarationConditional = (); - %DeclarationOutput = (); - } - - open (INPUT, $file) - || die "Can't open $file"; - my $declaration_type = ""; - my $declaration_name; - my $declaration; - while (<INPUT>) { - if (!$declaration_type) { - if (m/^<([^>]+)>/) { - $declaration_type = $1; - $declaration_name = ""; -# print "Found declaration: $declaration_type\n"; - $declaration = ""; - } - } else { - if (m%^<NAME>(.*)</NAME>%) { - $declaration_name = $1; - } elsif (m%<DEPRECATED/>%) { - # do nothing, just skip the line; we handle this - # in mkdb - } elsif (m%^</$declaration_type>%) { -# print "Found end of declaration: $declaration_name\n"; - # Check that the declaration has a name - if ($declaration_name eq "") { - print "ERROR: $declaration_type has no name $file:$.\n"; - } - - # Check if the symbol is already defined. - if (defined ($Declarations{$declaration_name}) - && $override == 0) { - # Function declarations take precedence. - if ($DeclarationTypes{$declaration_name} eq 'FUNCTION') { - # Ignore it. - } elsif ($declaration_type eq 'FUNCTION') { - $Declarations{$declaration_name} = $declaration; - $DeclarationTypes{$declaration_name} = $declaration_type; - } elsif ($DeclarationTypes{$declaration_name} - eq $declaration_type) { - # If the existing declaration is empty, or is just a - # forward declaration of a struct, override it. - if ($declaration_type eq 'STRUCT') { - if ($Declarations{$declaration_name} =~ m/^\s*(struct\s+\w+\s*;)?\s*$/) { - $Declarations{$declaration_name} = $declaration; - } elsif ($declaration =~ m/^\s*(struct\s+\w+\s*;)?\s*$/) { - # Ignore an empty or forward declaration. - } else { - &LogWarning ($file, $., "Structure $declaration_name has multiple definitions."); - } - - } else { - # set flag in %DeclarationConditional hash for - # multiply defined macros/typedefs. - $DeclarationConditional{$declaration_name} = 1; - } - } else { - &LogWarning ($file, $., "$declaration_name has multiple definitions."); - } - } else { - $Declarations{$declaration_name} = $declaration; - $DeclarationTypes{$declaration_name} = $declaration_type; - } - $declaration_type = ""; - } else { - $declaration .= $_; - } - } - } - close (INPUT); -} - - -############################################################################# -# Function : ReadSignalsFile -# Description : This reads in an existing file which contains information on -# all GObject signals. It creates the arrays @SignalNames and -# @SignalPrototypes containing info on the signals. The first -# line of the SignalPrototype is the return type of the signal -# handler. The remaining lines are the parameters passed to it. -# The last parameter, "gpointer user_data" is always the same -# so is not included. -# Arguments : $file - the file containing the signal handler prototype -# information. -############################################################################# - -sub ReadSignalsFile { - my ($file) = @_; - - my $in_signal = 0; - my $signal_object; - my $signal_name; - my $signal_returns; - my $signal_flags; - my $signal_prototype; - - # Reset the signal info. - @SignalObjects = (); - @SignalNames = (); - @SignalReturns = (); - @SignalFlags = (); - @SignalPrototypes = (); - - if (! -f $file) { - return; - } - if (!open (INPUT, $file)) { - warn "Can't open $file - skipping signals\n"; - return; - } - while (<INPUT>) { - if (!$in_signal) { - if (m/^<SIGNAL>/) { - $in_signal = 1; - $signal_object = ""; - $signal_name = ""; - $signal_returns = ""; - $signal_prototype = ""; - } - } else { - if (m/^<NAME>(.*)<\/NAME>/) { - $signal_name = $1; - if ($signal_name =~ m/^(.*)::(.*)$/) { - $signal_object = $1; - ($signal_name = $2) =~ s/_/-/g; -# print "Found signal: $signal_name\n"; - } else { - print "Invalid signal name: $signal_name\n"; - } - } elsif (m/^<RETURNS>(.*)<\/RETURNS>/) { - $signal_returns = $1; - } elsif (m/^<FLAGS>(.*)<\/FLAGS>/) { - $signal_flags = $1; - } elsif (m%^</SIGNAL>%) { -# print "Found end of signal: ${signal_object}::${signal_name}\nReturns: ${signal_returns}\n${signal_prototype}"; - push (@SignalObjects, $signal_object); - push (@SignalNames, $signal_name); - push (@SignalReturns, $signal_returns); - push (@SignalFlags, $signal_flags); - push (@SignalPrototypes, $signal_prototype); - $in_signal = 0; - } else { - $signal_prototype .= $_; - } - } - } - close (INPUT); -} - - -############################################################################# -# Function : ReadTemplateFile -# Description : This reads in the manually-edited documentation file -# corresponding to the file currently being created, so we can -# insert the documentation at the appropriate places. -# It outputs %SymbolTypes, %SymbolDocs and %SymbolParams, which -# is a hash of arrays. -# NOTE: This function is duplicated in gtkdoc-mkdb (but -# slightly different). -# Arguments : $docsfile - the template file to read in. -# $skip_unused_params - 1 if the unused parameters should be -# skipped. -############################################################################# - -sub ReadTemplateFile { - my ($docsfile, $skip_unused_params) = @_; - -# print "Reading $docsfile\n"; - if (! -f $docsfile) { - print "File doesn't exist: $docsfile\n"; - return 0; - } - - my $CurrentType = ""; # Type of symbol being read. - my $CurrentSymbol = ""; # Name of symbol being read. - my $SymbolDoc = ""; # Description of symbol being read. - my @Params; # Parameter names and descriptions of current - # function/macro/function typedef. - my $CurrentParam = -1; # Index of parameter currently being read. - # Note that the param array contains pairs - # of param name & description. - my $InUnusedParameters = 0; # True if we are reading in the unused params. - - open (DOCS, $docsfile) - || die "Can't open file $docsfile: $!"; - while (<DOCS>) { - if (m/^<!-- ##### ([A-Z_]+) (\S+) ##### -->/) { - my $type = $1; - my $symbol = $2; - if ($symbol eq "Title" - || $symbol eq "Short_Description" - || $symbol eq "Long_Description" - || $symbol eq "See_Also" - || $symbol eq "Stability_Level" - || $symbol eq "Image") { - $symbol = $docsfile . ":" . $symbol; - } - - #print "Found symbol: $symbol\n"; - # Remember file and line for the symbol - $SymbolSourceFile{$symbol} = $docsfile; - $SymbolSourceLine{$symbol} = $.; - - # Canonicalize signal and argument names to have -, not _ - if ($type eq "ARG" || $type eq "SIGNAL") { - $symbol =~ s/_/-/g; - } - - # Store previous symbol, but remove any trailing blank lines. - if ($CurrentSymbol ne "") { - $SymbolDoc =~ s/\s+$//; - $SymbolTypes{$CurrentSymbol} = $CurrentType; - $SymbolDocs{$CurrentSymbol} = $SymbolDoc; - - if ($CurrentParam >= 0) { - $SymbolParams{$CurrentSymbol} = [ @Params ]; - } else { - # Delete any existing params in case we are overriding a - # previously read template. - delete $SymbolParams{$CurrentSymbol}; - } - } - $CurrentType = $type; - $CurrentSymbol = $symbol; - $CurrentParam = -1; - $InUnusedParameters = 0; - $SymbolDoc = ""; - @Params = (); - - } elsif (m/^<!-- # Unused Parameters # -->/) { - $InUnusedParameters = 1; - next; - - } else { - # Workaround for an old bug that left a mess in the templates. - # This happened with macros with args spread over several lines. - if (m/^\@\\$/) { - # Skip the next line. - $_ = <DOCS>; - next; - } - - # Workaround for an old bug that left '@:' at start of lines. - if (m/^\@:$/) { - next; - } - - - # Check if param found. Need to handle "..." and "format...". - if (s/^\@([\w\.]+):\040?//) { - my $param_name = $1; - # Allow variations of 'Returns' - if ($param_name =~ m/^[Rr]eturns?$/) { - $param_name = "Returns"; - } -# print "Found param: $param_name\n"; - push (@Params, $param_name); - push (@Params, $_); - $CurrentParam += 2; - next; - } - - # When outputting the DocBook we skip unused parameters. - if (!$InUnusedParameters || !$skip_unused_params) { - if ($CurrentParam >= 0) { - $Params[$CurrentParam] .= $_; - } else { - $SymbolDoc .= $_; - } - } - } - } - - # Remember to finish the current symbol doccs. - if ($CurrentSymbol ne "") { - - $SymbolDoc =~ s/\s+$//; - $SymbolTypes{$CurrentSymbol} = $CurrentType; - $SymbolDocs{$CurrentSymbol} = $SymbolDoc; - - if ($CurrentParam >= 0) { - $SymbolParams{$CurrentSymbol} = [ @Params ]; - } else { - delete $SymbolParams{$CurrentSymbol}; - } - } - - close (DOCS); - return 1; -} - - -############################################################################# -# Function : ReadObjectHierarchy -# Description : This reads in the $MODULE-hierarchy.txt file containing all -# the GtkObject subclasses described in this module (and their -# ancestors). -# It places them in the @Objects array, and places their level -# in the widget hierarchy in the @ObjectLevels array, at the -# same index. GtkObject, the root object, has a level of 1. -# -# FIXME: the version in gtkdoc-mkdb also generates tree_index.sgml -# as it goes along, this should be split out into a separate -# function. -# -# Arguments : none -############################################################################# - -sub ReadObjectHierarchy { - @Objects = (); - @ObjectLevels = (); - - if (! -f $OBJECT_TREE_FILE) { - return; - } - if (!open (INPUT, $OBJECT_TREE_FILE)) { - warn "Can't open $OBJECT_TREE_FILE - skipping object tree\n"; - return; - } - while (<INPUT>) { - if (m/\S+/) { - my $object = $&; - my $level = (length($`)) / 2 + 1; -# print ("Level: $level Object: $object\n"); - - push (@Objects, $object); - push (@ObjectLevels, $level); - } - } - - close (INPUT); -} - - -############################################################################# -# Function : ReadArgsFile -# Description : This reads in an existing file which contains information on -# all GObject args. It creates the arrays @ArgObjects, @ArgNames, -# @ArgTypes and @ArgFlags containing info on the args. -# Arguments : $file - the file containing the arg information. -############################################################################# - -sub ReadArgsFile { - my ($file) = @_; - - my $in_arg = 0; - my $arg_object; - my $arg_name; - my $arg_type; - my $arg_flags; - - # Reset the signal info. - @ArgObjects = (); - @ArgNames = (); - @ArgTypes = (); - @ArgFlags = (); - - if (! -f $file) { - return; - } - if (!open (INPUT, $file)) { - warn "Can't open $file - skipping args\n"; - return; - } - while (<INPUT>) { - if (!$in_arg) { - if (m/^<ARG>/) { - $in_arg = 1; - $arg_object = ""; - $arg_name = ""; - $arg_type = ""; - $arg_flags = ""; - } - } else { - if (m/^<NAME>(.*)<\/NAME>/) { - $arg_name = $1; - if ($arg_name =~ m/^(.*)::(.*)$/) { - $arg_object = $1; - ($arg_name = $2) =~ s/_/-/g; -# print "Found arg: $arg_name\n"; - } else { - print "Invalid arg name: $arg_name\n"; - } - } elsif (m/^<TYPE>(.*)<\/TYPE>/) { - $arg_type = $1; - } elsif (m/^<FLAGS>(.*)<\/FLAGS>/) { - $arg_flags = $1; - } elsif (m%^</ARG>%) { -# print "Found end of arg: ${arg_object}::${arg_name}\n${arg_type} : ${arg_flags}\n"; - push (@ArgObjects, $arg_object); - push (@ArgNames, $arg_name); - push (@ArgTypes, $arg_type); - push (@ArgFlags, $arg_flags); - $in_arg = 0; - } - } - } - close (INPUT); -} - - -############################################################################# -# Function : CheckIsObject -# Description : Returns 1 if the given name is a GObject or a subclass. -# It uses the global @Objects array. -# Note that the @Objects array only contains classes in the -# current module and their ancestors - not all GObject classes. -# Arguments : $name - the name to check. -############################################################################# - -sub CheckIsObject { - my ($name) = @_; - - my $object; - foreach $object (@Objects) { - if ($object eq $name) { - return 1; - } - } - return 0; -} - diff --git a/gtkdocize.in b/gtkdocize.in index 50a041d..a688fc3 100644 --- a/gtkdocize.in +++ b/gtkdocize.in @@ -115,16 +115,10 @@ while test $# -gt 0; do done case "$flavour" in - legacy-flat*) + legacy-flat|no-tmpl-flat) makefile=gtk-doc.flat.make ;; - legacy*) - ;; - no-tmpl-flat*) - makefile=gtk-doc.notmpl-flat.make - ;; - no-tmpl*) - makefile=gtk-doc.notmpl.make + legacy|no-tmpl) ;; *) echo "$progname: invalid value for --flavour" 1>&2 diff --git a/help/manual/C/README b/help/manual/C/README deleted file mode 100644 index 33829e8..0000000 --- a/help/manual/C/README +++ /dev/null @@ -1,4 +0,0 @@ - -This directory contains the beginnings of a new manual for gtk-doc. - -The older documentation is in the gtk-doc/doc directory. diff --git a/help/manual/C/index.docbook b/help/manual/C/index.docbook index ec2bd31..3c46e77 100644 --- a/help/manual/C/index.docbook +++ b/help/manual/C/index.docbook @@ -263,27 +263,6 @@ <listitem> <para> - <guilabel>Generating the "template" files.</guilabel> - - <application>gtkdoc-mktmpl</application> creates a number of files in - the <filename class='directory'>tmpl/</filename> subdirectory, using the - information gathered in the first step. (Note that this can be run - repeatedly. It will try to ensure that no documentation is ever lost.) - </para> - <note> - <para> - Since GTK-Doc 1.9 the templates can be avoided. We encourage people to keep - documentation in the code. <application>gtkdocize</application> supports now - a <option>--flavour no-tmpl</option> option that chooses a makefile that - skips tmpl usage totally. - If you have never changed file in tmpl by hand, please remove the directory - (e.g. from version control system). - </para> - </note> - </listitem> - - <listitem> - <para> <guilabel>Generating the XML and HTML/PDF.</guilabel> <application>gtkdoc-mkdb</application> turns the template files into @@ -299,7 +278,7 @@ document called <filename><package>.pdf</filename>. </para> <para> - Files in <filename class='directory'>xml/</filename> and + Files in <filename class='directory'>xml/</filename> and <filename class='directory'>html/</filename> directories are always overwritten. One should never edit them directly. </para> @@ -497,12 +476,12 @@ AC_CONFIG_MACRO_DIR(m4) <title>Integration with automake</title> <para> - First copy the <filename>Makefile.am</filename> from the + First copy the <filename>Makefile.am</filename> from the <filename class='directory'>examples</filename> sub directory of the <ulink url="https://git.gnome.org/browse/gtk-doc/tree/examples/Makefile.am">gtkdoc-sources</ulink> to your project's API documentation directory ( <filename class='directory'>./docs/reference/<package></filename>). - A local copy should be available under e.g. + A local copy should be available under e.g. <filename>/usr/share/doc/gtk-doc-tools/examples/Makefile.am</filename>. If you have multiple doc-packages repeat this for each one. </para> @@ -711,7 +690,7 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/libmeep/html <para> The scanner can handle the majority of C headers fine. In the case of receiving warnings from the scanner that look like a special case, one can - hint GTK-Doc to skip over them. + hint GTK-Doc to skip over them. <example><title>GTK-Doc comment block</title> <programlisting><![CDATA[ #ifndef __GTK_DOC_IGNORE__ @@ -725,7 +704,7 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/libmeep/html <title>Limitations</title> <para> Note, that GTK-Doc's supports - <code>#ifndef(__GTK_DOC_IGNORE__)</code> but not + <code>#ifndef(__GTK_DOC_IGNORE__)</code> but not <code>#if !defined(__GTK_DOC_IGNORE__)</code> or other combinations. </para> </note> @@ -862,7 +841,7 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/libmeep/html <para> In older GTK-Doc releases, if you need support for additional formatting, you would need to enable the usage of docbook - XML tags inside doc-comments by putting <option>--xml-mode</option> + XML tags inside doc-comments by putting <option>--xml-mode</option> (or <option>--sgml-mode</option>) in the variable <symbol>MKDB_OPTIONS</symbol> inside <filename>Makefile.am</filename>. </para> @@ -1193,7 +1172,7 @@ foo_get_bar(Foo *foo) Documentation blocks can contain annotation-tags. These tags will be rendered with tooltips describing their meaning. The tags are used by gobject-introspection to generate language bindings. A detailed list - of the supported tags can be found on + of the supported tags can be found on <ulink url="http://live.gnome.org/GObjectIntrospection/Annotations" type="http">the wiki</ulink>. </para> @@ -1778,17 +1757,17 @@ gtk_arrow_get_type In addition a few option elements are created in commented form. You can review these and enable them as you like. </para> - + <para> <example><title>Optional part in the master document</title> <programlisting><![CDATA[ <!-- enable this when you use gobject introspection annotations <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include> - --> + --> ]]></programlisting> </example> </para> - + <para> Finally you need to add new section whenever you introduce one. The <link linkend="modernizing-gtk-doc-1-16">gtkdoc-check</link> tool will @@ -1823,7 +1802,7 @@ gtk_arrow_get_type Blank lines are ignored and lines starting with a '#' are treated as comment lines. </para> - + <note> <para> While the tags make the file look like xml, it is not. Please do not @@ -1966,15 +1945,15 @@ meep_app_get_type <command>GTK_DOC_KEEP_INTERMEDIATE=1 make</command>. </para> </chapter> - + <chapter id="modernizing"> <title>Modernizing the documentation</title> - + <para> GTK-Doc has been around for quite some time. In this section we list new features together with the version since when it is available. </para> - + <sect1 id="modernizing-gtk-doc-1-9"> <title>GTK-Doc 1.9</title> @@ -1982,7 +1961,7 @@ meep_app_get_type When using xml instead of sgml, one can actually name the master document <filename><package>-docs.xml</filename>. </para> - + <para> This version supports <option>SCAN_OPTIONS=--rebuild-sections</option> in <filename>Makefile.am</filename>. When this is enabled, the @@ -1990,10 +1969,10 @@ meep_app_get_type can be removed from the vcs. This only works nicely for projects that have a very regular structure (e.g. each .{c,h} pair will create new section). If one organize a project close to that updating a manually - maintained section file can be as simple as running + maintained section file can be as simple as running <code>meld <package>-decl-list.txt <package>-sections.txt</code>. </para> - + <para> Version 1.8 already introduced the syntax for documenting sections in the sources instead of the separate files under <filename class='directory'>tmpl</filename>. @@ -2004,7 +1983,7 @@ meep_app_get_type add the flag to <filename>configure.ac</filename> and you are done. </para> </sect1> - + <sect1 id="modernizing-gtk-doc-1-10"> <title>GTK-Doc 1.10</title> diff --git a/tests/annotations/docs/Makefile.am b/tests/annotations/docs/Makefile.am index 416b678..7f8a752 100644 --- a/tests/annotations/docs/Makefile.am +++ b/tests/annotations/docs/Makefile.am @@ -24,10 +24,6 @@ SCAN_OPTIONS=--deprecated-guards="GTKDOC_TESTER_DISABLE_DEPRECATED" \ # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS=--xml-mode -# Extra options to supply to gtkdoc-mktmpl -# e.g. MKTMPL_OPTIONS=--only-section-tmpl -MKTMPL_OPTIONS= - # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS= @@ -61,7 +57,7 @@ GTKDOC_CFLAGS = -I$(top_srcdir)/tests/annotations/src $(TEST_DEPS_CFLAGS) GTKDOC_LIBS = $(TEST_DEPS_LIBS) $(top_builddir)/tests/annotations/src/libtester.la # include generic part -include $(top_srcdir)/tests/gtk-doc.notmpl.make +include $(top_srcdir)/tests/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in diff --git a/tests/bugs/docs/Makefile.am b/tests/bugs/docs/Makefile.am index 852e1e9..97c4702 100644 --- a/tests/bugs/docs/Makefile.am +++ b/tests/bugs/docs/Makefile.am @@ -25,10 +25,6 @@ SCAN_OPTIONS=--deprecated-guards="GTKDOC_TESTER_DISABLE_DEPRECATED" \ # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS=--xml-mode -# Extra options to supply to gtkdoc-mktmpl -# e.g. MKTMPL_OPTIONS=--only-section-tmpl -MKTMPL_OPTIONS= - # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS= @@ -62,7 +58,7 @@ GTKDOC_CFLAGS = -I$(top_srcdir)/tests/bugs/src $(TEST_DEPS_CFLAGS) GTKDOC_LIBS = $(TEST_DEPS_LIBS) $(top_builddir)/tests/bugs/src/libtester.la # include generic part -include $(top_srcdir)/tests/gtk-doc.notmpl.make +include $(top_srcdir)/tests/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in diff --git a/tests/empty/docs/Makefile.am b/tests/empty/docs/Makefile.am index 7c183af..4733cb3 100644 --- a/tests/empty/docs/Makefile.am +++ b/tests/empty/docs/Makefile.am @@ -30,10 +30,6 @@ SCAN_OPTIONS=--deprecated-guards="GTKDOC_TESTER_DISABLE_DEPRECATED" \ # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS=--xml-mode -# Extra options to supply to gtkdoc-mktmpl -# e.g. MKTMPL_OPTIONS=--only-section-tmpl -MKTMPL_OPTIONS= - # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS= @@ -67,7 +63,7 @@ GTKDOC_CFLAGS = -I$(top_srcdir)/tests/empty/src $(TEST_DEPS_CFLAGS) GTKDOC_LIBS = $(TEST_DEPS_LIBS) $(top_builddir)/tests/empty/src/libtester.la # include generic part -include $(top_srcdir)/tests/gtk-doc.notmpl.make +include $(top_srcdir)/tests/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in diff --git a/tests/fail/docs/Makefile.am b/tests/fail/docs/Makefile.am index 5a4f164..8210a80 100644 --- a/tests/fail/docs/Makefile.am +++ b/tests/fail/docs/Makefile.am @@ -23,9 +23,6 @@ SCAN_OPTIONS=--deprecated-guards="GTKDOC_TESTER_DISABLE_DEPRECATED" \ # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS= -# Extra options to supply to gtkdoc-mktmpl -# e.g. MKTMPL_OPTIONS=--only-section-tmpl -MKTMPL_OPTIONS= # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS= @@ -60,7 +57,7 @@ GTKDOC_CFLAGS = -I$(top_srcdir)/tests/fail/src $(TEST_DEPS_CFLAGS) GTKDOC_LIBS = $(TEST_DEPS_LIBS) $(top_builddir)/tests/fail/src/libtester.la # include generic part -include $(top_srcdir)/tests/gtk-doc.notmpl.make +include $(top_srcdir)/tests/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in diff --git a/tests/gobject/docs/Makefile.am b/tests/gobject/docs/Makefile.am index bbd4610..3eb5b7e 100644 --- a/tests/gobject/docs/Makefile.am +++ b/tests/gobject/docs/Makefile.am @@ -24,10 +24,6 @@ SCAN_OPTIONS=--deprecated-guards="GTKDOC_TESTER_DISABLE_DEPRECATED" \ # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS=--xml-mode -# Extra options to supply to gtkdoc-mktmpl -# e.g. MKTMPL_OPTIONS=--only-section-tmpl -MKTMPL_OPTIONS= - # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS= @@ -62,7 +58,7 @@ GTKDOC_CFLAGS = -I$(top_srcdir)/tests/gobject/src $(TEST_DEPS_CFLAGS) GTKDOC_LIBS = $(TEST_DEPS_LIBS) $(top_builddir)/tests/gobject/src/libtester.la # include generic part -include $(top_srcdir)/tests/gtk-doc.notmpl.make +include $(top_srcdir)/tests/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in diff --git a/tests/gtk-doc.notmpl.make b/tests/gtk-doc.make index 50480c1..fdccfa0 100644 --- a/tests/gtk-doc.notmpl.make +++ b/tests/gtk-doc.make @@ -55,7 +55,6 @@ CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) \ ts \ gtkdoc-scan.log \ gtkdoc-scangobj.log \ - gtkdoc-mktmpl.log \ gtkdoc-mkdb.log \ gtkdoc-mkhtml.log \ gtkdoc-mkpdf.log \ diff --git a/tests/program/docs/Makefile.am b/tests/program/docs/Makefile.am index 7659310..2bbb4d2 100644 --- a/tests/program/docs/Makefile.am +++ b/tests/program/docs/Makefile.am @@ -24,10 +24,6 @@ SCAN_OPTIONS=--deprecated-guards="GTKDOC_TESTER_DISABLE_DEPRECATED" \ # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS=--xml-mode -# Extra options to supply to gtkdoc-mktmpl -# e.g. MKTMPL_OPTIONS=--only-section-tmpl -MKTMPL_OPTIONS= - # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS= @@ -61,7 +57,7 @@ GTKDOC_CFLAGS = GTKDOC_LIBS = # include generic part -include $(top_srcdir)/tests/gtk-doc.notmpl.make +include $(top_srcdir)/tests/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in diff --git a/tests/tools.sh.in b/tests/tools.sh.in index 232c544..ab9e5cf 100644 --- a/tests/tools.sh.in +++ b/tests/tools.sh.in @@ -10,7 +10,7 @@ echo "Running suite(s): gtk-doc-$suite"; # we can use which here as we override the path in TEST_ENVIRONMENT # test perl scripts -for file in gtkdoc-check gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mktmpl gtkdoc-rebase gtkdoc-scan gtkdoc-scangobj ; do +for file in gtkdoc-check gtkdoc-fixxref gtkdoc-mkdb gtkdoc-rebase gtkdoc-scan gtkdoc-scangobj ; do @PERL@ -cwT `which $file` if test $? = 1 ; then failed=`expr $failed + 1`; fi tested=`expr $tested + 1` |