diff options
author | Simon Josefsson <simon@josefsson.org> | 2011-11-20 21:40:48 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2011-11-20 22:01:36 +0100 |
commit | 83db2be6d126aafcd3641cec42cbfb3c76ff76e6 (patch) | |
tree | b383069e49bab15bfca9e7851c6b3fb0b7f469f9 | |
parent | f1744a0b833fa8f4792c01a11d82b6525b237d3c (diff) | |
download | libtasn1-83db2be6d126aafcd3641cec42cbfb3c76ff76e6.tar.gz libtasn1-83db2be6d126aafcd3641cec42cbfb3c76ff76e6.tar.bz2 libtasn1-83db2be6d126aafcd3641cec42cbfb3c76ff76e6.zip |
Update GTK-DOC infrastructure.
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | cfg.mk | 9 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | doc/reference/Makefile.am | 23 | ||||
-rw-r--r-- | doc/reference/libtasn1-docs.sgml | 28 | ||||
-rw-r--r-- | doc/reference/version.xml.in | 1 | ||||
-rw-r--r-- | gtk-doc.make | 186 | ||||
-rw-r--r-- | m4/gtk-doc.m4 | 6 |
8 files changed, 166 insertions, 90 deletions
@@ -64,11 +64,13 @@ doc/reference/libtasn1.types doc/reference/pdf-build.stamp doc/reference/pdf.stamp doc/reference/scan-build.stamp +doc/reference/setup-build.stamp doc/reference/sgml-build.stamp doc/reference/sgml.stamp doc/reference/tmpl-build.stamp doc/reference/tmpl.stamp doc/reference/tmpl/ +doc/reference/version.xml doc/reference/xml/ doc/stamp-vti doc/texi/ @@ -34,11 +34,12 @@ local-checks-to-skip = sc_prohibit_strcmp sc_prohibit_have_config_h \ VC_LIST_ALWAYS_EXCLUDE_REGEX = ^(maint.mk|build-aux/|gl/.*|lib/gllib/.*|lib/glm4/.*|lib/ASN1\.c|m4/pkg.m4|doc/gdoc|windows/.*|doc/fdl-1.3.texi|build-aux/pmccabe2html|build-aux/pmccabe.css)$$ # Explicit syntax-check exceptions. -exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/TestIndef.p12$ -exclude_file_name_regexp--sc_GPL_version = ^lib/libtasn1.h$ +exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/TestIndef.p12$$ +exclude_file_name_regexp--sc_GPL_version = ^lib/libtasn1.h$$ exclude_file_name_regexp--sc_program_name = ^tests/|examples/ -exclude_file_name_regexp--sc_prohibit_atoi_atof = ^src/asn1Coding.c|src/asn1Decoding.c$ -exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/crlf.cer|tests/TestIndef.p12$ +exclude_file_name_regexp--sc_prohibit_atoi_atof = ^src/asn1Coding.c|src/asn1Decoding.c$$ +exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/crlf.cer|tests/TestIndef.p12$$ +exclude_file_name_regexp--sc_space_tab = ^gtk-doc.make$$ bootstrap-tools := autoconf,automake,libtool,bison gpg_key_ID = b565716f diff --git a/configure.ac b/configure.ac index 6353287..969755b 100644 --- a/configure.ac +++ b/configure.ac @@ -102,6 +102,7 @@ AC_CONFIG_FILES([ doc/Makefile doc/cyclo/Makefile doc/reference/Makefile + doc/reference/version.xml examples/Makefile gl/Makefile lib/Makefile diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am index 2c382f6..c6e3aed 100644 --- a/doc/reference/Makefile.am +++ b/doc/reference/Makefile.am @@ -18,10 +18,10 @@ DOC_MODULE=$(PACKAGE) # The top-level SGML file. You can change this if you want to. DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml -# Directories containing the source code, relative to $(srcdir). +# Directories containing the source code. # gtk-doc will search all .c and .h files beneath these paths # for inline comments documenting functions and macros. -# e.g. DOC_SOURCE_DIR=../../../gtk ../../../gdk +# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk DOC_SOURCE_DIR=../../lib # Extra options to pass to gtkdoc-scangobj. Not normally needed. @@ -33,8 +33,8 @@ SCAN_OPTIONS=--ignore-decorators=ASN1_API \ --deprecated-guards=ASN1_DISABLE_DEPRECATED # Extra options to supply to gtkdoc-mkdb. -# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml -MKDB_OPTIONS=--sgml-mode --output-format=xml +# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml +MKDB_OPTIONS=--xml-mode --output-format=xml # Extra options to supply to gtkdoc-mktmpl # e.g. MKTMPL_OPTIONS=--only-section-tmpl @@ -57,9 +57,9 @@ CFILE_GLOB=$(top_srcdir)/lib/*.c # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h EXTRA_HFILES= -# Header files to ignore when scanning. Use base file name, no paths -# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h -IGNORE_HFILES=int.h parser_aux.h structure.h element.h gstr.h gllib +# Header files or dirs to ignore when scanning. Use base file/dir names +# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code +IGNORE_HFILES=element.h gstr.h int.h parser_aux.h structure.h gllib # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png @@ -94,8 +94,13 @@ EXTRA_DIST += # for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt #DISTCLEANFILES += -# Comment this out if you want your docs-status tested during 'make check' +# Comment this out if you want 'make check' to test you doc status +# and run some sanity checks if ENABLE_GTK_DOC -#TESTS_ENVIRONMENT = cd $(srcsrc) && +TESTS_ENVIRONMENT = cd $(srcdir) && \ + DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ + SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) #TESTS = $(GTKDOC_CHECK) endif + +-include $(top_srcdir)/git.mk diff --git a/doc/reference/libtasn1-docs.sgml b/doc/reference/libtasn1-docs.sgml index ee3b3af..3a7f351 100644 --- a/doc/reference/libtasn1-docs.sgml +++ b/doc/reference/libtasn1-docs.sgml @@ -1,12 +1,21 @@ <?xml version="1.0"?> -<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" - "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> -<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude"> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" + "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" +[ + <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'"> + <!ENTITY version SYSTEM "version.xml"> +]> +<book id="index"> <bookinfo> <title>GNU Libtasn1 API Reference Manual</title> + <releaseinfo> + for GNU Libtasn1 &version;. + The latest version of this documentation can be found on-line at + <ulink role="online-location" url="https://www.gnu.org/software/libtasn1/reference/">https://www.gnu.org/software/libtasn1/reference/</ulink>. + </releaseinfo> </bookinfo> - <chapter> + <chapter id="intro"> <title>GNU Libtasn1 API Reference Manual</title> <para> @@ -17,15 +26,16 @@ <para> More up to date information can be found at - <ulink url="http://www.gnu.org/software/libtasn1/"> - http://www.gnu.org/software/libtasn1/</ulink>. + <ulink url="https://www.gnu.org/software/libtasn1/"> + https://www.gnu.org/software/libtasn1/</ulink>. </para> <xi:include href="xml/libtasn1.xml"/> - </chapter> - <index> - <title>Index</title> + </chapter> + <index id="api-index-full"> + <title>API Index</title> + <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include> </index> <index role="deprecated"> <title>Index of deprecated symbols</title> diff --git a/doc/reference/version.xml.in b/doc/reference/version.xml.in new file mode 100644 index 0000000..d78bda9 --- /dev/null +++ b/doc/reference/version.xml.in @@ -0,0 +1 @@ +@VERSION@ diff --git a/gtk-doc.make b/gtk-doc.make index 7d7a922..1f75dfd 100644 --- a/gtk-doc.make +++ b/gtk-doc.make @@ -5,12 +5,12 @@ #################################### if GTK_DOC_USE_LIBTOOL -GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +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) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +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 @@ -23,20 +23,22 @@ GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) -EXTRA_DIST = \ +SETUP_FILES = \ $(content_files) \ - $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt -DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ - pdf-build.stamp \ - $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp \ - $(srcdir)/pdf.stamp +EXTRA_DIST = \ + $(HTML_IMAGES) \ + $(SETUP_FILES) + +DOC_STAMPS=setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ + html-build.stamp pdf-build.stamp \ + tmpl.stamp sgml.stamp html.stamp pdf.stamp -SCANOBJ_FILES = \ - $(DOC_MODULE).args \ +SCANOBJ_FILES = \ + $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ @@ -70,22 +72,47 @@ docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp +#### setup #### + +setup-build.stamp: + -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + echo ' DOC Preparing build'; \ + files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ + if test "x$$files" != "x" ; then \ + for file in $$files ; do \ + test -f $(abs_srcdir)/$$file && \ + cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \ + done; \ + fi; \ + test -d $(abs_srcdir)/tmpl && \ + { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \ + chmod -R u+w $(abs_builddir)/tmpl; } \ + fi + @touch setup-build.stamp + #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) - @echo 'gtk-doc: Scanning header files' - @-chmod -R u+w $(srcdir) - @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ + @echo ' DOC Scanning header files' + @_source_dir='' ; \ + for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - cd $(srcdir) && \ - gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) - @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ + done ; \ + gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) + @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ + echo " DOC Introspecting gobjects"; \ + 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 \ - cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ - test -f $$i || touch $$i ; \ + test -f $$i || touch $$i ; \ done \ fi @touch scan-build.stamp @@ -95,10 +122,14 @@ $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE) #### templates #### -tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(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) +tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt + @echo ' DOC Rebuilding template files' + @gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) + @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + if test -w $(abs_srcdir) ; then \ + cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \ + fi \ + fi @touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @@ -110,13 +141,13 @@ $(srcdir)/tmpl/*.sgml: #### xml #### sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) - @echo 'gtk-doc: Building XML' + @echo ' DOC Building XML' @-chmod -R u+w $(srcdir) - @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ + @_source_dir='' ; \ + for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - cd $(srcdir) && \ - 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) + 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) @touch sgml-build.stamp sgml.stamp: sgml-build.stamp @@ -125,58 +156,79 @@ sgml.stamp: sgml-build.stamp #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo 'gtk-doc: Building HTML' - @-chmod -R u+w $(srcdir) - @rm -rf $(srcdir)/html - @mkdir $(srcdir)/html + @echo ' DOC Building 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=--path="$(srcdir)"; \ + mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ - cd $(srcdir)/html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) - @echo 'gtk-doc: Fixing cross-references' - @cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + 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 \ + if test -f $(abs_srcdir)/$$file ; then \ + cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ + fi; \ + if test -f $(abs_builddir)/$$file ; then \ + cp $(abs_builddir)/$$file $(abs_builddir)/html; \ + fi; \ + done; + @echo ' DOC Fixing cross-references' + @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @touch html-build.stamp #### pdf #### pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo 'gtk-doc: Building PDF' - @-chmod -R u+w $(srcdir) - @rm -rf $(srcdir)/$(DOC_MODULE).pdf - @mkpdf_imgdirs=""; \ + @echo ' DOC Building 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_imgdirs | grep >/dev/null "\-\-imgdir=$$part "; \ + echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ - mkpdf_imgdirs="$$mkpdf_imgdirs --imgdir=$$part"; \ + mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ - cd $(srcdir) && gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) + gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) @touch pdf-build.stamp ############## clean-local: - rm -f *~ *.bak - rm -rf .libs + @rm -f *~ *.bak + @rm -rf .libs distclean-local: - cd $(srcdir) && \ - rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \ - $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + @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) $(expand_content_files) $(DOC_MODULE).types; \ + rm -rf tmpl; \ + fi maintainer-clean-local: clean - cd $(srcdir) && rm -rf xml html + @rm -rf xml html install-data-local: - @installfiles=`echo $(srcdir)/html/*`; \ - if test "$$installfiles" = '$(srcdir)/html/*'; \ - then echo '-- Nothing to install' ; \ + @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)"; \ @@ -185,14 +237,12 @@ install-data-local: fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ - echo '-- Installing '$$i ; \ + 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; \ - mv -f $${installdir}/$(DOC_MODULE).devhelp \ - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi @@ -217,14 +267,14 @@ dist-check-gtkdoc: endif dist-hook: dist-check-gtkdoc dist-hook-local - mkdir $(distdir)/tmpl - mkdir $(distdir)/html - -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl - cp $(srcdir)/html/* $(distdir)/html - -cp $(srcdir)/$(DOC_MODULE).pdf $(distdir)/ - -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ - -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ - cd $(distdir) && rm -f $(DISTCLEANFILES) - $(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html + @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)/ + @-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/m4/gtk-doc.m4 b/m4/gtk-doc.m4 index 2cfa1e7..0ada151 100644 --- a/m4/gtk-doc.m4 +++ b/m4/gtk-doc.m4 @@ -6,6 +6,7 @@ dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) AC_DEFUN([GTK_DOC_CHECK], [ + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first @@ -33,6 +34,11 @@ AC_DEFUN([GTK_DOC_CHECK], AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], [PKG_CHECK_EXISTS([gtk-doc >= $1],, AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) + dnl don't check for glib if we build glib + if test "x$PACKAGE_NAME" != "xglib"; then + dnl don't fail if someone does not have glib + PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,) + fi fi AC_MSG_CHECKING([whether to build gtk-doc documentation]) |