From daf6fa492dbb5ccfdf4e67467be6806131e925c7 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Sat, 22 Sep 2007 20:06:43 -0500 Subject: [PATCH] Split docs into several files, for ggap --- Makefile.am | 3 + doc/Makefile.am | 40 ++++++++------ doc/editor-editing.docbook | 25 +++++++++ doc/editor-open-save.docbook | 25 +++++++++ doc/editor-plugins.docbook | 10 ++++ doc/editor-prefs.docbook | 10 ++++ doc/editor-sections.xml | 5 ++ doc/editor-tools.docbook | 10 ++++ doc/license.docbook | 20 +++++++ doc/manual.docbook | 104 ----------------------------------- doc/medit.docbook | 28 ++++++++++ doc/txt2xml | 5 ++ m4/moo-docs.m4 | 27 ++++++--- moo/mooapp/mooappabout.c | 2 +- 14 files changed, 183 insertions(+), 131 deletions(-) create mode 100644 doc/editor-editing.docbook create mode 100644 doc/editor-open-save.docbook create mode 100644 doc/editor-plugins.docbook create mode 100644 doc/editor-prefs.docbook create mode 100644 doc/editor-sections.xml create mode 100644 doc/editor-tools.docbook create mode 100644 doc/license.docbook delete mode 100644 doc/manual.docbook create mode 100644 doc/medit.docbook create mode 100755 doc/txt2xml diff --git a/Makefile.am b/Makefile.am index 912aa890..6ef3e161 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,6 +30,7 @@ EXTRA_DIST = \ cygwin-configure \ makewin \ COPYING.GPL \ + COPYING \ LICENSE \ THANKS \ intltool-extract.in \ @@ -53,8 +54,10 @@ SUBDIRS += tests endif if MOO_ENABLE_HELP +if MOO_BUILD_DOCS SUBDIRS += doc endif +endif ACLOCAL_AMFLAGS = -I m4 diff --git a/doc/Makefile.am b/doc/Makefile.am index f6fedff1..649d4646 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,23 +1,38 @@ -EXTRA_DIST = \ - manual.docbook \ - manual.xsl \ - help.xsl \ +docbook_files = \ + medit.docbook \ + license.docbook \ + editor-editing.docbook \ + editor-open-save.docbook \ + editor-plugins.docbook \ + editor-prefs.docbook \ + editor-tools.docbook + +EXTRA_DIST = \ + $(docbook_files) \ + manual.xsl \ + help.xsl \ help.css all: build-help manual.html build-help: help/help.css -stamp-help: manual.docbook help.xsl +DISTCLEANFILES = LGPL.xml +# Stupid form feed characters and stupid XML and stupid xsltproc!!! +LGPL.xml: $(top_srcdir)/COPYING + $(srcdir)/txt2xml $(top_srcdir)/COPYING > LGPL.xml.tmp && \ + mv LGPL.xml.tmp LGPL.xml + +stamp-help: $(docbook_files) help.xsl LGPL.xml rm -f help/*.html && \ $(mkdir_p) help && \ - xsltproc --stringparam base.dir $(builddir)/help/ $(srcdir)/help.xsl $(srcdir)/manual.docbook && \ + xsltproc --xinclude --path "." --stringparam base.dir $(builddir)/help/ $(srcdir)/help.xsl $(srcdir)/medit.docbook && \ echo stamp > stamp-help help/help.css: stamp-help help.css cp $(srcdir)/help.css help/ -manual.html: manual.docbook manual.xsl - xsltproc --output manual.html $(srcdir)/manual.xsl $(srcdir)/manual.docbook +manual.html: $(docbook_files) manual.xsl LGPL.xml + xsltproc --xinclude --path "." --output manual.html $(srcdir)/manual.xsl $(srcdir)/medit.docbook ############################################################################# # Standard automake stuff @@ -35,12 +50,3 @@ mostlyclean: rm -fr help stamp-help manual.html distclean: clean rm -f Makefile Makefile.in - -# all: chunks single -# -# clean: -# rm -fr manual/ *.html stamp-chunks - -# single: manual.html -# manual.html: manual.docbook manual.xsl -# xsltproc --output manual.html manual.xsl manual.docbook diff --git a/doc/editor-editing.docbook b/doc/editor-editing.docbook new file mode 100644 index 00000000..13c66516 --- /dev/null +++ b/doc/editor-editing.docbook @@ -0,0 +1,25 @@ + +
+Editing text + +
+dialog-replace +blah blah blah +
+ +
+dialog-find +blah blah blah +
+ +
+dialog-find-in-files +blah blah blah +
+ +
+dialog-find-file +blah blah blah +
+ +
diff --git a/doc/editor-open-save.docbook b/doc/editor-open-save.docbook new file mode 100644 index 00000000..bc40703e --- /dev/null +++ b/doc/editor-open-save.docbook @@ -0,0 +1,25 @@ + +
+Opening and Saving Files + +
+dialog-open +blah blah blah +
+ +
+dialog-save +blah blah blah +
+ +
+file-selector +blah blah blah +
+ +
+app-prefs-file-selector +blah blah blah +
+ +
diff --git a/doc/editor-plugins.docbook b/doc/editor-plugins.docbook new file mode 100644 index 00000000..f3c0e35a --- /dev/null +++ b/doc/editor-plugins.docbook @@ -0,0 +1,10 @@ + +
+Plugins + +
+app-prefs-plugins +blah blah blah +
+ +
diff --git a/doc/editor-prefs.docbook b/doc/editor-prefs.docbook new file mode 100644 index 00000000..a541eb7d --- /dev/null +++ b/doc/editor-prefs.docbook @@ -0,0 +1,10 @@ + +
+Preferences + +
+app-prefs-langs-and-filters +blah blah blah +
+ +
diff --git a/doc/editor-sections.xml b/doc/editor-sections.xml new file mode 100644 index 00000000..be05e719 --- /dev/null +++ b/doc/editor-sections.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/doc/editor-tools.docbook b/doc/editor-tools.docbook new file mode 100644 index 00000000..80e9fcbb --- /dev/null +++ b/doc/editor-tools.docbook @@ -0,0 +1,10 @@ + +
+User-defined Tools + +
+app-prefs-user-tools +blah blah blah +
+ +
diff --git a/doc/license.docbook b/doc/license.docbook new file mode 100644 index 00000000..11a3e26e --- /dev/null +++ b/doc/license.docbook @@ -0,0 +1,20 @@ + +License + +&app; as a whole is distributed under the terms of GNU General Public License, +version 2, but most of its code is released under the GNU Lesser General Public +License. Full text of these licenses and list of licenses and acknowledgements for +third-party software incorporated in &app; can be found in this section. + + + +GNU General Public License + + + + +GNU Lesser General Public License + + + diff --git a/doc/manual.docbook b/doc/manual.docbook deleted file mode 100644 index 80e40ee9..00000000 --- a/doc/manual.docbook +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - -]> - -
- - -&app; manual - - - -Getting Started - - - -Opening and Saving Files - - -dialog-open -blah blah blah - - - -dialog-save -blah blah blah - - - -file-selector -blah blah blah - - - -app-prefs-file-selector -blah blah blah - - - - - -Editing text - - -dialog-replace -blah blah blah - - - -dialog-find -blah blah blah - - - -dialog-find-in-files -blah blah blah - - - -dialog-find-file -blah blah blah - - - - - -Preferences - - -app-prefs-langs-and-filters -blah blah blah - - - - - -Plugins - - -app-prefs-plugins -blah blah blah - - - - - -User-defined Tools - - -app-prefs-user-tools -blah blah blah - - - - -This document was generated -. - -
diff --git a/doc/medit.docbook b/doc/medit.docbook new file mode 100644 index 00000000..7a248821 --- /dev/null +++ b/doc/medit.docbook @@ -0,0 +1,28 @@ + + + + + + + +]> + +
+ + +&app; manual + + +
+Getting Started +
+ +&editor-sections; +&license; + +This document was generated +. + +
diff --git a/doc/txt2xml b/doc/txt2xml new file mode 100755 index 00000000..742a8c2c --- /dev/null +++ b/doc/txt2xml @@ -0,0 +1,5 @@ +#!/bin/sh +echo "" +sed -e 's/\f//' -e 's/&/\&/g' -e 's//\>/g' \ + -e 's/"/\"/g' -e "s/'/\&\#39;/g" "$1" +echo "" diff --git a/m4/moo-docs.m4 b/m4/moo-docs.m4 index d42ccdbd..5cdb25a6 100644 --- a/m4/moo-docs.m4 +++ b/m4/moo-docs.m4 @@ -23,7 +23,7 @@ AC_DEFUN([_MOO_AC_CHECK_XSLT_DOCBOOK],[ EOFEOF - if ($XSLTPROC http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl conftest.docbook 2>/dev/null >/dev/null); then + if ($XSLTPROC --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl conftest.docbook 2>/dev/null >/dev/null); then AC_MSG_RESULT([yes]) rm -f conftest.docbook $1 @@ -42,18 +42,27 @@ AC_DEFUN([MOO_DOCS],[ AC_HELP_STRING(--disable-help, [Disable building html help files (default = auto).]), [:],[enable_help=auto]) - if test "x$enable_help" = xauto -o "x$enable_help" = xyes; then - _MOO_AC_CHECK_XSLT_DOCBOOK([_moo_xslt_working=yes],[_moo_xslt_working=no]) - if test $_moo_xslt_working = yes; then - enable_help=yes - elif test "x$enable_help" = xauto; then - enable_help=no - else - AC_MSG_ERROR([xsltproc will not work]) + if test "x$MOO_ENABLE_HELP" != xyes; then + if test "x$enable_help" = xauto -o "x$enable_help" = xyes; then + _MOO_AC_CHECK_XSLT_DOCBOOK([_moo_xslt_working=yes],[_moo_xslt_working=no]) + if test $_moo_xslt_working = yes; then + enable_help=yes + elif test "x$enable_help" = xauto; then + enable_help=no + else + AC_MSG_ERROR([xsltproc will not work]) + fi fi fi + if test "x$enable_help" != xyes; then + MOO_BUILD_DOCS=no + elif test "x$MOO_BUILD_DOCS" = x; then + MOO_BUILD_DOCS=yes + fi + AM_CONDITIONAL(MOO_ENABLE_HELP, test "x$enable_help" = xyes) + AM_CONDITIONAL(MOO_BUILD_DOCS, test "x$MOO_BUILD_DOCS" = xyes) if test "x$enable_help" = xyes; then AC_DEFINE(MOO_ENABLE_HELP, [1], [enable help functionality]) fi diff --git a/moo/mooapp/mooappabout.c b/moo/mooapp/mooappabout.c index 8af2b077..f8c58dce 100644 --- a/moo/mooapp/mooappabout.c +++ b/moo/mooapp/mooappabout.c @@ -170,7 +170,7 @@ show_license (void) #define COPYRIGHT_SYMBOL "\302\251" -static const char *copyright = COPYRIGHT_SYMBOL " 2004-2007 Yevgen Muntyan"; +static const char copyright[] = COPYRIGHT_SYMBOL " 2004-2007 Yevgen Muntyan"; static gboolean