Allow out-of-tree builds

This commit is contained in:
Jean-Francois Dockes 2015-11-23 11:22:25 +01:00
parent 295f763189
commit d2623c68b3
5 changed files with 78 additions and 36 deletions

View file

@ -555,7 +555,58 @@ sampleconf/mimeview
filterdir = $(pkgdatadir)/filters
filter_DATA = \
desktop/hotrecoll.py \
filters/rcl* \
filters/rcl7z \
filters/rclabw \
filters/rclaptosidman \
filters/rclaudio \
filters/rclcheckneedretry.sh \
filters/rclchm \
filters/rclconfig.py \
filters/rcldia \
filters/rcldjvu \
filters/rcldoc.py \
filters/rcldvi \
filters/rclepub \
filters/rclexec1.py \
filters/rclexecm.py \
filters/rclfb2 \
filters/rclgaim \
filters/rclgnm \
filters/rclics \
filters/rclimg \
filters/rclimg.py \
filters/rclinfo \
filters/rclkar \
filters/rclkwd \
filters/rcllatinclass.py \
filters/rcllatinstops.zip \
filters/rcllyx \
filters/rclman \
filters/rclmpdf.py \
filters/rclokulnote \
filters/rclopxml.py \
filters/rclppt.py \
filters/rclps \
filters/rclpurple \
filters/rclpython \
filters/rclrar \
filters/rclrtf.py \
filters/rclscribus \
filters/rclshowinfo \
filters/rclsiduxman \
filters/rclsoff.py \
filters/rclsvg.py \
filters/rcltar \
filters/rcltex \
filters/rcltext.py \
filters/rcluncomp \
filters/rcluncomp.py \
filters/rclwar \
filters/rclwpd \
filters/rclxls.py \
filters/rclxml.py \
filters/rclxslt.py \
filters/rclzip \
filters/ppt-dump.py \
filters/xls-dump.py \
filters/xlsxmltocsv.py \

View file

@ -460,28 +460,6 @@ if test X$enableQT = Xyes ; then
fi
QTGUI=qtgui
fi
cd $QTGUI
# We just want a .pro file: no problem with unsubstituted variables at
# this point.
test -f recoll.pro && chmod +w recoll.pro
cp recoll.pro.in recoll.pro
#echo QMAKE ${QMAKE}
${QMAKE} PREFIX=${prefix} recoll.pro
if test $? != 0 ; then
AC_MSG_ERROR([Cannot use qmake to generate a Makefile. Maybe you need to
check the QTDIR and QMAKESPEC environment variables?])
fi
# is QTDIR set and do we actually need it ?
if test X$QTDIR = X ; then
QTDIRNEEDED=`grep INCPATH Makefile | grep = | grep QTDIR`
if test "X$QTDIRNEEDED" != "X" ; then
AC_MSG_ERROR([You need to set the QTDIR variable to point to the QT
installation. If there is no default mkspecs, you should also set QMAKESPEC])
fi
fi
rm -f Makefile recoll.pro
cd ..
##### Using Qt webkit for reslist display? Else Qt textbrowser
@ -586,5 +564,6 @@ AC_SUBST(RCLLIBVERSION)
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(common/rclversion.h)
AC_CONFIG_FILES(python/recoll/setup.py)
AC_CONFIG_FILES(python/recoll/Makefile)
AC_OUTPUT

View file

@ -1,5 +1,6 @@
all:
echo libdir: $(libdir)
test '@srcdir@' = '.' || cp -rp @srcdir@/recoll .
libdir=$(libdir) python setup.py build
install:
sudo python setup.py install

View file

