1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-07-29 15:41:13 +03:00

applied plugin patch for Windows by Joel Reed Daniel

* tests/plugins/testplugin.c win32/Makefile.msvc win32/configure.js:
  applied plugin patch for Windows by Joel Reed
Daniel
This commit is contained in:
Daniel Veillard
2005-01-30 19:02:09 +00:00
parent cea555bf1e
commit e04fbb1e27
4 changed files with 55 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Sun Jan 30 20:01:21 CET 2005 Daniel Veillard <daniel@veillard.com>
* tests/plugins/testplugin.c win32/Makefile.msvc win32/configure.js:
applied plugin patch for Windows by Joel Reed
Fri Jan 28 01:00:56 CET 2005 Daniel Veillard <daniel@veillard.com> Fri Jan 28 01:00:56 CET 2005 Daniel Veillard <daniel@veillard.com>
* win32/configure.js: Makefile fixes for Widows from Joel Reed * win32/configure.js: Makefile fixes for Widows from Joel Reed

View File

@ -9,7 +9,6 @@
* daniel@veillard.com * daniel@veillard.com
*/ */
#define IN_LIBXSLT
#include <libxslt/libxslt.h> #include <libxslt/libxslt.h>
#ifdef WITH_MODULES #ifdef WITH_MODULES
@ -33,6 +32,14 @@
#define XSLT_TESTPLUGIN_URL "http://xmlsoft.org/xslt/testplugin" #define XSLT_TESTPLUGIN_URL "http://xmlsoft.org/xslt/testplugin"
/* make sure init function is exported on win32 */
#if defined(_WIN32)
#define PLUGINPUBFUN __declspec(dllexport)
#else
#define PLUGINPUBFUN
#endif
/************************************************************************ /************************************************************************
* * * *
* Test plugin module http://xmlsoft.org/xslt/testplugin * * Test plugin module http://xmlsoft.org/xslt/testplugin *
@ -311,7 +318,7 @@ xsltExtStyleShutdownTest(xsltStylesheetPtr style ATTRIBUTE_UNUSED,
*/ */
void void
XSLTPUBFUN xmlsoft_org_xslt_testplugin_init(void) PLUGINPUBFUN xmlsoft_org_xslt_testplugin_init(void)
{ {
xsltRegisterExtModuleFull((const xmlChar *) XSLT_TESTPLUGIN_URL, xsltRegisterExtModuleFull((const xmlChar *) XSLT_TESTPLUGIN_URL,
xsltExtInitTest, xsltExtShutdownTest, xsltExtInitTest, xsltExtShutdownTest,

View File

@ -329,6 +329,38 @@ APPLIBS = $(LIBS) libxml2.lib
# Builds xsltproc and friends. Uses the implicit rule for commands. # Builds xsltproc and friends. Uses the implicit rule for commands.
$(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxslt libxslta libexslt libexslta $(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxslt libxslta libexslt libexslta
# plugins only work with non-static builds currently.
!if "$(STATIC)" == "0"
TESTPLUGIN_SRCDIR = $(BASEDIR)\tests\plugins
TESTPLUGIN_DIR = $(TESTPLUGIN_SRCDIR)\plugin
TESTPLUGIN_SO = xmlsoft_org_xslt_testplugin.dll
TESTPLUGIN_OBJS = $(TESTPLUGIN_DIR)\testplugin.obj
testplugin:
if exist $(TESTPLUGIN_DIR) rmdir /S /Q $(TESTPLUGIN_DIR)
$(MAKE) $(TESTPLUGIN_DIR)\$(TESTPLUGIN_SO)
$(TESTPLUGIN_DIR) :
if not exist $(TESTPLUGIN_DIR) mkdir $(TESTPLUGIN_DIR)
{$(TESTPLUGIN_SRCDIR)}.c{$(TESTPLUGIN_DIR)}.obj::
$(CC) $(CFLAGS) /Fo$(TESTPLUGIN_DIR)\ /c $<
# Creates the testplugin archive.
$(TESTPLUGIN_DIR)\$(TESTPLUGIN_SO) : $(TESTPLUGIN_DIR) $(TESTPLUGIN_OBJS) libxslt
$(LD) $(LDFLAGS) /DLL $(XSLT_IMP) $(APPLIBS) $(LIBS)\
/OUT:$(TESTPLUGIN_DIR)\$(TESTPLUGIN_SO) \
$(TESTPLUGIN_OBJS)
!else
testplugin:
@echo "plugins are disabled with static=yes"
!endif
# Source dependences should be autogenerated somehow here, but how to # Source dependences should be autogenerated somehow here, but how to
# do it? I have no clue. # do it? I have no clue.

View File

@ -396,6 +396,15 @@ if (cruntime == "/MT" || cruntime == "/MTd" ||
buildStatic = 1; buildStatic = 1;
} }
if (buildStatic == 1 && withModules == 1) {
WScript.Echo("Warning: Disabling plugin support.");
WScript.Echo("");
WScript.Echo("Modules cannot be enabled when a statically linked cruntime has");
WScript.Echo("been selected, or when xsltproc.exe is linked statically to libxslt.");
WScript.Echo("");
withModules=0;
}
dirSep = "\\"; dirSep = "\\";
//if (compiler == "mingw") //if (compiler == "mingw")
// dirSep = "/"; // dirSep = "/";