* doc/Makefile.am (edit)
($(srcdir)/user-refman.stamp)
($(srcdir)/devel-refman.stamp):
Use `[@]' instead of `\@' for portability reasons.
(ID): New (empty).
(edit_devel): Prevent configure from expanding @builddir@.
Christen the product as ``Developer documentation''.
($(DOXYFILE_USER), $(DOXYFILE_DEVEL)): Do not depend on $Id$ from
ChangeLog.
* doc/Doxyfile.in (PROJECT_NUMBER): Reintegrate @ID@ to the
project number, even if it is not yet set.
---
milena/ChangeLog | 16 +++++++++++++++
milena/doc/Doxyfile.in | 2 +-
milena/doc/Makefile.am | 51 ++++++++++++++++++++++++------------------------
3 files changed, 42 insertions(+), 27 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index f7fb36d..386b20e 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,19 @@
+2013-08-23 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Improve the generation of Doxyfiles in Milena.
+
+ * doc/Makefile.am (edit)
+ ($(srcdir)/user-refman.stamp)
+ ($(srcdir)/devel-refman.stamp):
+ Use `[@]' instead of `\@' for portability reasons.
+ (ID): New (empty).
+ (edit_devel): Prevent configure from expanding @builddir@.
+ Christen the product as ``Developer documentation''.
+ ($(DOXYFILE_USER), $(DOXYFILE_DEVEL)): Do not depend on $Id$ from
+ ChangeLog.
+ * doc/Doxyfile.in (PROJECT_NUMBER): Reintegrate @ID@ to the
+ project number, even if it is not yet set.
+
2013-08-26 Roland Levillain <roland(a)lrde.epita.fr>
Run FFT unit tests only when FFTW3 support is enabled.
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index fbae58b..7a70e8d 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -32,7 +32,7 @@ PROJECT_NAME = "Milena"
# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER = "User documentation @PACKAGE_VERSION@"
+PROJECT_NUMBER = "User documentation @PACKAGE_VERSION@ @ID@"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index 44e4211..6fe6873 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -209,26 +209,27 @@ regen-doc:
DOXYFILE_USER = Doxyfile_user
-# Sed is used to generate Doxyfile from Doxyfile.in instead of
-# configure, because the former is way faster than the latter.
-#
-## FIXME: This is because, as in TC, we depend on $Id$ from the
-## ChangeLog. Maybe we should depend from something less prone to
-## change. See Bison's build system.
-edit = sed -e "s|@ID@|$$Id|" \
- -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
- -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
- -e 's,@top_srcdir\@,$(top_srcdir),g' \
- -e 's,@abs_top_srcdir\@,$(abs_top_srcdir),g' \
- -e 's,@top_builddir\@,$(top_builddir),g' \
- -e 's,@srcdir\@,$(srcdir),g' \
- -e 's,@builddir\@,$(builddir),g' \
- -e 's,@boostcppflags\@,$(BOOST_CPPFLAGS),g'
+## FIXME: We used to depend on Subversion's $Id$ (extracted from
+## ChangeLog) before. We should depend on something less prone to
+## change from now on. The best is probably to use `git-version-gen'
+## from Gnulib (as Bison does). For the moment, set ID to an empty
+## string.
+ID =
+# Use Make to generate Doxyfile instead of `configure', as advised by
+# Autoconf's manual (see section ``Installation Directory
+# Variables'').
+edit = sed -e "s|@ID[@]|$(ID)|" \
+ -e 's,@PACKAGE_NAME[@],$(PACKAGE_NAME),g' \
+ -e 's,@PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \
+ -e 's,@top_srcdir[@],$(top_srcdir),g' \
+ -e 's,@abs_top_srcdir[@],$(abs_top_srcdir),g' \
+ -e 's,@top_builddir[@],$(top_builddir),g' \
+ -e 's,@srcdir[@],$(srcdir),g' \
+ -e 's,@builddir[@],$(builddir),g' \
+ -e 's,@boostcppflags[@],$(BOOST_CPPFLAGS),g'
$(DOXYFILE_USER): $(srcdir)/$(DOXYFILE).in
- Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog \
- | sed -e 's/\\\$$//g'`; \
- $(edit) $< >$@
+ $(edit) $< >$@
MAINTAINERCLEANFILES += $(DOXYFILE_USER)
USER_REFMAN = user-refman
@@ -262,8 +263,8 @@ $(srcdir)/user-refman.stamp: $(srcdir)/$(DOXYFILE).in $(REFMAN_deps)
rm -rf $(srcdir)/$(USER_REFMAN)
## Fix path to the main page of the documentation.
find $(USER_REFMAN).tmp -name '*.html' -exec \
- perl -pi -e "s,\@relcommondocpath\@,../../../../doc/,g;" \
- -e "s,\@userrefman\@,$(USER_REFMAN),g" \
+ perl -pi -e "s,@relcommondocpath[@],../../../../doc/,g;" \
+ -e "s,@userrefman[@],$(USER_REFMAN),g" \
{} \;
## FIXME: Moving directories between file systems is not portable.
mv $(USER_REFMAN).tmp $(srcdir)/$(USER_REFMAN)
@@ -298,7 +299,7 @@ regen-devel-doc:
DOXYFILE_DEVEL = Doxyfile_devel
edit_devel = sed \
- -e 's,OUTPUT_DIRECTORY = @builddir@/user-refman.tmp,OUTPUT_DIRECTORY =
@builddir@/devel-refman.tmp,' \
+ -e 's,OUTPUT_DIRECTORY = \(.*\)/user-refman.tmp,OUTPUT_DIRECTORY =
\1/devel-refman.tmp,' \
-e 's,EXTRACT_ALL = NO,EXTRACT_ALL = YES,' \
-e 's,EXTRACT_PRIVATE = NO,EXTRACT_PRIVATE = YES,' \
-e 's,EXTRACT_STATIC = NO,EXTRACT_STATIC = YES,' \
@@ -309,14 +310,12 @@ edit_devel = sed \
-e 's,HIDE_IN_BODY_DOCS = YES,HIDE_IN_BODY_DOCS = NO,' \
-e 's,INTERNAL_DOCS = NO,INTERNAL_DOCS = YES,' \
-e 's,GENERATE_TODOLIST = NO,GENERATE_TODOLIST = YES,' \
- -e 's,PROJECT_NUMBER = \"User documentation ,PROJECT_NUMBER =
\",' \
+ -e 's,PROJECT_NUMBER = \"User documentation ,PROJECT_NUMBER =
\"Developer documentation ,' \
-e 's,EXCLUDE_SYMBOLS = \*::internal\* \*_ mln::trait::\*,EXCLUDE_SYMBOLS
=,'
$(DOXYFILE_DEVEL): $(srcdir)/$(DOXYFILE).in
rm -f $@.tmp
- Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog \
- | sed -e 's/\\\$$//g'`; \
- $(edit) $< >$@.tmp
+ $(edit) $< >$@.tmp
$(edit_devel) $@.tmp >$@
rm -f $@.tmp
MAINTAINERCLEANFILES += $(DOXYFILE_DEVEL)
@@ -350,7 +349,7 @@ $(srcdir)/devel-refman.stamp: $(srcdir)/$(DOXYFILE).in $(REFMAN_deps)
rm -rf $(srcdir)/$(DEVEL_REFMAN)
## Fix path to the main page of the documentation.
perl -pi \
- -e "s,\@relcommondocpath\@,$(top_srcdir)/doc/$(DEVEL_REFMAN)/html/,g" \
+ -e "s,@relcommondocpath[@],$(top_srcdir)/doc/$(DEVEL_REFMAN)/html/,g" \
$(DEVEL_REFMAN).tmp/html/index.html
## FIXME: Moving directories between file systems is not portable.
mv $(DEVEL_REFMAN).tmp $(srcdir)/$(DEVEL_REFMAN)
--
1.7.10.4