diff --git a/modules/scripting/perl/Makefile b/modules/scripting/perl/Makefile index ec006ba..b7e4dbd 100644 --- a/modules/scripting/perl/Makefile +++ b/modules/scripting/perl/Makefile @@ -12,7 +12,7 @@ include ../../../buildsys.mk plugindir = $(MODDIR)/modules/scripting -CPPFLAGS += -I../../../include -I. $(PERL_CFLAGS) +CPPFLAGS += -I../../../include -I. $(PERL_CFLAGS) -DPERL_MODDIR='"$(plugindir)"' CFLAGS += $(PLUGIN_CFLAGS) LDFLAGS += $(PLUGIN_LDFLAGS) $(PERL_LIBS) LIBS += -L../../../libathemecore -lathemecore ${LDFLAGS_RPATH} @@ -28,11 +28,11 @@ perlxsi.c: perl -MExtUtils::Embed -e xsinit install-extra: - ${MKDIR_P} ${plugindir}/lib - ${INSTALL} -m644 lib/*.pl lib/*.pm ${plugindir}/lib - ${MKDIR_P} ${plugindir}/lib/Atheme - ${INSTALL} -m644 lib/Atheme/*.pm ${plugindir}/lib/Atheme - ${MKDIR_P} ${plugindir}/lib/Atheme/Internal - ${INSTALL} -m644 lib/Atheme/Internal/*.pm ${plugindir}/lib/Atheme/Internal - ${MKDIR_P} ${plugindir}/examples - ${INSTALL} -m644 examples/*.pl ${plugindir}/examples + ${MKDIR_P} '${DESTDIR}'${plugindir}/lib + ${INSTALL} -m644 lib/*.pl lib/*.pm '${DESTDIR}'${plugindir}/lib + ${MKDIR_P} '${DESTDIR}'${plugindir}/lib/Atheme + ${INSTALL} -m644 lib/Atheme/*.pm '${DESTDIR}'${plugindir}/lib/Atheme + ${MKDIR_P} '${DESTDIR}'${plugindir}/lib/Atheme/Internal + ${INSTALL} -m644 lib/Atheme/Internal/*.pm '${DESTDIR}'${plugindir}/lib/Atheme/Internal + ${MKDIR_P} '${DESTDIR}'${plugindir}/examples + ${INSTALL} -m644 examples/*.pl '${DESTDIR}'${plugindir}/examples diff --git a/modules/scripting/perl/perl_module.c b/modules/scripting/perl/perl_module.c index ba93cdf..dfa8622 100644 --- a/modules/scripting/perl/perl_module.c +++ b/modules/scripting/perl/perl_module.c @@ -24,7 +24,7 @@ DECLARE_MODULE_V1 * Definitions: * PERL_INIT_FILE is the perl script that is used to boot the Atheme interface. */ -#define PERL_INIT_FILE PREFIX "/modules/scripting/lib/init.pl" +#define PERL_INIT_FILE PERL_MODDIR "/lib/init.pl" /* * External functions: