You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-commits@lucene.apache.org by ro...@apache.org on 2005/06/01 04:48:08 UTC
svn commit: r179339 - in /incubator/lucene4c/branches/gcj-backend: Makefile
Makefile.am config/config_nice.m4 configure.in
Author: rooneg
Date: Tue May 31 19:48:08 2005
New Revision: 179339
URL: http://svn.apache.org/viewcvs?rev=179339&view=rev
Log:
Convert the build system back to autoconf/automake/libtool.
Note: this only works with jlibtool, so APR must be built with the
--enable-experimental-libtool option.
* configure.in: create a config.nice, look for all the programs we
use.
* config/config_nice.m4: new, config.nice macros.
* Makefile.am: add dist-bzip2 argument, add version info to library,
update headers and source files, add rules for new GCJ stuff.
* Makefile: deleted.
Submitted By: Paul Querna
Added:
incubator/lucene4c/branches/gcj-backend/config/config_nice.m4
Removed:
incubator/lucene4c/branches/gcj-backend/Makefile
Modified:
incubator/lucene4c/branches/gcj-backend/Makefile.am
incubator/lucene4c/branches/gcj-backend/configure.in
Modified: incubator/lucene4c/branches/gcj-backend/Makefile.am
URL: http://svn.apache.org/viewcvs/incubator/lucene4c/branches/gcj-backend/Makefile.am?rev=179339&r1=179338&r2=179339&view=diff
==============================================================================
--- incubator/lucene4c/branches/gcj-backend/Makefile.am (original)
+++ incubator/lucene4c/branches/gcj-backend/Makefile.am Tue May 31 19:48:08 2005
@@ -1,6 +1,5 @@
-AUTOMAKE_OPTIONS = subdir-objects
-EXTRA_DIST = bootstrap
+AUTOMAKE_OPTIONS = subdir-objects dist-bzip2
MAINTAINERCLEANFILES = Makefile.in \
aclocal.m4 \
@@ -15,77 +14,119 @@
lib_LTLIBRARIES = liblucene4c.la
-liblucene4c_la_SOURCES = src/util/error.c \
- src/util/string.c \
+liblucene4c_la_LDFLAGS = -version-info 0:1:0
+liblucene4c_la_LIBADD = $(top_srcdir)/lib/lucene-1.4.3.jar
+
+
+LIBHEADERS = src/search/searcher.hxx \
+ src/search/query.hxx \
+ src/document/field.hxx \
+ src/document/document.hxx \
+ src/analysis/analyzer.hxx \
+ src/util/exception.h
+
+liblucene4c_la_SOURCES = src/util/exception.cxx \
+ src/util/error.c \
+ src/util/init.cxx \
src/util/pools.c \
- src/store/istream.c \
- src/store/directory.c \
- src/search/query.c \
- src/search/scorer.c \
- src/query_parser/parser.c \
- src/index/index.c \
- src/index/segments.c \
- src/index/segment.c \
- src/index/term.c \
- src/index/terminfos.c \
- src/index/frequencies.c \
- src/index/fielddata.c \
- src/index/fieldinfos.c \
- src/document/document.c \
- src/document/field.c
+ src/index/writer.cxx \
+ src/search/searcher.cxx \
+ src/search/index_searcher.cxx \
+ src/query_parser/query_parser.cxx \
+ src/document/field.cxx \
+ src/document/document.cxx \
+ src/analysis/standard.cxx \
+ src/org/apache/lucene4c/QueryParserHack.java \
+ src/org/apache/lucene4c/IndexSearcherHack.java
+
+BUILT_SOURCES = include/org/apache/lucene/analysis/Analyzer.h \
+ include/org/apache/lucene4c/QueryParserHack.h \
+ include/org/apache/lucene4c/IndexSearcherHack.h
+
+%.class: %.java
+ javac -classpath $(top_srcdir)/lib/lucene-1.4.3.jar -d src $<
+
+include/org/apache/lucene/analysis/Analyzer.h: build-headers
+
+include/org/apache/lucene4c/QueryParserHack.h: src/org/apache/lucene4c/QueryParserHack.class
+ $(JCCH) --classpath lib/lucene-1.4.3.jar:src org.apache.lucene4c.QueryParserHack -d include
+
+include/org/apache/lucene4c/IndexSearcherHack.h: src/org/apache/lucene4c/IndexSearcherHack.class
+ $(JCCH) --classpath lib/lucene-1.4.3.jar:src org.apache.lucene4c.IndexSearcherHack -d include
+
-noinst_PROGRAMS = test/tests
+noinst_PROGRAMS = test/test
bin_PROGRAMS = src/cmdline/lcn
-test_tests_SOURCES = test/abts.c \
- test/lcn_tests.c \
- test/util/string_test.c \
- test/index/fieldinfos_test.c \
- test/index/fielddata_test.c \
- test/index/index_test.c \
- test/index/segments_test.c \
- test/index/segment_test.c \
- test/index/terminfos_test.c \
- test/index/frequencies_test.c \
- test/store/istream_test.c \
- test/search/scorer_test.c \
- test/query_parser/parser_test.c \
- test/store/directory_test.c
+test_test_SOURCES = test/main.c
+test_test_LDADD = liblucene4c.la
src_cmdline_lcn_SOURCES = src/cmdline/main.c
-
src_cmdline_lcn_LDADD= liblucene4c.la
-test_tests_LDADD = liblucene4c.la
-
inst_includesdir = $(includedir)/lucene4c-0
-inst_includes_HEADERS = include/lcn_api.h \
- include/lcn_directory.h \
+inst_includes_HEADERS = include/lcn_analyzer.h \
include/lcn_document.h \
+ include/lcn_error.h \
include/lcn_field.h \
- include/lcn_fielddata.h \
- include/lcn_fieldinfos.h \
- include/lcn_frequencies.h \
- include/lcn_index.h \
- include/lcn_istream.h \
+ include/lcn_index_writer.h \
+ include/lcn_init.h \
+ include/lcn_pools.h \
include/lcn_query.h \
include/lcn_query_parser.h \
- include/lcn_scorer.h \
- include/lcn_segment.h \
- include/lcn_segments.h \
- include/lcn_terminfos.h \
- include/lcn_term.h \
+ include/lcn_searcher.h \
include/lcn_types.h
-INCLUDES = -Iinclude -Itest $(LCN_APR_INCLUDES)
-
-LIBS = $(LCN_APR_LIBS) -lm
-
-check:
- @./test/tests
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/test \
+ -I$(top_builddir)/include \
+ $(LCN_APR_INCLUDES)
+
+LIBS = $(LCN_LIBS)
+
+lib/lucene.o: lib/lucene-1.4.3.jar
+ $(GCJ) -c -o $@ $(top_srcdir)/lib/lucene-1.4.3.jar
+
+test:
+ @./test/test
+
+localclean:
+ $(RM) -f build-headers
+ ${RM} -rf include/org
+ ${RM} -rf src/org/apache/lucene/
+ ${RM} -rf org
+clean: localclean clean-am
+distclean: localclean distclean-am
+
+lib/lucene-1.4.3.jar:
+ touch $@
+
+build-headers: lib/lucene-1.4.3.jar
+ $(JAR) xvf $(top_srcdir)/lib/lucene-1.4.3.jar
+ $(RM) -rf META-INF
+ $(MKDIR) -p src/org/apache/lucene4c
+ $(MKDIR) -p include/org/apache/lucene4c
+ $(FIND) org -type d | \
+ $(SED) 's|org/|include/org/|' | \
+ $(XARGS) mkdir -p
+ -$(FIND) org -name \*.class | \
+ $(SED) 's|\.class||' | \
+ $(SED) 's|/|.|g' | \
+ $(XARGS) $(JCCH) -d include --classpath=$(top_srcdir)/lib/lucene-1.4.3.jar
+ touch $@
doxygen:
- @doxygen doc/doxygen.conf
+ @mkdir -p www/apidocs
+ @doxygen $(top_srcdir)/doc/doxygen.conf
@cp -r doc/doxygen/html/* www/apidocs/
+
+
+EXTRA_DIST = bootstrap \
+ config/config_nice.m4 \
+ config/find_apr.m4 \
+ lib/lucene-1.4.3.jar \
+ doc/doxygen.conf \
+ $(LIBHEADERS)
+
+.PHONY = doxygen
Added: incubator/lucene4c/branches/gcj-backend/config/config_nice.m4
URL: http://svn.apache.org/viewcvs/incubator/lucene4c/branches/gcj-backend/config/config_nice.m4?rev=179339&view=auto
==============================================================================
--- incubator/lucene4c/branches/gcj-backend/config/config_nice.m4 (added)
+++ incubator/lucene4c/branches/gcj-backend/config/config_nice.m4 Tue May 31 19:48:08 2005
@@ -0,0 +1,37 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Copyright 2005 The Apache Software Foundation
+dnl
+dnl Licensed under the Apache License, Version 2.0 (the "License");
+dnl you may not use this file except in compliance with the License.
+dnl You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl this writes a "config.nice" file which reinvokes ./configure with all
+dnl of the arguments. this is different from config.status which simply
+dnl regenerates the output files. config.nice is useful after you rebuild
+dnl ./configure (via autoconf or autogen.sh)
+AC_DEFUN([MAKE_CONFIG_NICE],[
+ echo configure: creating $1
+ rm -f $1
+ cat >$1<<EOF
+#! /bin/sh
+#
+# Created by configure
+
+EOF
+
+ for arg in [$]0 "[$]@"; do
+ if test "[$]arg" != "--no-create" -a "[$]arg" != "--no-recursion"; then
+ echo "\"[$]arg\" \\" >> $1
+ fi
+ done
+ echo '"[$]@"' >> $1
+ chmod +x $1
+])
Modified: incubator/lucene4c/branches/gcj-backend/configure.in
URL: http://svn.apache.org/viewcvs/incubator/lucene4c/branches/gcj-backend/configure.in?rev=179339&r1=179338&r2=179339&view=diff
==============================================================================
--- incubator/lucene4c/branches/gcj-backend/configure.in (original)
+++ incubator/lucene4c/branches/gcj-backend/configure.in Tue May 31 19:48:08 2005
@@ -1,11 +1,24 @@
AC_INIT(lucene4c, 0.04)
-AC_CONFIG_SRCDIR([src/store/istream.c])
+MAKE_CONFIG_NICE([config.nice])
+AC_CONFIG_SRCDIR([src/document/document.cxx])
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AC_PROG_CC
AM_PROG_CC_C_O
+AC_PROG_CXX
+AM_PROG_GCJ
+AC_CHECK_PROGS(JCCH, gcjh)
+AC_CHECK_PROGS(JAR, fastjar)
+
+AC_CHECK_PROGS(MKDIR, mkdir)
+AC_CHECK_PROGS(FIND, find)
+AC_CHECK_PROGS(SED, sed)
+AC_CHECK_PROGS(XARGS, xargs)
+AC_CHECK_PROGS(RM, rm)
+
+AC_CHECK_LIB([gcj], [JNI_CreateJavaVM])
AC_MSG_NOTICE([Apache Portable Runtime (APR) library configuration])
APR_FIND_APR("", "", 1, 1 0)
@@ -19,7 +32,9 @@
CFLAGS="$CFLAGS `$apr_config --cflags`"
LDFLAGS="$LDLAGS `$apr_config --ldflags`"
-LCN_APR_LIBS="$LIBS `$apr_config --link-ld --libs`"
+GCJ_RPATH=`echo ${GCJ} | ${SED} 's|bin/.*|lib|'`
+
+LCN_LIBS="-R${GCJ_RPATH} $LIBS `$apr_config --link-libtool --libs`"
LCN_APR_INCLUDES="`$apr_config --includes`"
LIBTOOL="`$apr_config --apr-libtool`"
@@ -49,6 +64,5 @@
AC_SUBST(ac_aux_dir)
AC_SUBST(LCN_APR_INCLUDES)
-AC_SUBST(LCN_APR_LIBS)
-
+AC_SUBST(LCN_LIBS)
AC_OUTPUT([Makefile])