[mm-common] Do not append slash to DOXYGEN_TAGFILES locations
- From: Daniel Elstner <daniel src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [mm-common] Do not append slash to DOXYGEN_TAGFILES locations
- Date: Tue, 18 Aug 2009 20:42:59 +0000 (UTC)
commit e1a5f762caff6c53f19b933c0fdb70a14319b0c0
Author: Daniel Elstner <danielk openismus com>
Date: Tue Aug 18 20:29:54 2009 +0200
Do not append slash to DOXYGEN_TAGFILES locations
* build/doc-reference.am (dist_devhelpDATA_INSTALL): Strip trailing
slash from $(htmlrefdir), if there is one.
(dh_xsl_params): Strip trailing slash from $(htmlrefpub).
* macros/mm-doc.m4 (_MM_ARG_WITH_TAGFILE_DOC): Strip the trailing
slash from $mm_htmlrefdir and $mm_htmlrefpub if there is one, instead
of appending one. Do append the slash to the locations listed in the
DOCINSTALL_FLAGS output variable, but omit it for DOXYGEN_TAGFILES.
Apparently Doxygen is not trying to be smart when it automatically
appends a trailing slash to the external documentation base paths.
Rather, it just mindlessly appends it no matter what, ending up with
a double slash if there already was one.
build/doc-reference.am | 8 ++++----
macros/mm-doc.m4 | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/build/doc-reference.am b/build/doc-reference.am
index 8a01a1f..848a462 100644
--- a/build/doc-reference.am
+++ b/build/doc-reference.am
@@ -25,8 +25,8 @@
# is located, including the trailing slash.
pubdocbase ?= http://www.gtkmm.org/docs/
-# The URL of the module's online HTML reference documentation,
-# preferably including the trailing slash for consistency.
+# The URL of the module's online HTML reference documentation, which
+# may or may not end in a trailing slash.
htmlrefpub ?= $(pubdocbase)$(book_name)/reference/html/
# The title of the generated Devhelp book.
@@ -83,7 +83,7 @@ htmlref_install = $(doc_install_cmd) $(subst @$(datarootdir)/doc/,@../../../,$(D
# Note that this is not a documented feature as far as I'm aware, but
# Automake recognizes the override and does not try to assign its own
# default value.
-dist_devhelpDATA_INSTALL = $(doc_install_cmd) --book-base='$(htmlrefdir)/' -T --
+dist_devhelpDATA_INSTALL = $(doc_install_cmd) --book-base='$(htmlrefdir:/=)' -T --
# Helper variables to replicate each pattern with a $(srcdir)/ prefix.
# Also add quoting to prevent the shell from expanding the patterns.
@@ -96,7 +96,7 @@ htmlref_find_patterns = $(patsubst %,-name '%' -o,$(notdir $(htmlref_patterns))
# The parameters to the Doxygen-to-Devhelp XSLT script
dh_xsl_params = --stringparam book_title '$(book_title)' \
--stringparam book_name '$(book_name)' \
- --stringparam book_base '$(htmlrefpub)'
+ --stringparam book_base '$(htmlrefpub:/=)'
# Regenerate the documentation automatically only in maintainer mode.
if MAINTAINER_MODE
diff --git a/macros/mm-doc.m4 b/macros/mm-doc.m4
index 55f47ad..e5b4530 100644
--- a/macros/mm-doc.m4
+++ b/macros/mm-doc.m4
@@ -181,10 +181,10 @@ m4_ifval([$4], [dnl
mm_doxytagfile=`$PKG_CONFIG --variable=doxytagfile "$4" 2>&AS_MESSAGE_LOG_FD`
test "x$mm_doxytagfile" = x || mm_tagpath=$mm_doxytagfile
])
- # Append a trailing slash to the location, if needed
- AS_CASE([/$mm_htmlrefpub], [[*[\\/]]],, [mm_htmlrefpub=$mm_htmlrefpub/])
+ # Remove any trailing slashes from the location
+ mm_htmlrefpub=`[expr "X$mm_htmlrefpub" : 'X\(.*[^\\/]\)[\\/]*' 2>&]AS_MESSAGE_LOG_FD`
])[]dnl
- AS_CASE([/$mm_htmlrefdir], [[*[\\/]]],, [mm_htmlrefdir=$mm_htmlrefdir/])
+ mm_htmlrefdir=`[expr "X$mm_htmlrefdir" : 'X\(.*[^\\/]\)[\\/]*' 2>&]AS_MESSAGE_LOG_FD`
AC_MSG_RESULT([$mm_tagpath $mm_htmlrefdir])
@@ -193,8 +193,8 @@ m4_ifval([$4], [dnl
AS_IF([test "x$mm_htmlrefdir" = x],
[AC_MSG_WARN([Location of external $1 documentation not set])],
[AS_IF([test "x$DOCINSTALL_FLAGS" = x],
- [DOCINSTALL_FLAGS="-l '$mm_tagname $mm_htmlrefdir'"],
- [DOCINSTALL_FLAGS="$DOCINSTALL_FLAGS -l '$mm_tagname $mm_htmlrefdir'"])])
+ [DOCINSTALL_FLAGS="-l '$mm_tagname $mm_htmlrefdir/'"],
+ [DOCINSTALL_FLAGS="$DOCINSTALL_FLAGS -l '$mm_tagname $mm_htmlrefdir/'"])])
AS_IF([test "x$mm_$2" = x], [mm_val=$mm_tagpath], [mm_val="$mm_tagpath=$mm_$2"])
AS_IF([test "x$DOXYGEN_TAGFILES" = x],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]