diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2008-09-11 16:04:06 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2008-09-11 16:38:12 -0400 |
commit | 694fee9e7c3073613359d9734f64f65964c3aa53 (patch) | |
tree | a60831e7b243e9f0cceb3e40749e71d6e2705e31 | |
parent | de5b8bce37f2ddb87fca7ae6b844eec7fbbbc7e9 (diff) | |
download | cairo-694fee9e7c3073613359d9734f64f65964c3aa53.tar.gz |
Update gtk-doc makefile fragment
Also move it to build/.
We still do not call gtkdocize from autogen.sh.
-rw-r--r-- | acinclude.m4 | 1 | ||||
-rwxr-xr-x | autogen.sh | 9 | ||||
-rw-r--r-- | build/Makefile.am.gtk-doc (renamed from gtk-doc.make) | 75 | ||||
-rw-r--r-- | build/configure.ac.tools | 4 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | doc/public/Makefile.am | 6 |
6 files changed, 64 insertions, 34 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 1cadb9ca8..d065e8ef5 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -3,3 +3,4 @@ dnl -*- mode: autoconf -*- dnl [m4_newline] didn't appear until autoconf 2.62 m4_ifdef([m4_newline],,m4_define([m4_newline],[ ])) + diff --git a/autogen.sh b/autogen.sh index 7aedf1da1..800640ad1 100755 --- a/autogen.sh +++ b/autogen.sh @@ -17,6 +17,8 @@ PACKAGE=cairo LIBTOOLIZE_FLAGS="--copy --force --automake" ACLOCAL_FLAGS="-I build" AUTOHEADER=${AUTOHEADER-autoheader} +GTKDOCIZE_FLAGS="--copy" +GTKDOCIZE=${GTKDOCIZE-gtkdocize} AUTOMAKE_FLAGS="--add-missing --gnu -Wall" AUTOCONF=${AUTOCONF-autoconf} @@ -29,7 +31,7 @@ if test "X$CONFIGURE_AC" = X; then fi extract_version() { - grep "^ *$1" $CONFIGURE_AC build/configure.ac.* | sed 's/.*(\[*\([^])]*\)]*).*/\1/' + grep "^ *$1" "$CONFIGURE_AC" | sed 's/.*(\[*\([^])]*\)]*).*/\1/' } autoconf_min_vers=`extract_version AC_PREREQ` @@ -171,6 +173,11 @@ do_cmd $AUTOHEADER touch src/Makefile.am.config touch ChangeLog +# We don't call gtkdocize right now. When we do, we should then modify +# the generated gtk-doc.make and move it to build/Makefile.am.gtk-doc. +# See that file for details. +#do_cmd $GTKDOCIZE $GTKDOCIZE_FLAGS + do_cmd $AUTOMAKE $AUTOMAKE_FLAGS do_cmd $AUTOCONF diff --git a/gtk-doc.make b/build/Makefile.am.gtk-doc index 02fc21878..cb8159919 100644 --- a/gtk-doc.make +++ b/build/Makefile.am.gtk-doc @@ -1,3 +1,8 @@ +# Modified for cairo minimally: +# - Moved to build/ +# - Made it append to EXTRA_DIST and CLEANFILES +# - Instead of all-local, make "doc" build docs, and err if gtk-doc not enabled + # -*- mode: makefile -*- #################################### @@ -5,11 +10,11 @@ #################################### 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) +GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) else -GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) +GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) endif # We set GPATH here; this gives us semantics for GNU make @@ -21,7 +26,7 @@ GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) -EXTRA_DIST = \ +EXTRA_DIST += \ $(content_files) \ $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ @@ -38,16 +43,30 @@ SCANOBJ_FILES = \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals -CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS) +REPORT_FILES = \ + $(DOC_MODULE)-undocumented.txt \ + $(DOC_MODULE)-undeclared.txt \ + $(DOC_MODULE)-unused.txt + +CLEANFILES += $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) if ENABLE_GTK_DOC doc: html-build.stamp +else +doc: + @echo "*** gtk-doc must be installed and enabled in order to make doc" + @false +endif + +docs: html-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo 'gtk-doc: Scanning header files' @-chmod -R u+w $(srcdir) + cd $(srcdir) && \ + gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ else \ @@ -56,11 +75,9 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) test -f $$i || touch $$i ; \ done \ fi - 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 $(SCANOBJ_FILES): scan-build.stamp +$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### @@ -74,9 +91,13 @@ tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections tmpl.stamp: tmpl-build.stamp @true +tmpl/*.sgml: + @true + + #### xml #### -sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml $(expand_content_files) +sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) @echo 'gtk-doc: Building XML' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ @@ -88,23 +109,16 @@ sgml.stamp: sgml-build.stamp #### html #### -dist-hook-local: html-build.stamp - 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 + rm -rf $(srcdir)/html mkdir $(srcdir)/html cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) - @echo 'gtk-doc: Fixing cross-references' + @echo 'gtk-doc: Fixing cross-references' cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) touch html-build.stamp -else -doc: - @echo "*** gtk-doc must be installed and enabled in order to make doc" - @false -endif ############## @@ -112,11 +126,16 @@ clean-local: rm -f *~ *.bak rm -rf .libs +distclean-local: + cd $(srcdir) && \ + rm -rf xml $(REPORT_FILES) \ + $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + maintainer-clean-local: clean - cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + cd $(srcdir) && rm -rf xml html install-data-local: - installfiles=`echo $(srcdir)/html/*`; \ + -installfiles=`echo $(srcdir)/html/*`; \ if test "$$installfiles" = '$(srcdir)/html/*'; \ then echo '-- Nothing to install' ; \ else \ @@ -127,7 +146,10 @@ install-data-local: done; \ echo '-- Installing $(srcdir)/html/index.sgml' ; \ $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \ + which gtkdoc-rebase >/dev/null && \ + gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) ; \ fi + uninstall-local: rm -f $(DESTDIR)$(TARGET_DIR)/* @@ -149,9 +171,10 @@ dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/html -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl -cp $(srcdir)/xml/*.xml $(distdir)/xml - -cp $(srcdir)/html/* $(distdir)/html - if test -f $(srcdir)/$(DOC_MODULE).types; then \ - cp $(srcdir)/$(DOC_MODULE).types $(distdir)/$(DOC_MODULE).types; \ - fi + cp $(srcdir)/html/* $(distdir)/html + -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 -.PHONY : dist-hook-local +.PHONY : dist-hook-local docs diff --git a/build/configure.ac.tools b/build/configure.ac.tools index d2b11c839..a24dbcecb 100644 --- a/build/configure.ac.tools +++ b/build/configure.ac.tools @@ -2,14 +2,10 @@ AC_PATH_PROG(FIND, find) AC_PATH_PROG(XARGS, xargs) -GTK_DOC_CHECK([1.6]) - AC_PROG_CC AC_PROG_CPP AC_PROG_CXX dnl required for BeOS (and cannot be a conditional dependency) AM_PROG_CC_C_O -AC_LIBTOOL_WIN32_DLL -AC_PROG_LIBTOOL dnl required version (1.4) DON'T REMOVE! AC_C_INLINE dnl =========================================================================== diff --git a/configure.ac b/configure.ac index fbf52a5ee..2f211cf69 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,9 @@ AC_CONFIG_HEADERS(config.h) AC_CONFIG_AUX_DIR(build) AC_CONFIG_MACRO_DIR(build) AM_INIT_AUTOMAKE([1.8 gnu -Wall no-define]) +AC_LIBTOOL_WIN32_DLL dnl Must be called before AC_PROG_LIBTOOL +AC_PROG_LIBTOOL([1.4]) +GTK_DOC_CHECK([1.6]) dnl =========================================================================== dnl diff --git a/doc/public/Makefile.am b/doc/public/Makefile.am index cc0bbbaee..e5ed28fe5 100644 --- a/doc/public/Makefile.am +++ b/doc/public/Makefile.am @@ -42,14 +42,14 @@ HTML_IMAGES = # Extra options to supply to gtkdoc-fixref FIXXREF_OPTIONS= -include $(top_srcdir)/gtk-doc.make +include $(top_srcdir)/build/Makefile.am.gtk-doc + +dist-hook: doc # Version information for marking the documentation EXTRA_DIST += version.xml.in -if ENABLE_GTK_DOC check: doc -endif TESTS_ENVIRONMENT = srcdir="$(srcdir)" top_srcdir="$(top_srcdir)" MAKE="$(MAKE)" TESTS += check-doc-coverage.sh check-doc-syntax.sh |