Skip to content

Commit

Permalink
Support installing sharding plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Feb 3, 2015
1 parent 89ee3b9 commit 4d19729
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 2 deletions.
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ AC_CONFIG_FILES([
plugins/query_expanders/Makefile
plugins/ruby/Makefile
plugins/token_filters/Makefile
plugins/sharding/Makefile
examples/Makefile
examples/dictionary/Makefile
examples/dictionary/edict/Makefile
Expand Down Expand Up @@ -1343,6 +1344,9 @@ AC_SUBST(ruby_pluginsdir)
token_filter_pluginsdir="\${pluginsdir}/token_filters"
AC_SUBST(token_filter_pluginsdir)

sharding_pluginsdir="\${pluginsdir}/sharding"
AC_SUBST(sharding_pluginsdir)

AC_MSG_CHECKING(for the suffix of plugin shared libraries)
shrext_cmds=$(./libtool --config | grep '^shrext_cmds=')
eval $shrext_cmds
Expand Down
3 changes: 2 additions & 1 deletion plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright(C) 2012-2014 Brazil
# Copyright(C) 2012-2015 Brazil
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand All @@ -19,3 +19,4 @@ add_subdirectory(table)
add_subdirectory(query_expanders)
add_subdirectory(ruby)
add_subdirectory(token_filters)
add_subdirectory(sharding)
3 changes: 2 additions & 1 deletion plugins/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ SUBDIRS = \
table \
query_expanders \
ruby \
token_filters
token_filters \
sharding

EXTRA_DIST = \
CMakeLists.txt
22 changes: 22 additions & 0 deletions plugins/sharding/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright(C) 2015 Brazil
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1 as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

if(GRN_WITH_MRUBY)
set(GRN_RELATIVE_SHARDING_PLUGINS_DIR "${GRN_RELATIVE_PLUGINS_DIR}/sharding")

read_file_list(${CMAKE_CURRENT_SOURCE_DIR}/sources.am SHARDING_SCRIPTS)
install(FILES ${SHARDING_SCRIPTS}
DESTINATION "${GRN_RELATIVE_SHARDING_PLUGINS_DIR}")
endif()
9 changes: 9 additions & 0 deletions plugins/sharding/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
EXTRA_DIST = \
CMakeLists.txt

if WITH_MRUBY
sharding_plugins_DATA = \
$(sharding_scripts)
endif

include sources.am
2 changes: 2 additions & 0 deletions plugins/sharding/sources.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sharding_scripts = \
search.rb

0 comments on commit 4d19729

Please sign in to comment.