Convert manual to docbook and load that in yelp.
authorJohn Darrington <john@darrington.wattle.id.au>
Wed, 11 Mar 2009 10:29:31 +0000 (19:29 +0900)
committerJohn Darrington <john@darrington.wattle.id.au>
Wed, 11 Mar 2009 10:29:31 +0000 (19:29 +0900)
Instead of yelp loading info files, have it load
docbook xml files instead.

doc/automake.mk
src/ui/gui/automake.mk
src/ui/gui/helper.c

index f6f669b1ef42c80be37da834b3ff0bdec833f6ac..59fb7179cbf5854d474be473503f7ccab2f58d0a 100644 (file)
@@ -46,19 +46,15 @@ doc/ni.texi: $(top_srcdir)/src/language/command.def doc/get-commands.pl
        @$(MKDIR_P)  doc
        @PERL@ $(top_srcdir)/doc/get-commands.pl $(top_srcdir)/src/language/command.def > $@
 
+doc/pspp.xml: doc/pspp.texinfo $(doc_pspp_TEXINFOS)
+       @$(MKDIR_P)  doc
+       $(MAKEINFO) --docbook -I $(top_srcdir) $< -o $@
+       $(SED) -i -e 's/Time-&-Date/Time-\&amp;-Date/g' \
+       -e 's%below:<table label=""></para>%below:</para><table label="">%' $@
 
-install-info-file:
-       for ifile in $(DESTDIR)$(infodir)/pspp.info-[0-9] $(DESTDIR)$(infodir)/pspp.info  ; do \
-         gzip -f $$ifile ; \
-       done 
-
-INSTALL_DATA_HOOKS += install-info-file
-
-uninstall-info-file:
-       $(RM) $(DESTDIR)$(infodir)/pspp.info-[0-9].gz ; \
-       $(RM) $(DESTDIR)$(infodir)/pspp.info.gz ;
+docbookdir = $(docdir)
+docbook_DATA = doc/pspp.xml
 
-UNINSTALL_DATA_HOOKS += uninstall-info-file
 
 EXTRA_DIST += doc/OChangeLog
-CLEANFILES += pspp-dev.dvi
+CLEANFILES += pspp-dev.dvi $(docbook_DATA)
index 9246b79fa99d2136322dd69667e52dbe1ec17b41..d37cc29f7fbc189a8b83f55c6736a8e4a0013f0b 100644 (file)
@@ -5,7 +5,9 @@ include $(top_srcdir)/src/ui/gui/sheet/automake.mk
 bin_PROGRAMS += src/ui/gui/psppire 
 
 src_ui_gui_psppire_CFLAGS = $(GTK_CFLAGS) -Wall \
-       -DINSTALLDIR=\"$(bindir)\" -DGDK_MULTIHEAD_SAFE=1
+       -DINSTALLDIR=\"$(bindir)\"  \
+       -DDOCDIR=\"$(docdir)\"  \
+       -DGDK_MULTIHEAD_SAFE=1
 
 
 src_ui_gui_psppire_LDFLAGS = \
index 6294e886f694983fb506572e03a2f422008ae402..49dbfda4a181b18e4b9fccabaa8ed4e6a1c4aa18 100644 (file)
@@ -214,10 +214,14 @@ void
 reference_manual (GtkMenuItem *menu, gpointer data)
 {
   GError *err = NULL;
-  if ( ! g_spawn_command_line_async ("yelp info:pspp", &err) )
+  gchar *cmd = g_strdup_printf ("yelp file://%s", relocate (DOCDIR "/pspp.xml"));
+
+  if ( ! g_spawn_command_line_async (cmd, &err) )
     {
       msg (ME, _("Cannot open reference manual: %s"), err->message);
     }
+
+  g_free (cmd);
   g_clear_error (&err);
 }