From e85fb872c00b882b308d51eb943780c7aff7cd3b Mon Sep 17 00:00:00 2001 From: John Darrington Date: Wed, 11 Mar 2009 19:29:31 +0900 Subject: [PATCH] Convert manual to docbook and load that in yelp. Instead of yelp loading info files, have it load docbook xml files instead. --- doc/automake.mk | 20 ++++++++------------ src/ui/gui/automake.mk | 4 +++- src/ui/gui/helper.c | 6 +++++- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/doc/automake.mk b/doc/automake.mk index f6f669b1..59fb7179 100644 --- a/doc/automake.mk +++ b/doc/automake.mk @@ -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-\&-Date/g' \ + -e 's%below:%below:
%' $@ -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) diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk index 9246b79f..d37cc29f 100644 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@ -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 = \ diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index 6294e886..49dbfda4 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -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); } -- 2.30.2