From c79f1de3bc1f98b85f82613c23051281c0f20f9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Benoit=20Gr=C3=A9goire?= <benoitg@coeus.ca>
Date: Mon, 25 Feb 2008 17:46:09 -0500
Subject: [PATCH] More doxygen improvement for trac integration

---
 Makefile.am                    |  6 +++++-
 doc/doxygen/Makefile.am        | 26 +++++++++++++++++++++-----
 doc/doxygen/blank.html         |  1 +
 doc/doxygen/core-doc.cfg.in    |  8 ++++----
 doc/doxygen/gtk-gui-doc.cfg.in |  6 +++---
 5 files changed, 34 insertions(+), 13 deletions(-)
 create mode 100644 doc/doxygen/blank.html

diff --git a/Makefile.am b/Makefile.am
index 261c7cea34..02eff273de 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,4 +8,8 @@ EXTRA_DIST = m4/*.m4 tools/*.sh platform/* images/* README.gentoo
 
 .PHONY: doc
 doc:
-	$(MAKE) -C doc doc
\ No newline at end of file
+	$(MAKE) -C doc doc
+
+.PHONY: doxygen-trac
+doxygen-trac:
+	$(MAKE) -C doc/doxygen doxygen-trac
\ No newline at end of file
diff --git a/doc/doxygen/Makefile.am b/doc/doxygen/Makefile.am
index 46ffcba13b..a1a0473e7c 100644
--- a/doc/doxygen/Makefile.am
+++ b/doc/doxygen/Makefile.am
@@ -2,12 +2,22 @@ SUBDIRS =
 
 docdir = ${prefix}/share/doc/wifidog-@VERSION@
 html_parent_dir = .
+HTML_HEADER = 
+HTML_FOOTER = 
 
 all:
 
-doc: core-doc gtk-gui-doc
+.PHONY: doxygen-trac
+
+doxygen-trac: clean core-doc-trac gtk-gui-doc-trac
+
+%-doc-trac : %-doc
+	ln -s ${html_parent_dir}/$< ${html_parent_dir}/$</html
+
+doc: clean core-doc gtk-gui-doc
+
 %-doc : %-doc.cfg
-	rm -rf $@-html/ refman.pdf
+	rm -rf $@/ refman.pdf
 	$(DOXYGEN) $<
 #	$(MAKE) -C latex/ 
 #	mv latex/refman.pdf ./refman.pdf
@@ -16,7 +26,7 @@ doc: core-doc gtk-gui-doc
 clean-local:
 	echo "clean-local: " && pwd
 	rm -rf latex/
-	rm -rf ${html_parent_dir}/*-html/
+	rm -rf ${html_parent_dir}/*-doc/
 	rm -f *~
 	rm -f doxygen.log
 	rm -f doxygen.cfg
@@ -34,6 +44,12 @@ maintainer-clean-local: clean-local
 	sed < $< > $@.tmp \
             -e 's:@-top_srcdir-@:${top_srcdir}:g'
 	sed < $@.tmp > $@.tmp2 \
-            -e 's:@-htmldir-@:${html_parent_dir}/$*-html:g'
+            -e 's:@-html_dir-@:${html_parent_dir}/$*:g'
 	rm $@.tmp
-	mv $@.tmp2 $@
\ No newline at end of file
+	sed < $@.tmp2 > $@.tmp3 \
+            -e 's:@-html_header-@:${HTML_HEADER}:g'
+	rm $@.tmp2
+	sed < $@.tmp3 > $@.tmp4 \
+            -e 's:@-html_footer-@:${HTML_FOOTER}:g'
+	rm $@.tmp3
+	mv $@.tmp4 $@
\ No newline at end of file
diff --git a/doc/doxygen/blank.html b/doc/doxygen/blank.html
new file mode 100644
index 0000000000..8d1c8b69c3
--- /dev/null
+++ b/doc/doxygen/blank.html
@@ -0,0 +1 @@
+ 
diff --git a/doc/doxygen/core-doc.cfg.in b/doc/doxygen/core-doc.cfg.in
index 964a4bbe77..5a0c249fc8 100644
--- a/doc/doxygen/core-doc.cfg.in
+++ b/doc/doxygen/core-doc.cfg.in
@@ -4,7 +4,7 @@
 # Project related configuration options
 #---------------------------------------------------------------------------
 DOXYFILE_ENCODING      = UTF-8
-PROJECT_NAME           = SFLPhone Core engine
+PROJECT_NAME           = SFLPhone Core
 PROJECT_NUMBER         = 
 OUTPUT_DIRECTORY       = 
 CREATE_SUBDIRS         = NO
@@ -111,10 +111,10 @@ IGNORE_PREFIX          =
 # configuration options related to the HTML output
 #---------------------------------------------------------------------------
 GENERATE_HTML          = YES
-HTML_OUTPUT            = @-htmldir-@
+HTML_OUTPUT            = @-html_dir-@
 HTML_FILE_EXTENSION    = 
-HTML_HEADER            = 
-HTML_FOOTER            = 
+HTML_HEADER            = @-html_header-@
+HTML_FOOTER            = @-html_footer-@
 HTML_STYLESHEET        = 
 HTML_ALIGN_MEMBERS     = YES
 GENERATE_HTMLHELP      = NO
diff --git a/doc/doxygen/gtk-gui-doc.cfg.in b/doc/doxygen/gtk-gui-doc.cfg.in
index 1d3f065d2c..caa00e1bbb 100644
--- a/doc/doxygen/gtk-gui-doc.cfg.in
+++ b/doc/doxygen/gtk-gui-doc.cfg.in
@@ -111,10 +111,10 @@ IGNORE_PREFIX          =
 # configuration options related to the HTML output
 #---------------------------------------------------------------------------
 GENERATE_HTML          = YES
-HTML_OUTPUT            = @-htmldir-@
+HTML_OUTPUT            = @-html_dir-@
 HTML_FILE_EXTENSION    = 
-HTML_HEADER            = 
-HTML_FOOTER            = 
+HTML_HEADER            = @-html_header-@
+HTML_FOOTER            = @-html_footer-@
 HTML_STYLESHEET        = 
 HTML_ALIGN_MEMBERS     = YES
 GENERATE_HTMLHELP      = NO
-- 
GitLab