@ -3,10 +3,16 @@ import os
import sys
sysname = os.uname()[0]
top = os.path.join('..', '..')
# For shadow builds: references to the source tree
top = os.path.join('@srcdir@', '..', '..')
pytop = '@srcdir@'
library_dirs = [os.path.join(top, '.libs')]
# For shadow builds: reference to the top of the local tree (for finding
# generated .h files, e.g. autoconfig.h)
localtop = os.path.join(os.path.dirname(__file__), '..', '..')
library_dirs = [os.path.join(localtop, '.libs')]
if "CYGWIN" in os.environ:
libraries = ['recoll', 'xapian', 'iconv', 'z']
else:
@ -26,6 +32,8 @@ module1 = Extension('recoll',
],
include_dirs = ['/usr/local/include',
os.path.join(top, 'utils'),
os.path.join(top, 'common'),
os.path.join(localtop, 'common'),
os.path.join(top, 'common'),
os.path.join(top, 'rcldb'),
os.path.join(top, 'query'),
@ -34,7 +42,7 @@ module1 = Extension('recoll',
libraries = libraries,
library_dirs = library_dirs,
runtime_library_dirs = runtime_library_dirs,
sources = ['pyrecoll.cpp'])
sources = [os.path.join(pytop, 'pyrecoll.cpp')])
module2 = Extension('rclextract',
define_macros = [('MAJOR_VERSION', '1'),
@ -45,13 +53,14 @@ module2 = Extension('rclextract',
include_dirs = ['/usr/local/include',
os.path.join(top, 'utils'),
os.path.join(top, 'common'),
os.path.join(localtop, 'common'),
os.path.join(top, 'internfile'),
os.path.join(top, 'rcldb'),
],
libraries = libraries,
library_dirs = library_dirs,
runtime_library_dirs = runtime_library_dirs,
sources = ['pyrclextract.cpp'])
sources = [os.path.join(pytop, 'pyrclextract.cpp')])
setup (name = 'Recoll',
version = '1.0',

View file

@ -1,6 +1,7 @@
TEMPLATE = app
LANGUAGE = C++
VPATH = @srcdir@
DEFINES += BUILDING_RECOLL
@QMAKE_ENABLE_WEBKIT@ QT += webkit
@ -114,9 +115,10 @@ unix {
LIBS += @LIBXAPIAN@ $(LIBXAPIANSTATICEXTRA) \
@LIBICONV@ $(BDYNAMIC) @LIBQZEITGEIST@ -lz
INCLUDEPATH += ../common ../index ../internfile ../query ../unac \
../utils ../aspell ../rcldb ../qtgui ../xaposix \
confgui
INCLUDEPATH += ../common @srcdir@/../common @srcdir@/../index \
@srcdir@/../internfile @srcdir@/../query @srcdir@/../unac \
@srcdir@/../utils @srcdir@/../aspell @srcdir@/../rcldb \
@srcdir@/../qtgui @srcdir@/../xaposix @srcdir@/confgui
DEPENDPATH += $$INCLUDEPATH
}
@ -159,17 +161,17 @@ unix {
# Installation stuff
target.path = "$$PREFIX/bin"
imdata.files = mtpics/*.png
imdata.files = @srcdir@/mtpics/*.png
imdata.path = $$PREFIX/share/recoll/images
trdata.files = i18n/*.qm
trdata.files = @srcdir@/i18n/*.qm
trdata.path = $$PREFIX/share/recoll/translations
desktop.files += ../desktop/recoll-searchgui.desktop
desktop.files += @srcdir@/../desktop/recoll-searchgui.desktop
desktop.path = $$PREFIX/share/applications/
icona.files += ../desktop/recoll.png
icona.files += @srcdir@/../desktop/recoll.png
icona.path = $$PREFIX/share/icons/hicolor/48x48/apps/
iconb.files += ../desktop/recoll.png
iconb.files += @srcdir@/../desktop/recoll.png
iconb.path = $$PREFIX/share/pixmaps/
appdata.files = ../desktop/recoll.appdata.xml
appdata.files = @srcdir@/../desktop/recoll.appdata.xml
appdata.path = $$PREFIX/share/appdata/
INSTALLS += target imdata trdata desktop icona iconb appdata