Changeset: 2d6fa7b59b83 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2d6fa7b59b83 Added Files: monetdb5/extras/rapi/00_rapi.mal monetdb5/extras/rapi/Makefile.ag monetdb5/extras/rapi/Tests/All monetdb5/extras/rapi/Tests/rapi00.mal monetdb5/extras/rapi/Tests/rapi01.mal monetdb5/extras/rapi/rapi.c monetdb5/extras/rapi/rapi.h monetdb5/extras/rapi/rapi.mal Removed Files: monetdb5/modules/mal/Tests/rapi00.mal monetdb5/modules/mal/Tests/rapi01.mal monetdb5/modules/mal/rapi.c monetdb5/modules/mal/rapi.h monetdb5/modules/mal/rapi.mal Modified Files: monetdb5/extras/Makefile.ag monetdb5/modules/mal/Makefile.ag monetdb5/modules/mal/Tests/All monetdb5/modules/mal/mal_init.mal monetdb5/tools/Makefile.ag Branch: RIntegration Log Message:
move module rapi from monetdb5/modules/mal/ to monetdb5/extras/rapi/ and made conditional compilation (and use) depending on libr availability work correctly diffs (214 lines): diff --git a/monetdb5/extras/Makefile.ag b/monetdb5/extras/Makefile.ag --- a/monetdb5/extras/Makefile.ag +++ b/monetdb5/extras/Makefile.ag @@ -15,5 +15,5 @@ # Copyright August 2008-2013 MonetDB B.V. # All Rights Reserved. -SUBDIRS = HAVE_RAPTOR?rdf HAVE_SPHINXCLIENT?sphinx HAVE_JAQL?jaql mal_optimizer_template +SUBDIRS = HAVE_RAPTOR?rdf HAVE_SPHINXCLIENT?sphinx HAVE_JAQL?jaql mal_optimizer_template HAVE_LIBR?rapi diff --git a/monetdb5/extras/rapi/00_rapi.mal b/monetdb5/extras/rapi/00_rapi.mal new file mode 100644 --- /dev/null +++ b/monetdb5/extras/rapi/00_rapi.mal @@ -0,0 +1,19 @@ +# The contents of this file are subject to the MonetDB Public License +# Version 1.1 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# http://www.monetdb.org/Legal/MonetDBLicense +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +# License for the specific language governing rights and limitations +# under the License. +# +# The Original Code is the MonetDB Database System. +# +# The Initial Developer of the Original Code is CWI. +# Portions created by CWI are Copyright (C) 1997-July 2008 CWI. +# Copyright August 2008-2013 MonetDB B.V. +# All Rights Reserved. + +# This loads the MonetDB/RAPI module +include rapi; diff --git a/monetdb5/extras/rapi/Makefile.ag b/monetdb5/extras/rapi/Makefile.ag new file mode 100644 --- /dev/null +++ b/monetdb5/extras/rapi/Makefile.ag @@ -0,0 +1,47 @@ +# The contents of this file are subject to the MonetDB Public License +# Version 1.1 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# http://www.monetdb.org/Legal/MonetDBLicense +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +# License for the specific language governing rights and limitations +# under the License. +# +# The Original Code is the MonetDB Database System. +# +# The Initial Developer of the Original Code is CWI. +# Portions created by CWI are Copyright (C) 1997-July 2008 CWI. +# Copyright August 2008-2013 MonetDB B.V. +# All Rights Reserved. + +INCLUDES = \ + ../../../common/options \ + ../../../common/stream \ + ../../../gdk \ + ../../mal \ + $(libr_CFLAGS) + +MTSAFE + +lib__rapi = { + MODULE + DIR = libdir/monetdb5 + SOURCES = rapi.h rapi.c + LIBS = $(libr_LIBS) +} + +headers_rapi_mal = { + HEADERS = mal + DIR = libdir/monetdb5 + SOURCES = rapi.mal +} + +headers_autoload = { + HEADERS = mal + DIR = libdir/monetdb5/autoload + SOURCES = 00_rapi.mal +} + +EXTRA_DIST_DIR = Tests +EXTRA_DIST = 00_rapi.mal rapi.mal diff --git a/monetdb5/extras/rapi/Tests/All b/monetdb5/extras/rapi/Tests/All new file mode 100644 --- /dev/null +++ b/monetdb5/extras/rapi/Tests/All @@ -0,0 +1,2 @@ +HAVE_LIBR?rapi00 +HAVE_LIBR?rapi01 diff --git a/monetdb5/modules/mal/Tests/rapi00.mal b/monetdb5/extras/rapi/Tests/rapi00.mal rename from monetdb5/modules/mal/Tests/rapi00.mal rename to monetdb5/extras/rapi/Tests/rapi00.mal diff --git a/monetdb5/modules/mal/Tests/rapi01.mal b/monetdb5/extras/rapi/Tests/rapi01.mal rename from monetdb5/modules/mal/Tests/rapi01.mal rename to monetdb5/extras/rapi/Tests/rapi01.mal diff --git a/monetdb5/modules/mal/rapi.c b/monetdb5/extras/rapi/rapi.c rename from monetdb5/modules/mal/rapi.c rename to monetdb5/extras/rapi/rapi.c --- a/monetdb5/modules/mal/rapi.c +++ b/monetdb5/extras/rapi/rapi.c @@ -24,6 +24,8 @@ #include "monetdb_config.h" #include "rapi.h" +#include <string.h> + // The R-environment should be single threaded, calling for some protective measures. static MT_Lock rapiLock; static int rapiInitialized; diff --git a/monetdb5/modules/mal/rapi.h b/monetdb5/extras/rapi/rapi.h rename from monetdb5/modules/mal/rapi.h rename to monetdb5/extras/rapi/rapi.h --- a/monetdb5/modules/mal/rapi.h +++ b/monetdb5/extras/rapi/rapi.h @@ -23,8 +23,6 @@ */ #ifndef _RAPI_LIB_ #define _RAPI_LIB_ -#include "monetdb_config.h" -#include <string.h> #include "mal.h" #include "mal_exception.h" @@ -39,7 +37,7 @@ #include <R_ext/Parse.h> #ifdef WIN32 -#if !defined(LIBMAL) && !defined(LIBATOMS) && !defined(LIBKERNEL) && !defined(LIBMAL) && !defined(LIBOPTIMIZER) && !defined(LIBSCHEDULER) && !defined(LIBMONETDB5) +#ifndef LIBRAPI #define rapi_export extern __declspec(dllimport) #else #define rapi_export extern __declspec(dllexport) diff --git a/monetdb5/modules/mal/rapi.mal b/monetdb5/extras/rapi/rapi.mal rename from monetdb5/modules/mal/rapi.mal rename to monetdb5/extras/rapi/rapi.mal diff --git a/monetdb5/modules/mal/Makefile.ag b/monetdb5/modules/mal/Makefile.ag --- a/monetdb5/modules/mal/Makefile.ag +++ b/monetdb5/modules/mal/Makefile.ag @@ -21,8 +21,7 @@ INCLUDES = ../../mal ../atoms ../kernel ../../../common/stream \ ../../../common/utils \ ../../../gdk \ - $(pcre_CFLAGS) $(zlib_CFLAGS) $(libr_CFLAGS) \ - $(BZIP_INCS) $(MSGCONTROL_FLAGS) + $(pcre_CFLAGS) $(zlib_CFLAGS) $(BZIP_INCS) $(MSGCONTROL_FLAGS) MTSAFE @@ -48,7 +47,6 @@ lib_mal = { mat.c mat.h \ mdb.c mdb.h \ mkey.c mkey.h \ - rapi.c rapi.h \ pcre.c \ pqueue.c pqueue.h \ profiler.c profiler.h \ @@ -76,7 +74,7 @@ headers_mal = { profiler.mal const.mal batExtensions.mal \ inspect.mal manual.mal mal_io.mal pqueue.mal mkey.mal \ iterator.mal clients.mal \ - factories.mal groupby.mal mdb.mal pcre.mal rapi.mal mat.mal \ + factories.mal groupby.mal mdb.mal pcre.mal mat.mal \ urlbox.mal transaction.mal \ mal_mapi.mal sabaoth.mal remote.mal \ txtsim.mal recycle.mal \ @@ -86,7 +84,7 @@ headers_mal = { } EXTRA_DIST = batExtensions.mal iterator.mal constraints.mal \ - groupby.mal mal_init.mal manual.mal mkey.mal pcre.mal rapi.mal \ + groupby.mal mal_init.mal manual.mal mkey.mal pcre.mal \ profiler.mal recycle.mal remote.mal sabaoth.mal trader.mal \ transaction.mal txtsim.mal tablet.mal tablet.h sample.mal json_util.mal \ mal_mapi.mal mat.mal tokenizer.mal pqueue.mal calc.mal \ diff --git a/monetdb5/modules/mal/Tests/All b/monetdb5/modules/mal/Tests/All --- a/monetdb5/modules/mal/Tests/All +++ b/monetdb5/modules/mal/Tests/All @@ -65,9 +65,6 @@ mapi06 mapi07 mapi01 -rapi00 -rapi01 - cluster00 tokenizer00 zorder diff --git a/monetdb5/modules/mal/mal_init.mal b/monetdb5/modules/mal/mal_init.mal --- a/monetdb5/modules/mal/mal_init.mal +++ b/monetdb5/modules/mal/mal_init.mal @@ -110,7 +110,6 @@ include cluster; include txtsim; include tokenizer; include zorder; -include rapi; # library logger; # include logger; diff --git a/monetdb5/tools/Makefile.ag b/monetdb5/tools/Makefile.ag --- a/monetdb5/tools/Makefile.ag +++ b/monetdb5/tools/Makefile.ag @@ -37,7 +37,7 @@ lib_monetdb5 = { $(UUID_LIBS) $(curl_LIBS) \ $(MATH_LIBS) $(SOCKET_LIBS) $(MALLOC_LIBS) $(PTHREAD_LIBS) \ $(DL_LIBS) $(READLINE_LIBS) $(openssl_LIBS) $(pcre_LIBS) \ - $(LTLIBICONV) $(zlib_LIBS) $(libxml2_LIBS) $(libr_LIBS) + $(LTLIBICONV) $(zlib_LIBS) $(libxml2_LIBS) } headers_pc = { _______________________________________________ checkin-list mailing list [email protected] https://www.monetdb.org/mailman/listinfo/checkin-list
