Commit 8633bfcd authored by Tom Dyas's avatar Tom Dyas
Browse files

Let Perl plugin tell Perl about the correct include directory for

Gnumeric extension.
parent 86089d29
......@@ -110,9 +110,3 @@ po/Makefile.in
macros/Makefile
stamp.h
],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
if test "x$perl_val" = "xtrue"; then
cd plugins/perl/ext
perl Makefile.PL LIB="${datadir}/gnumeric/perl/lib" >/dev/null 2>&1
cd ../../..
fi
......@@ -2,11 +2,6 @@
# Makefile for the Python Gnumeric plugin.
#
#
# We should build in the extension subdirectory as well.
#
SUBDIRS = ext
#
# Where can we find the Gnumeric include files.
#
......@@ -30,12 +25,16 @@ plugin_PROGRAMS = perl.so
.c.o:
$(CC) $(CFLAGS) -c $<
perl.so: perl.o xsinit.o
perl.so: perl.o xsinit.o ext.timestamp
$(PERL_LD) $(PERL_LDDLFLAGS) -o perl.so perl.o xsinit.o $(PERL_LDOPTS)
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
Perlscriptsdir = $(datadir)/gnumeric/perl
Perlscripts_DATA = startup.pl
......
......@@ -24,14 +24,16 @@ int
init_plugin(PluginData *pd)
{
char *argv[] = { "", NULL, NULL, NULL };
char *name;
char *arg;
/* Initialize Gnumeric plugin information. */
pd->can_unload = no_unloading_for_me;
pd->title = "Perl Plugin";
/* Initialize the Perl interpreter. */
argv[1] = gnome_unconditional_datadir_file("gnumeric/perl/lib");
arg = gnome_unconditional_datadir_file("gnumeric/perl/lib");
argv[1] = g_copy_strings("-I", arg, NULL);
g_free(arg);
argv[2] = gnome_unconditional_datadir_file("gnumeric/perl/startup.pl");
gnumeric_perl_interp = perl_alloc();
perl_construct(gnumeric_perl_interp);
......
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