From 108cf8e85e3fe31826ec535a211391085f41dcb3 Mon Sep 17 00:00:00 2001 From: dockes Date: Sat, 21 Jan 2006 15:36:05 +0000 Subject: [PATCH] enable building from inside qtgui/ --- src/Makefile.in | 10 ++++------ src/configure | 16 ++++++++++++++++ src/configure.ac | 15 +++++++++++++++ src/makesrcdist.sh | 9 ++++++++- src/qtgui/recoll.pro | 6 ++++-- 5 files changed, 47 insertions(+), 9 deletions(-) diff --git a/src/Makefile.in b/src/Makefile.in index e8080609..1617e3e6 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,4 +1,4 @@ -# @(#$Id: Makefile.in,v 1.1 2006-01-19 17:11:45 dockes Exp $ (C) 2005 J.F.Dockes +# @(#$Id: Makefile.in,v 1.2 2006-01-21 15:36:05 dockes Exp $ (C) 2005 J.F.Dockes prefix = @prefix@ exec_prefix = @exec_prefix@ @@ -12,7 +12,7 @@ all: mk/sysconf common/rclversion.h cd bincimapmime; ${MAKE} cd index; ${MAKE} recollindex cd qtgui; PATH=${PATH}:${QTDIR}/bin; export PATH; qmake recoll.pro; \ - cat ../mk/sysconf Makefile | ${MAKE} -f - depth=.. + ${MAKE} depth=.. mk/sysconf: @echo "You need to run configure first" ; exit 1 @@ -27,10 +27,8 @@ static: cd index; rm -f recollindex; \ ${MAKE} BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic recollindex cd qtgui; PATH=${PATH}:${QTDIR}/bin; export PATH; qmake recoll.pro; \ - rm -f recoll; - cat ../mk/sysconf Makefile | \ - ${MAKE} -f - \ - BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic depth=.. + rm -f recoll; \ + ${MAKE} BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic depth=.. clean: cd common; ${MAKE} clean diff --git a/src/configure b/src/configure index ae905754..74435ae6 100755 --- a/src/configure +++ b/src/configure @@ -2264,6 +2264,8 @@ it and/or set the QTDIR environment variable?" >&2;} fi cd qtgui +# We just want a .pro file: no problem with unsubstituted variables +cp recoll.pro.in recoll.pro ${QMAKE} recoll.pro if test $? != 0 ; then { { echo "$as_me:$LINENO: error: Cannot use qmake to generate a Makefile. Maybe you need to @@ -2285,6 +2287,16 @@ installation. If there is no default mkspecs, you should also set QMAKESPEC" >&2 fi cd .. +##################### End QT detection + +# We have to expand prefix in here, couldn't find a way to do it inside +# the qt gui .pro file or Makefile +m_prefix=$prefix +test "X$m_prefix" = "XNONE" && m_prefix=/usr/local +m_datadir=${m_prefix}/share +QTRECOLL_DATADIR=${m_datadir} + + @@ -2298,6 +2310,8 @@ ac_config_files="$ac_config_files sampleconf/recoll.conf" ac_config_files="$ac_config_files Makefile" +ac_config_files="$ac_config_files qtgui/recoll.pro" + for d in bincimapmime index lib query do @@ -2805,6 +2819,7 @@ do "recollinstall" ) CONFIG_FILES="$CONFIG_FILES recollinstall" ;; "sampleconf/recoll.conf" ) CONFIG_FILES="$CONFIG_FILES sampleconf/recoll.conf" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "qtgui/recoll.pro" ) CONFIG_FILES="$CONFIG_FILES qtgui/recoll.pro" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; @@ -2898,6 +2913,7 @@ s,@LIBXAPIAN@,$LIBXAPIAN,;t t s,@XAPIANCXXFLAGS@,$XAPIANCXXFLAGS,;t t s,@LIBICONV@,$LIBICONV,;t t s,@INCICONV@,$INCICONV,;t t +s,@QTRECOLL_DATADIR@,$QTRECOLL_DATADIR,;t t CEOF _ACEOF diff --git a/src/configure.ac b/src/configure.ac index 939c228b..e658d732 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -93,6 +93,8 @@ it and/or set the QTDIR environment variable?]) fi cd qtgui +# We just want a .pro file: no problem with unsubstituted variables +cp recoll.pro.in recoll.pro ${QMAKE} recoll.pro if test $? != 0 ; then AC_MSG_ERROR([Cannot use qmake to generate a Makefile. Maybe you need to @@ -108,15 +110,28 @@ installation. If there is no default mkspecs, you should also set QMAKESPEC]) fi cd .. +##################### End QT detection + +# We have to expand prefix in here, couldn't find a way to do it inside +# the qt gui .pro file or Makefile. This just means that you can't change +# prefix at build time. It works at install time because we dont' use the +# qtgui Makefile +m_prefix=$prefix +test "X$m_prefix" = "XNONE" && m_prefix=/usr/local +m_datadir=${m_prefix}/share +QTRECOLL_DATADIR=${m_datadir} + AC_SUBST(LIBXAPIAN) AC_SUBST(XAPIANCXXFLAGS) AC_SUBST(LIBICONV) AC_SUBST(INCICONV) +AC_SUBST(QTRECOLL_DATADIR) AC_CONFIG_FILES(mk/localdefs) AC_CONFIG_FILES(recollinstall) AC_CONFIG_FILES(sampleconf/recoll.conf) AC_CONFIG_FILES(Makefile) +AC_CONFIG_FILES(qtgui/recoll.pro) for d in bincimapmime index lib query do diff --git a/src/makesrcdist.sh b/src/makesrcdist.sh index 81e178ab..0446eac3 100644 --- a/src/makesrcdist.sh +++ b/src/makesrcdist.sh @@ -1,5 +1,5 @@ #!/bin/sh -# @(#$Id: makesrcdist.sh,v 1.7 2006-01-04 11:33:44 dockes Exp $ (C) 2005 J.F.Dockes +# @(#$Id: makesrcdist.sh,v 1.8 2006-01-21 15:36:05 dockes Exp $ (C) 2005 J.F.Dockes # A shell-script to make a recoll source distribution #set -x @@ -59,6 +59,13 @@ make clean yes | clean.O $TAR chfX - excludefile . | (cd $topdir;$TAR xf -) +# Fix the single/multiple page link in the header (we dont deliver the +# multi-page version and the file name is wrong anyway +sed -e '/\.\/index\.html/d' -e '/\.\/book\.html/d' \ + < $topdir/doc/user/usermanual.html > $topdir/doc/user/u1.html +diff $topdir/doc/user/u1.html $topdir/doc/user/usermanual.html +mv -f $topdir/doc/user/u1.html $topdir/doc/user/usermanual.html + CVSTAG="RECOLL-$versionforcvs" [ $dotag = "yes" ] && cvs tag -F $CVSTAG . diff --git a/src/qtgui/recoll.pro b/src/qtgui/recoll.pro index 9cb486b1..83b1f9ba 100644 --- a/src/qtgui/recoll.pro +++ b/src/qtgui/recoll.pro @@ -37,10 +37,12 @@ unix { UI_DIR = .ui MOC_DIR = .moc OBJECTS_DIR = .obj - DEFINES += RECOLL_DATADIR=\"$(RECOLL_DATADIR)\" + + DEFINES += RECOLL_DATADIR=\"/usr/local/share\" LIBS += ../lib/librcl.a ../bincimapmime/libmime.a \ - $(BSTATIC) $(LIBXAPIAN) $(LIBICONV) $(BDYNAMIC) \ + $(BSTATIC) -L/usr/local/lib -lxapian -L/usr/local/lib -liconv $(BDYNAMIC) \ -lz + INCLUDEPATH += ../common ../index ../query ../unac ../utils POST_TARGETDEPS = ../lib/librcl.a }