From 4fe4a34949a5084d939d2808c211b8a4a6fc6a42 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Tue, 20 Sep 2022 09:32:12 +0200 Subject: [PATCH] add configure option to disable building the indexer, and avoid building the recoll lib if nothing needs it --- src/Makefile.am | 16 +++++++++++----- src/configure.ac | 9 +++++++++ src/doc/man/rclgrep.1 | 12 ++++++++++++ 3 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 src/doc/man/rclgrep.1 diff --git a/src/Makefile.am b/src/Makefile.am index 8cced3eb..2bba523d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -59,7 +59,10 @@ else endif librcldir = $(libdir)/recoll -librcl_LTLIBRARIES = librecoll.la +librcl_LTLIBRARIES = +if MAKE_RECOLL_LIB +librcl_LTLIBRARIES += librecoll.la +endif librecoll_la_SOURCES = \ aspell/rclaspell.cpp \ @@ -310,7 +313,10 @@ PicStatic: $(librecoll_la_OBJECTS) $(LIBTOOL) --tag=LD --mode=link gcc -g -O -o librecoll.la \ $(librecoll_la_OBJECTS) -bin_PROGRAMS = recollindex +bin_PROGRAMS = +if MAKEINDEXER + bin_PROGRAMS += recollindex +endif if MAKECMDLINE bin_PROGRAMS += recollq endif @@ -628,13 +634,13 @@ install-exec-local:: rclpychm-install clean-local:: rclpychm-clean rclpychm: (cd python/pychm; set -x; \ - for v in 2 3;do \ + for v in 3;do \ test -n "`which python$${v}`" && python$${v} setup.py build;\ done \ ) rclpychm-install: (cd python/pychm; set -x; \ - for v in 2 3;do test -n "`which python$${v}`" && \ + for v in 3;do test -n "`which python$${v}`" && \ python$${v} setup.py install \ --prefix=${prefix} --root=$${DESTDIR:-/} $(OPTSFORPYTHON); \ done \ @@ -787,7 +793,7 @@ doc/user/usermanual.html: doc/user/usermanual.xml endif dist_man1_MANS = doc/man/recoll.1 doc/man/recollq.1 \ - doc/man/recollindex.1 doc/man/xadump.1 + doc/man/recollindex.1 doc/man/xadump.1 doc/man/rclgrep.1 dist_man5_MANS = doc/man/recoll.conf.5 dist-hook: diff --git a/src/configure.ac b/src/configure.ac index 1f1b8b9b..884eba78 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -320,6 +320,11 @@ XAPIANCXXFLAGS=`$XAPIAN_CONFIG --cxxflags` PKG_CHECK_MODULES([XSLT], [libxslt], [], AC_MSG_ERROR([libxslt])) +AC_ARG_ENABLE(indexer, + AS_HELP_STRING([--disable-indexer],[Disable building the recollindex indexer.]), + enableINDEXER=$enableval, enableINDEXER="yes") +AM_CONDITIONAL(MAKEINDEXER, [test X$enableINDEXER = Xyes]) + AC_ARG_ENABLE(xadump, AS_HELP_STRING([--enable-xadump],[Enable building the xadump low level Xapian access program.]), enableXADUMP=$enableval, enableXADUMP="no") @@ -511,6 +516,10 @@ fi #echo X_CFLAGS "'$X_CFLAGS'" X_PRE_LIBS "'$X_PRE_LIBS'" X_LIBS \ # "'$X_LIBS'" X_LIBX11 "'$X_LIBX11'" X_EXTRA_LIBS "'$X_EXTRA_LIBS'" + +AM_CONDITIONAL([MAKE_RECOLL_LIB], [test X$buildtestmains = Xno -a X$pythonEnabled = Xno + -a X$enableINDEXER = Xno -a X$enableXADUMP = Xno -a X$enableQT = Xno -a X$enableRECOLLQ = Xno]) + # For communicating the value of RECOLL_DATADIR to non-make-based # subpackages like python-recoll, we have to expand prefix in here, because # things like "datadir = ${prefix}/share" (which is what we'd get by diff --git a/src/doc/man/rclgrep.1 b/src/doc/man/rclgrep.1 new file mode 100644 index 00000000..00159a07 --- /dev/null +++ b/src/doc/man/rclgrep.1 @@ -0,0 +1,12 @@ +.TH RCLGREP 1 "20 September 2022" +.SH NAME +rclgrep \- grep-like program based on the recoll data extraction functions +.SH SYNOPSIS +.B rclgrep +[ +.B \--config + +] + +.SH DESCRIPTION +Some bla bla