public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
* Fixed javadoc generation and created html manpages
@ 2008-03-13 16:04 Mark Wielaard
  2008-03-13 17:49 ` Mark Wielaard
  2008-03-17 11:00 ` Mark Wielaard
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Wielaard @ 2008-03-13 16:04 UTC (permalink / raw)
  To: frysk; +Cc: Andrew Cagney

[-- Attachment #1: Type: text/plain, Size: 1678 bytes --]

Hi,

This patch fixes the generation of javadoc by using the javadoc that
comes with icedtea/openjdk. It misses some of the nice features of
gjdoc, but it looks like it will at least be included in most distros in
the near future.

It also adds generation of html versions of the manpages so we have a
list of those on the site: http://sourceware.org/frysk/manpages/
I made a reference to them from the documentation page.

The files in htdocs get updated automagically whenever you do a git
push, for reuploading the javadoc and manpages dirs you need rsync
access to sourceware. I can setup an autobuilder/pusher for this if
nobody else has already.

Andrew, I assume you have one since the javadoc directory is currently
owned by you, but not group frysk, so I wasn't able to update those yet.
Could you chown -R g+w and chgrp -R frysk them, or start your own
builder and do a make javadoc upload-javadoc?

frysk-top/ChangeLog
2008-03-13  Mark Wielaard  <mwielaard@redhat.com>

    * Makefile.am (upload-manpages): New .PHONY target using rsync.
    (upload-docs): New .PHONY target depending on upload-manpages
    and upload-javadoc.

2008-03-13  Mark Wielaard  <mwielaard@redhat.com>

    * Makefile.am (XMLSOURCES): New list of tools xml docbook files.
    (TEMPLATE): New standard html template file.
    (manpages): New .PHONY target.

2008-03-13  Mark Wielaard  <mwielaard@redhat.com>

    * Makefile.am (SOURCEDIRS): Remove frysk-imports subdirs, replace
    with frysk-sys subdirs.
    (JAVADOC): Define as javadoc.
    (javadoc): Prune tmp dirs. Don't use reflection, no -validhtml,
    replace -all with -subpackages frysk:lib:inua:jline:junit:gnu.

Cheers,

Mark

[-- Attachment #2: javadoc-man-html.patch --]
[-- Type: text/x-patch, Size: 4898 bytes --]

diff --git a/frysk-top/Makefile.am b/frysk-top/Makefile.am
index 0ee89d9..072b926 100644
--- a/frysk-top/Makefile.am
+++ b/frysk-top/Makefile.am
@@ -1,6 +1,6 @@
 # This file is part of the program FRYSK.
 #
-# Copyright 2005, 2006, 2007, Red Hat Inc.
+# Copyright 2005, 2006, 2007, 2008, Red Hat Inc.
 #
 # FRYSK is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -54,9 +54,10 @@ SUBDIRS = \
 SOURCEDIRS = \
 	$(patsubst %,$(srcdir)/%/frysk,$(SUBDIRS)) \
 	$(patsubst %,$(top_builddir)/%/frysk,$(SUBDIRS)) \
-	$(srcdir)/frysk-imports/lib \
-	$(srcdir)/frysk-imports/inua \
-	$(top_builddir)/frysk-imports/inua \
+	$(srcdir)/frysk-sys/lib \
+	$(top_builddir)/frysk-sys/lib \
+	$(srcdir)/frysk-sys/inua \
+	$(top_builddir)/frysk-sys/inua \
 	$(srcdir)/frysk-imports/getopt/src/getopt/gnu \
 	$(srcdir)/frysk-imports/jline/src/jline \
 	$(srcdir)/frysk-imports/junit/src/junit \
@@ -66,8 +67,42 @@ SOURCEDIRS = \
 	$(empty)
 
 \f
+# Generate html manpages
+# Use same xml sources, but generate html.
+# html is always put in index.html in output dir, so rename.
+# Use template file and just put in title, logo and a list of utils + href.
+# Replace ./ with ../ relative references (manpages is one dir down).
+XMLSOURCES = $(srcdir)/frysk-core/frysk/bindir/*.xml
+TEMPLATE = $(srcdir)/htdocs/template.html
+.PHONY: manpages
+manpages: XMLSOURCES
+	rm -rf manpages
+	mkdir manpages
+	sed -n '0,/<!-- start title -->/$ p' $(TEMPLATE) > tmp.index.$@.html
+	echo "<h1>Frysk Utilities</h1>" >> tmp.index.$@.html
+	sed -n '/<!-- end title -->/,/<!-- start logo -->/ p' $(TEMPLATE) >> tmp.index.$@.html
+	echo '<img src="./fryskbiglogo.png" alt="Frysk logo" style="margin-left:8px;">' >> tmp.index.$@.html
+	sed -n '/<!-- end logo -->/,/<!-- start text -->/ p' $(TEMPLATE) >> tmp.index.$@.html
+	for xmlfile in $(XMLSOURCES) ; do \
+		name=`basename $$xmlfile .xml`; \
+		echo "Generating man webpage for $$name" ; \
+		$(XMLTO) -o manpages html $$xmlfile ; \
+		mv manpages/index.html manpages/$${name}.html ; \
+		echo -n "<li><tt><a href='" >> tmp.index.$@.html ; \
+		echo -n $${name}.html >> tmp.index.$@.html ; \
+		echo -n "'>" >> tmp.index.$@.html ; \
+		echo -n $$name >> tmp.index.$@.html ; \
+		echo "</tt></a>" >> tmp.index.$@.html ; \
+		sed -n '/<refpurpose>\(.*\)<\/refpurpose>/ p' $$xmlfile \
+			| sed -n 's/refpurpose/i/g p' >> tmp.index.$@.html ; \
+		echo "</li>" >> tmp.index.$@.html ; \
+	done
+	sed -n '/<!-- end text -->/,$$ p' $(TEMPLATE) >> tmp.index.$@.html
+	sed -i 's/"\.\//"\.\.\//g' tmp.index.$@.html
+	mv tmp.index.$@.html manpages/index.html
+
 # Generate JAVADOC documentation.
-JAVADOC = gjdoc
+JAVADOC = javadoc
 JAVADOC_CLASSPATH = /usr/share/java/libgcj-`$(GCJ) -dumpversion`.jar
 .PHONY: javadoc
 javadoc: all
@@ -84,6 +119,7 @@ javadoc: all
 				cd $$d ; \
 				find $$b \
 				-path '*/*dir/*' -prune \
+				-path '*/*tmp/*' -prune \
 				-o -name '[A-Za-z]*\.java' -print \
 				-o -name 'package.html' -print \
 				-o -path '*/doc-files/*.jpg' -print \
@@ -100,16 +136,10 @@ javadoc: all
 				| xargs rm \
 				;; \
 		esac ; \
-		case $$scope in \
-			public ) reflection=-reflection ;; \
-			private ) reflection= ;; \
-		esac ; \
 		jg=http://developer.gnome.org/doc/API/java-gnome ; \
 		CLASSPATH=$(JAVADOC_CLASSPATH):$(subst $(space),:,$(FRYSK_GNOME_JARS)) \
 			$(JAVADOC) \
 			-$$scope \
-			$${reflection} \
-			-validhtml \
 			-link http://developer.classpath.org/doc/ \
 			-link $${jg}/glib-java-0.4.0/api/ \
 			-link $${jg}/cairo-java-1.0.6/api/ \
@@ -129,7 +159,7 @@ javadoc: all
 			-group "Imported Packages" 'inua*:jline*:junit*:gnu*' \
 			-group "Native Bindings" 'lib*' \
 			-sourcepath javadoc/source/$$scope \
-			-all \
+			-subpackages frysk:lib:inua:jline:junit:gnu \
 		; \
 	done
 
@@ -156,6 +186,25 @@ upload-javadoc:
 		sourceware.org:/sourceware/www/sourceware/htdocs/frysk/javadoc
 CLEANFILES += javadoc
 
+.PHONY: upload-manpages
+upload-manpages:
+	rsync \
+		--fuzzy \
+		--delete-during \
+		--ignore-times \
+		--perms \
+		--checksum \
+		--recursive \
+		--links \
+		--itemize-changes \
+		--stats \
+		manpages/ \
+		sourceware.org:/sourceware/www/sourceware/htdocs/frysk/manpages
+
+.PHONY: upload-docs
+upload-docs: upload-manpages upload-javadoc
+	true
+
 # Generate DOXYGEN documentation.
 
 DOXYFILE = doxygen/Doxyfile
diff --git a/htdocs/documentation/index.html b/htdocs/documentation/index.html
index e23d570..e6fc1cf 100755
--- a/htdocs/documentation/index.html
+++ b/htdocs/documentation/index.html
@@ -63,6 +63,9 @@ href="../build/">building <em>frysk</em></a>.<br> For example
 workflows illustrating <em>frysk</em> will work see <a
 href="../workflow/">workflow</a>.</p>
 
+<p>For a list of example utilities build on the frysk framework see <a
+href="../manpages/">manpages</a>.
+
 <h2>Articles on <em>frysk</em></h2>
 
 <ul>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fixed javadoc generation and created html manpages
  2008-03-13 16:04 Fixed javadoc generation and created html manpages Mark Wielaard
@ 2008-03-13 17:49 ` Mark Wielaard
  2008-03-17 11:00 ` Mark Wielaard
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Wielaard @ 2008-03-13 17:49 UTC (permalink / raw)
  To: frysk

[-- Attachment #1: Type: text/plain, Size: 734 bytes --]

Hi,

On Thu, 2008-03-13 at 17:03 +0100, Mark Wielaard wrote:
> It also adds generation of html versions of the manpages so we have a
> list of those on the site: http://sourceware.org/frysk/manpages/
> I made a reference to them from the documentation page.

Found some small issues while looking over them and fixed them.

2008-03-13  Mark Wielaard  <mwielaard@redhat.com>

        * fcatch.xml: Fixed URL.
        * fdebuginfo.xml: Likewise.
        * fdebugrpm.xml: Likewise.
        * ferror.xml: Likewise.
        * fexe.xml: Likewise.
        * fstack.xml: Likewise.
        * fstep.xml: Likewise.
        * ftrace.xml: Likewise.
        * fhpd.xml: Put refpurpose on one line for easy sed parsing.

Committed and pushed,

Mark

[-- Attachment #2: man-fixes.patch --]
[-- Type: text/x-patch, Size: 4471 bytes --]

diff --git a/frysk-core/frysk/bindir/fcatch.xml b/frysk-core/frysk/bindir/fcatch.xml
index 9e5e027..fb46315 100644
--- a/frysk-core/frysk/bindir/fcatch.xml
+++ b/frysk-core/frysk/bindir/fcatch.xml
@@ -151,7 +151,7 @@
   
   <refsect1>
     <title>BUGS</title>
-    <para>Report bugs to <ulink url="http:/sources.redhat.com/frysk">
+    <para>Report bugs to <ulink url="http://sources.redhat.com/frysk">
     http://sources.redhat.com/frysk/ </ulink>. </para>
   </refsect1>
   
diff --git a/frysk-core/frysk/bindir/fdebuginfo.xml b/frysk-core/frysk/bindir/fdebuginfo.xml
index c73808c..8fb0f52 100644
--- a/frysk-core/frysk/bindir/fdebuginfo.xml
+++ b/frysk-core/frysk/bindir/fdebuginfo.xml
@@ -166,7 +166,7 @@
   
   <refsect1>
     <title>BUGS</title>
-    <para>Report bugs to <ulink url="http:/sources.redhat.com/fdebuginfo">
+    <para>Report bugs to <ulink url="http://sources.redhat.com/fdebuginfo">
     http://sources.redhat.com/fdebuginfo/ </ulink>. </para>
   </refsect1>
   
diff --git a/frysk-core/frysk/bindir/fdebugrpm.xml b/frysk-core/frysk/bindir/fdebugrpm.xml
index 161d90e..fa0d71a 100644
--- a/frysk-core/frysk/bindir/fdebugrpm.xml
+++ b/frysk-core/frysk/bindir/fdebugrpm.xml
@@ -164,7 +164,7 @@
   
   <refsect1>
     <title>BUGS</title>
-    <para>Report bugs to <ulink url="http:/sources.redhat.com/fdebugrpm">
+    <para>Report bugs to <ulink url="http://sources.redhat.com/fdebugrpm">
     http://sources.redhat.com/fdebugrpm/ </ulink>. </para>
   </refsect1>
   
diff --git a/frysk-core/frysk/bindir/ferror.xml b/frysk-core/frysk/bindir/ferror.xml
index a1c43e9..ab8e124 100644
--- a/frysk-core/frysk/bindir/ferror.xml
+++ b/frysk-core/frysk/bindir/ferror.xml
@@ -148,7 +148,7 @@
   
   <refsect1>
     <title>BUGS</title>
-    <para>Report bugs to <ulink url="http:/sources.redhat.com/frysk">
+    <para>Report bugs to <ulink url="http://sources.redhat.com/frysk">
     http://sources.redhat.com/frysk/ </ulink>. </para>
   </refsect1>
   
diff --git a/frysk-core/frysk/bindir/fexe.xml b/frysk-core/frysk/bindir/fexe.xml
index f980f9f..2fb60b2 100644
--- a/frysk-core/frysk/bindir/fexe.xml
+++ b/frysk-core/frysk/bindir/fexe.xml
@@ -161,7 +161,7 @@ sh$ fexe -v $$
   
   <refsect1>
     <title>BUGS</title>
-    <para>Report bugs to <ulink url="http:/sources.redhat.com/frysk">
+    <para>Report bugs to <ulink url="http://sources.redhat.com/frysk">
     http://sources.redhat.com/frysk </ulink>. </para>
   </refsect1>
   
diff --git a/frysk-core/frysk/bindir/fhpd.xml b/frysk-core/frysk/bindir/fhpd.xml
index 2633fac..e87dbc4 100644
--- a/frysk-core/frysk/bindir/fhpd.xml
+++ b/frysk-core/frysk/bindir/fhpd.xml
@@ -62,9 +62,7 @@
 
   <refnamediv>
     <refname>fhpd</refname>
-    <refpurpose>
-    The Frysk Debugger.
-    </refpurpose>
+    <refpurpose>The Frysk Debugger</refpurpose>
   </refnamediv>
   
   <refsynopsisdiv>
diff --git a/frysk-core/frysk/bindir/fstack.xml b/frysk-core/frysk/bindir/fstack.xml
index e4eb9f5..c7b7e2a 100644
--- a/frysk-core/frysk/bindir/fstack.xml
+++ b/frysk-core/frysk/bindir/fstack.xml
@@ -164,7 +164,7 @@
   
   <refsect1>
     <title>BUGS</title>
-    <para>Report bugs to <ulink url="http:/sources.redhat.com/frysk">
+    <para>Report bugs to <ulink url="http://sources.redhat.com/frysk">
     http://sources.redhat.com/frysk/ </ulink>. </para>
   </refsect1>
   
diff --git a/frysk-core/frysk/bindir/fstep.xml b/frysk-core/frysk/bindir/fstep.xml
index 8ddecd4..bae2277 100644
--- a/frysk-core/frysk/bindir/fstep.xml
+++ b/frysk-core/frysk/bindir/fstep.xml
@@ -149,7 +149,7 @@
   
   <refsect1>
     <title>BUGS</title>
-    <para>Report bugs to <ulink url="http:/sources.redhat.com/frysk">
+    <para>Report bugs to <ulink url="http://sources.redhat.com/frysk">
     http://sources.redhat.com/frysk </ulink>. </para>
   </refsect1>
   
diff --git a/frysk-core/frysk/bindir/ftrace.xml b/frysk-core/frysk/bindir/ftrace.xml
index 0beeabc..fa4ee20 100644
--- a/frysk-core/frysk/bindir/ftrace.xml
+++ b/frysk-core/frysk/bindir/ftrace.xml
@@ -403,7 +403,7 @@
     <screen>~/prefix/bin/ftrace ~/prefix/lib64/frysk/funit --arch 32 frysk.proc.TestAbandon</screen>
     <para>to</para>
     <screen>~/prefix/bin/ftrace -- ~/prefix/lib64/frysk/funit --arch 32 frysk.proc.TestAbandon</screen>
-    <para>Report bugs to <ulink url="http:/sources.redhat.com/frysk">
+    <para>Report bugs to <ulink url="http://sources.redhat.com/frysk">
     http://sources.redhat.com/frysk/ </ulink>. </para>
   </refsect1>
   

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fixed javadoc generation and created html manpages
  2008-03-13 16:04 Fixed javadoc generation and created html manpages Mark Wielaard
  2008-03-13 17:49 ` Mark Wielaard
@ 2008-03-17 11:00 ` Mark Wielaard
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Wielaard @ 2008-03-17 11:00 UTC (permalink / raw)
  To: frysk; +Cc: Andrew Cagney

Hi Andrew,

On Thu, 2008-03-13 at 17:03 +0100, Mark Wielaard wrote:
> This patch fixes the generation of javadoc by using the javadoc that
> comes with icedtea/openjdk. It misses some of the nice features of
> gjdoc, but it looks like it will at least be included in most distros in
> the near future.
> 
> It also adds generation of html versions of the manpages so we have a
> list of those on the site: http://sourceware.org/frysk/manpages/
> I made a reference to them from the documentation page.
> 
> The files in htdocs get updated automagically whenever you do a git
> push, for reuploading the javadoc and manpages dirs you need rsync
> access to sourceware. I can setup an autobuilder/pusher for this if
> nobody else has already.
> 
> Andrew, I assume you have one since the javadoc directory is currently
> owned by you, but not group frysk, so I wasn't able to update those yet.
> Could you chown -R g+w and chgrp -R frysk them, or start your own
> builder and do a make javadoc upload-javadoc?

I saw you fixed the permission problems and improved the output a bit
with:

commit 963501ea208d03400e55c48ff8e28053f6b8e5b7
Author: Andrew Cagney <cagney@redhat.com>
Date:   Fri Mar 14 16:07:14 2008 -0400

    Separate out/fix DEFAULT test.
    
    frysk-sys/frysk/rsl/ChangeLog
    2008-03-14  Andrew Cagney  <cagney@redhat.com>
    
        * TestLog.java (testDefault()): New.

commit bd3b09d90dfd03c064314fb8a86e9a64a77ce0eb
Author: Andrew Cagney <cagney@redhat.com>
Date:   Fri Mar 14 15:49:54 2008 -0400

    Fix html man-page nits.
    
    frysk-common/ChangeLog
    2008-03-14  Andrew Cagney  <cagney@redhat.com>
    
        * manpages.sh: New.
        * frysk.xml: New.
    
    frysk-core/frysk/bindir/ChangeLog
    2008-03-14  Andrew Cagney  <cagney@redhat.com>
    
        * frysk.xml: New.
        * fparser.xml, fparser.java: Move to frysk.pkglibdir.
        * fauxv.xml: Cite frysk(7), simplify url.
        * fcatch.xml: Ditto.
        * fcore.xml: Ditto.
        * fdebuginfo.xml: Ditto.
        * fdebugrpm.xml: Ditto.
        * ferror.xml: Ditto.
        * fexe.xml: Ditto.
        * fhpd.xml: Ditto.
        * fmaps.xml: Ditto.
        * fparser.xml: Ditto.
        * fstack.xml: Ditto.
        * fstep.xml: Ditto.
        * ftrace.xml: Ditto.
    
    frysk-core/frysk/pkglibdir/ChangeLog
    2008-03-14  Andrew Cagney  <cagney@redhat.com>
    
        * fparser.xml, fparser.java: Move to here from frysk.bindir.
        * funit-threads.xml: Cite frysk(7); update url.
        * funit-slave.xml: Ditto.
        * funit-exit.xml: Ditto.
        * funit-exec.xml: Ditto.
    
    frysk-gui/frysk/bindir/ChangeLog
    2008-03-14  Andrew Cagney  <cagney@redhat.com>
    
        * frysk.xml: Cite frysk(7).
    
    frysk-sys/frysk/pkglibdir/ChangeLog
    2008-03-14  Andrew Cagney  <cagney@redhat.com>
    
        * fsystest.xml: Cite frysk(7), update url.
        * funit-procmask.xml: Ditto.
    
    frysk-top/ChangeLog
    2008-03-14  Andrew Cagney  <cagney@redhat.com>
    
        * Makefile.am (frysk-common/frysk.7): New target.
        (manpages): Move code to frysk-common/manpages.sh.

Very nice cleanup.

Do we have something that auto-generates and pushes changes to javadoc
and manpages onto sourceware or should I set up something for that?

Thanks,

Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-17 11:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-13 16:04 Fixed javadoc generation and created html manpages Mark Wielaard
2008-03-13 17:49 ` Mark Wielaard
2008-03-17 11:00 ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).