Commit 2c3556d4 authored by Raja R Harinath's avatar Raja R Harinath

This depends on Gnumeric.h, Gnumeric-impl.c doesn't.

* src/Makefile.am (Gnumeric-impl.o): This depends on Gnumeric.h,
Gnumeric-impl.c doesn't.

Reinstate Perl plugin.
* plugins/perl/Makefile.am: Clean up build.
* plugins/perl/ext/Gnumeric.xs (register_function):
Use FunctionCategory and `function_add_args' API instead of
`install_symbol'.
(marshal_func): Update to new callback prototype.
* plugins/perl/ext/Makefile.PL.in ('INC'): Use @top_srcdir@ rather
than @srcdir@/../../...

* doc/C/Makefile.am: Misc. srcdir != builddir fixes.
* configure.in (GNOME_PRINT_CFLAGS): Fix typo.
parent cf4defb5
1999-06-27 Raja R Harinath <harinath@cs.umn.edu>
* src/Makefile.am (Gnumeric-impl.o): This depends on Gnumeric.h,
Gnumeric-impl.c doesn't.
Reinstate Perl plugin.
* plugins/perl/Makefile.am: Clean up build.
* plugins/perl/ext/Gnumeric.xs (register_function):
Use FunctionCategory and `function_add_args' API instead of
`install_symbol'.
(marshal_func): Update to new callback prototype.
* plugins/perl/ext/Makefile.PL.in ('INC'): Use @top_srcdir@ rather
than @srcdir@/../../...
* doc/C/Makefile.am: Misc. srcdir != builddir fixes.
* configure.in (GNOME_PRINT_CFLAGS): Fix typo.
1999-06-25 Michael Meeks <michael@edenproject.org>
* src/dialog-function-wizard.c: Re-vamped table layout.
......
1999-06-27 Raja R Harinath <harinath@cs.umn.edu>
* src/Makefile.am (Gnumeric-impl.o): This depends on Gnumeric.h,
Gnumeric-impl.c doesn't.
Reinstate Perl plugin.
* plugins/perl/Makefile.am: Clean up build.
* plugins/perl/ext/Gnumeric.xs (register_function):
Use FunctionCategory and `function_add_args' API instead of
`install_symbol'.
(marshal_func): Update to new callback prototype.
* plugins/perl/ext/Makefile.PL.in ('INC'): Use @top_srcdir@ rather
than @srcdir@/../../...
* doc/C/Makefile.am: Misc. srcdir != builddir fixes.
* configure.in (GNOME_PRINT_CFLAGS): Fix typo.
1999-06-25 Michael Meeks <michael@edenproject.org>
* src/dialog-function-wizard.c: Re-vamped table layout.
......
1999-06-27 Raja R Harinath <harinath@cs.umn.edu>
* src/Makefile.am (Gnumeric-impl.o): This depends on Gnumeric.h,
Gnumeric-impl.c doesn't.
Reinstate Perl plugin.
* plugins/perl/Makefile.am: Clean up build.
* plugins/perl/ext/Gnumeric.xs (register_function):
Use FunctionCategory and `function_add_args' API instead of
`install_symbol'.
(marshal_func): Update to new callback prototype.
* plugins/perl/ext/Makefile.PL.in ('INC'): Use @top_srcdir@ rather
than @srcdir@/../../...
* doc/C/Makefile.am: Misc. srcdir != builddir fixes.
* configure.in (GNOME_PRINT_CFLAGS): Fix typo.
1999-06-25 Michael Meeks <michael@edenproject.org>
* src/dialog-function-wizard.c: Re-vamped table layout.
......
1999-06-27 Raja R Harinath <harinath@cs.umn.edu>
* src/Makefile.am (Gnumeric-impl.o): This depends on Gnumeric.h,
Gnumeric-impl.c doesn't.
Reinstate Perl plugin.
* plugins/perl/Makefile.am: Clean up build.
* plugins/perl/ext/Gnumeric.xs (register_function):
Use FunctionCategory and `function_add_args' API instead of
`install_symbol'.
(marshal_func): Update to new callback prototype.
* plugins/perl/ext/Makefile.PL.in ('INC'): Use @top_srcdir@ rather
than @srcdir@/../../...
* doc/C/Makefile.am: Misc. srcdir != builddir fixes.
* configure.in (GNOME_PRINT_CFLAGS): Fix typo.
1999-06-25 Michael Meeks <michael@edenproject.org>
* src/dialog-function-wizard.c: Re-vamped table layout.
......
......@@ -134,7 +134,7 @@ dnl ******************************
dnl GnomePrint checking
dnl ******************************
GNOME_PRINT_LIBS=`gnome-config --libs print`
GNOME_PRINT_CFLAGS=`gnome-config --libs cflags`
GNOME_PRINT_CFLAGS=`gnome-config --cflags print`
AC_SUBST(GNOME_PRINT_LIBS)
AC_SUBST(GNOME_PRINT_CFLAGS)
......
......@@ -43,22 +43,23 @@ EXTRA_DIST = \
all:
gnumeric.html: gnumeric/gnumeric.html
-cp gnumeric/gnumeric.html .
-cd $(srcdir) && cp gnumeric/gnumeric.html .
gnumeric/gnumeric.html: $(SGML_FILES)
-db2html gnumeric.sgml
-cd $(srcdir) && db2html gnumeric.sgml
functions.sgml: func-list.sgml func-index.sgml func-header.sgml func-footer.sgml
cat $(srcdir)/func-header.sgml func-index.sgml func-list.sgml $(srcdir)/func-footer.sgml > functions.sgml
cd $(srcdir) && cat func-header.sgml func-index.sgml func-list.sgml func-footer.sgml > functions.sgml
func-list.sgml: func.defs $(srcdir)/make-docbook.pl
perl $(srcdir)/make-docbook.pl func.defs > func-list.sgml
func-list.sgml: func.defs make-docbook.pl
cd $(srcdir) && perl make-docbook.pl func.defs > func-list.sgml
func-index.sgml: func.defs $(srcdir)/make-index.pl
perl $(srcdir)/make-index.pl func.defs > func-index.sgml
func-index.sgml: func.defs make-index.pl
cd $(srcdir) && perl make-index.pl func.defs > func-index.sgml
make-func.defs:
$(top_srcdir)/src/$(gnumeric) --dump-func-defs=func.defs
gnumericdir=`cd $(top_builddir)/src && pwd`; \
cd $(srcdir) && $$gnumericdir/gnumeric --dump-func-defs=func.defs
dist-hook:
mkdir $(distdir)/gnumeric
......@@ -71,10 +72,10 @@ install-data-local: gnumeric.html
$(mkinstalldirs) $(gnumeric_helpdir)/images
-for file in $(srcdir)/gnumeric/*.html $(srcdir)/gnumeric/*.css; do \
basefile=`basename $$file`; \
$(INSTALL_DATA) $(srcdir)/$$file $(gnumeric_helpdir)/$$basefile; \
$(INSTALL_DATA) $$file $(gnumeric_helpdir)/$$basefile; \
done
-for file in $(srcdir)/images/*.jpg $(srcdir)/images/*.gif; do \
$(INSTALL_DATA) $(srcdir)/$$file $(gnumeric_helpdir)/images;\
$(INSTALL_DATA) $$file $(gnumeric_helpdir)/images;\
done
gnumeric.ps: gnumeric.sgml
......
......@@ -10,39 +10,69 @@ GNUMERIC_SRC_DIR = $(srcdir)/../../src
#
# Where to install the plugin
#
plugindir = $(libdir)/gnumeric/plugins
execplugindir = $(libdir)/gnumeric/plugins
gnperldir = $(datadir)/gnumeric/perl/lib
CFLAGS += $(PERL_CCCDLFLAGS) \
PERL_CFLAGS = $(PERL_CCCDLFLAGS) \
-I$(GNUMERIC_SRC_DIR) \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-I$(includedir) \
$(PERL_CCOPTS) \
$(GNOME_INCLUDEDIR)
noinst_PROGRAMS = perl.so
.c.o:
$(CC) $(CFLAGS) -c $<
#noinst_PROGRAMS = perl.so
execplugin_PROGRAMS = perl.so
perl_so_SOURCES = perl.c
perl.so: perl.o xsinit.o ext.timestamp
-$(PERL_LD) $(PERL_LDDLFLAGS) -o perl.so perl.o xsinit.o $(PERL_LDOPTS)
perl.o: $(srcdir)/perl.c
$(PERL_CC) $(PERL_CFLAGS) -c $(srcdir)/perl.c
xsinit.o: xsinit.c
$(PERL_CC) $(PERL_CFLAGS) -c xsinit.c
xsinit.c:
-perl -MExtUtils::Embed -e xsinit -- -o xsinit.c
ext.timestamp:
-( cd ext ; perl Makefile.PL LIB=$(datadir)/gnumeric/perl/lib )
touch ext.timestamp
# do all the ext stuff
ext.timestamp: ext/Makefile
cd ext && $(MAKE)
echo timestamp > ext.timestamp
ext/Makefile: ext/Makefile.PL
-(set -x; \
srcextdir=`cd $(srcdir)/ext && pwd`; \
cd ext; \
if test ! -r Gnumeric.xs; then \
rm -f Gnumeric.xs; \
$(LN_S) $$srcextdir/Gnumeric.xs Gnumeric.xs; \
fi; \
if test ! -r Gnumeric.pm; then \
rm -f Gnumeric.pm; \
$(LN_S) $$srcextdir/Gnumeric.pm Gnumeric.pm; \
fi; \
perl Makefile.PL LIB=$(gnperldir))
ext/Makefile.PL: $(srcdir)/ext/Makefile.PL.in $(top_builddir)/config.status
cd $(top_builddir) && CONFIG_FILES=plugins/perl/ext/Makefile.PL \
CONFIG_HEADERS= ./config.status
install-exec-local:
cd ext && $(MAKE) install
check-local:
cd ext && $(MAKE) test
Perlscriptsdir = $(datadir)/gnumeric/perl
Perlscripts_DATA = startup.pl
EXTRA_DIST = startup.pl
EXTRA_DIST = startup.pl \
ext/Makefile.PL.in \
ext/Gnumeric.xs \
ext/Gnumeric.pm
dist-hook:
mkdir $(distdir)/ext
cp $(srcdir)/ext/Gnumeric.* $(srcdir)/ext/Makefile.PL.in $(distdir)/ext
......@@ -27,7 +27,9 @@ typedef FILE * OutputStream;
#include <glib.h>
#include <gnome.h>
#include "../../../src/gnumeric.h"
#include <gnumeric.h>
#include <expr.h>
#include <func.h>
static SV *
value2perl(Value *v)
......@@ -102,9 +104,10 @@ fndef_compare(FuncData *fdata, FunctionDefinition *fndef)
}
static Value *
marshal_func (FunctionDefinition *fndef, Value *argv[], char **error_string)
marshal_func (FunctionEvalInfo *ei, Value *argv[])
{
dSP;
FunctionDefinition *fndef = ei->func_def;
GList *l;
int count = strlen(fndef->args), r, i;
SV * result;
......@@ -112,7 +115,7 @@ marshal_func (FunctionDefinition *fndef, Value *argv[], char **error_string)
l = g_list_find_custom(funclist, fndef, (GCompareFunc) fndef_compare);
if (!l) {
*error_string = "Unable to lookup Perl code object.";
error_message_set (ei->error, "Unable to lookup Perl code object.");
return NULL;
}
......@@ -151,20 +154,23 @@ register_function(name, args, named_args, help1, subref)
char * help1
SV * subref
PREINIT:
FunctionCategory *fncat;
FunctionDefinition *fndef;
FuncData *fdata;
char **help = NULL;
CODE:
fndef = g_new0 (FunctionDefinition, 1);
fncat = function_get_category ("Perl plugin");
if (help1) {
help = g_new (char *, 1);
*help = g_strdup (help1);
}
fndef = function_add_args (fncat, g_strdup(name), g_strdup(args),
g_strdup (named_args), help, marshal_func);
fdata = g_new (FuncData, 1);
fdata->fndef = fndef;
fdata->codeSV = newSVsv(subref);
funclist = g_list_append(funclist, fdata);
fndef->name = g_strdup (name);
fndef->args = g_strdup (args);
fndef->named_arguments = g_strdup (named_args);
fndef->help = g_new (char *, 1);
*fndef->help = g_strdup (help1);
fndef->fn = marshal_func;
symbol_install (global_symbol_table, fndef->name, SYMBOL_FUNCTION, fndef);
......@@ -2,5 +2,6 @@ use ExtUtils::MakeMaker;
WriteMakefile('NAME' => 'Gnumeric',
'LIBS' => '@GNOME_LIBDIR@ @GNOMEUI_LIBS@',
'INC' => '-I@srcdir@/../../../src @GNOME_INCLUDEDIR@',
'INC' => '-g -I@top_srcdir@/src @GNOME_INCLUDEDIR@',
'VERSION_FROM' => 'Gnumeric.pm');
......@@ -182,7 +182,7 @@ GNUMERIC_BONOBO_SOURCES = \
BUILT_SOURCES = $(GNUMERIC_CORBA_GENERATED)
Gnumeric-impl.c: Gnumeric.h
Gnumeric-impl.o: Gnumeric.h
$(GNUMERIC_CORBA_GENERATED): Gnumeric.idl
orbit-idl -I`$(GNOME_CONFIG) --datadir`/idl $(srcdir)/Gnumeric.idl
......@@ -242,7 +242,6 @@ dist-hook:
#number_match_SOURCES = number-match.c formats.c dates.c number-match-test.c
#number_match_LDADD = \
# $(GNOME_LIBDIR) \
# $(GNOMEUI_LIBS) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment