make it easier to maintain the kio cmake by moving as much stuff as possible to autoconfig.h, merging libmime and librcl etc.

This commit is contained in:
dockes 2008-11-24 15:47:40 +00:00
parent afd369d2c4
commit aff65d54ac
21 changed files with 1167 additions and 250 deletions

View File

@ -1,4 +1,4 @@
# @(#$Id: Makefile.in,v 1.15 2008-09-07 07:22:33 dockes Exp $ (C) 2005 J.F.Dockes
# @(#$Id: Makefile.in,v 1.16 2008-11-24 15:47:40 dockes Exp $ (C) 2005 J.F.Dockes
prefix = @prefix@
exec_prefix = @exec_prefix@
@ -13,7 +13,6 @@ QTGUI = @QTGUI@
all: mk/sysconf common/rclversion.h
cd lib; ${MAKE}
cd bincimapmime; ${MAKE}
cd index; ${MAKE} recollindex
cd $(QTGUI); ${QMAKE} recoll.pro; ${MAKE} depth=..
@ -26,7 +25,6 @@ common/rclversion.h: VERSION
static: mk/sysconf common/rclversion.h
cd lib; ${MAKE}
cd bincimapmime; ${MAKE}
cd index; rm -f recollindex; \
${MAKE} BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic recollindex
cd $(QTGUI); $(QMAKE) recoll.pro; \
@ -38,7 +36,6 @@ clean:
-cd index; ${MAKE} clean
-cd internfile; ${MAKE} clean
-cd lib; ${MAKE} clean
-cd bincimapmime; ${MAKE} clean
-cd query; ${MAKE} clean
-cd utils; ${MAKE} clean
#cd doc/user; ${MAKE} clean
@ -59,7 +56,7 @@ distclean: clean
recollinstall \
lib/*.dep common/autoconfig.h \
wasabi/Makefile wasabi/client/Makefile wasabi/server/Makefile
rm -f bincimapmime/alldeps index/alldeps lib/alldeps query/alldeps
rm -f index/alldeps lib/alldeps query/alldeps
rm -rf autom4te.cache
(cd qt4gui; make -f uifrom3 distclean)

View File

@ -18,9 +18,6 @@ $(BIGLIB): force
cd $(depth)/lib;$(MAKE)
force:
$(MIMELIB):
cd $(depth)/bincimapmime;$(MAKE)
depend: alldeps.stamp
alldeps.stamp : $(SRCS)
$(CXX) -M $(ALL_CXXFLAGS) $(SRCS) > alldeps

View File

@ -1,4 +1,4 @@
# @(#$Id: Makefile,v 1.14 2006-11-20 11:17:53 dockes Exp $ (C) 2005 J.F.Dockes
# @(#$Id: Makefile,v 1.15 2008-11-24 15:47:40 dockes Exp $ (C) 2005 J.F.Dockes
depth = ..
include $(depth)/mk/sysconf
@ -25,7 +25,7 @@ trtextsplit.o : textsplit.cpp
$(CXX) $(ALL_CXXFLAGS) -DTEST_TEXTSPLIT -c -o trtextsplit.o \
textsplit.cpp
RCLCONFIG_OBJS= trrclconfig.o $(BIGLIB) $(MIMELIB)
RCLCONFIG_OBJS= trrclconfig.o $(BIGLIB)
rclconfig : $(RCLCONFIG_OBJS)
$(CXX) $(ALL_CXXFLAGS) -o rclconfig $(RCLCONFIG_OBJS) \
$(LIBICONV) $(LIBSYS)

View File

@ -29,3 +29,8 @@
/* mkdtemp availability */
#undef HAVE_MKDTEMP
#undef HAVE_SYS_MOUNT_H
#undef HAVE_SYS_STATFS_H
#undef HAVE_SYS_STATVFS_H
#undef HAVE_SYS_VFS_H

View File

@ -16,7 +16,7 @@
*/
#ifndef _RCLCONFIG_H_INCLUDED_
#define _RCLCONFIG_H_INCLUDED_
/* @(#$Id: rclconfig.h,v 1.42 2008-10-08 16:15:22 dockes Exp $ (C) 2004 J.F.Dockes */
/* @(#$Id: rclconfig.h,v 1.43 2008-11-24 15:47:40 dockes Exp $ (C) 2004 J.F.Dockes */
#include <list>
#include <string>
@ -64,6 +64,8 @@ class RclConfig {
/** Return the directory where this configuration is stored */
string getConfDir() {return m_confdir;}
/** Get the local value for /usr/local/share/recoll/ */
const string& getDatadir() {return m_datadir;}
/** Set current directory reference, and fetch automatic parameters. */
void setKeyDir(const string &dir);

1210
src/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,8 @@ EOF
exit 1
fi
AC_CHECK_HEADERS(sys/mount.h sys/statfs.h sys/statvfs.h sys/vfs.h)
# Use aspell to provide spelling expansions ?
# The default is yes. If we do find an aspell installation, we use it. Else
# we do compile the aspell module using an internal copy of aspell.h

View File

@ -6,7 +6,7 @@ SRCS = recollindex.cpp rclmonrcv.cpp rclmonprc.cpp
all: depend $(PROGS) $(BIGLIB)
RECOLLINDEX_OBJS= recollindex.o rclmonrcv.o rclmonprc.o $(BIGLIB) $(MIMELIB)
RECOLLINDEX_OBJS= recollindex.o rclmonrcv.o rclmonprc.o $(BIGLIB)
recollindex : $(RECOLLINDEX_OBJS)
$(CXX) $(ALL_CXXFLAGS) -o recollindex $(RECOLLINDEX_OBJS) \
$(BSTATIC) $(LIBXAPIAN) $(LIBICONV) $(BDYNAMIC) \
@ -40,9 +40,6 @@ $(BIGLIB): force
cd $(depth)/lib;$(MAKE)
force:
$(MIMELIB):
cd $(depth)/bincimapmime;$(MAKE)
depend: alldeps.stamp
alldeps.stamp : $(SRCS)
$(CXX) -M $(ALL_CXXFLAGS) $(SRCS) > alldeps

View File

@ -1,4 +1,4 @@
# @(#$Id: Makefile,v 1.3 2007-10-03 14:53:37 dockes Exp $ (C) 2005 J.F.Dockes
# @(#$Id: Makefile,v 1.4 2008-11-24 15:47:40 dockes Exp $ (C) 2005 J.F.Dockes
depth = ..
include $(depth)/mk/sysconf
@ -11,7 +11,7 @@ $(BIGLIB): force
cd $(depth)/lib;$(MAKE)
force:
INTERNFILE_OBJS= trinternfile.o $(BIGLIB) $(MIMELIB)
INTERNFILE_OBJS= trinternfile.o $(BIGLIB)
internfile : $(INTERNFILE_OBJS)
$(CXX) $(ALL_CXXFLAGS) -o internfile $(INTERNFILE_OBJS) \
$(LIBICONV) $(LIBSYS)
@ -19,7 +19,7 @@ trinternfile.o : internfile.cpp
$(CXX) $(ALL_CXXFLAGS) -DTEST_INTERNFILE -c -o trinternfile.o \
internfile.cpp
MH_MBOX_OBJS= trmh_mbox.o $(BIGLIB) $(MIMELIB)
MH_MBOX_OBJS= trmh_mbox.o $(BIGLIB)
mh_mbox : $(MH_MBOX_OBJS)
$(CXX) $(ALL_CXXFLAGS) -o mh_mbox $(MH_MBOX_OBJS) \
$(LIBICONV) $(LIBSYS)

View File

@ -2,21 +2,19 @@
depth = ..
include $(depth)/mk/sysconf
UNACCFLAGS = $(CFLAGS) -g -I. -I$(depth)/unac $(INCICONV) -DUNAC_VERSION=\"1.0.7\"
LIBS = librcl.a
all: $(LIBS)
OBJS = rclaspell.o rclconfig.o rclinit.o textsplit.o unacpp.o csguess.o indexer.o mimetype.o htmlparse.o myhtmlparse.o mimehandler.o internfile.o mh_exec.o mh_html.o mh_mail.o mh_mbox.o mh_text.o docseq.o docseqdb.o docseqhist.o filtseq.o history.o plaintorich.o recollq.o reslistpager.o sortseq.o wasastringtoquery.o wasatorcl.o pathhash.o rcldb.o rcldoc.o rclquery.o searchdata.o stemdb.o stoplist.o base64.o conftree.o copyfile.o debuglog.o execmd.o fstreewalk.o idfile.o fileudi.o md5.o mimeparse.o pathut.o readfile.o smallut.o transcode.o wipedir.o x11mon.o
DEPS = rclaspell.dep.stamp rclconfig.dep.stamp rclinit.dep.stamp textsplit.dep.stamp unacpp.dep.stamp csguess.dep.stamp indexer.dep.stamp mimetype.dep.stamp htmlparse.dep.stamp myhtmlparse.dep.stamp mimehandler.dep.stamp internfile.dep.stamp mh_exec.dep.stamp mh_html.dep.stamp mh_mail.dep.stamp mh_mbox.dep.stamp mh_text.dep.stamp docseq.dep.stamp docseqdb.dep.stamp docseqhist.dep.stamp filtseq.dep.stamp history.dep.stamp plaintorich.dep.stamp recollq.dep.stamp reslistpager.dep.stamp sortseq.dep.stamp wasastringtoquery.dep.stamp wasatorcl.dep.stamp pathhash.dep.stamp rcldb.dep.stamp rcldoc.dep.stamp rclquery.dep.stamp searchdata.dep.stamp stemdb.dep.stamp stoplist.dep.stamp base64.dep.stamp conftree.dep.stamp copyfile.dep.stamp debuglog.dep.stamp execmd.dep.stamp fstreewalk.dep.stamp idfile.dep.stamp fileudi.dep.stamp md5.dep.stamp mimeparse.dep.stamp pathut.dep.stamp readfile.dep.stamp smallut.dep.stamp transcode.dep.stamp wipedir.dep.stamp x11mon.dep.stamp
OBJS = rclaspell.o rclconfig.o rclinit.o textsplit.o unacpp.o csguess.o indexer.o mimetype.o htmlparse.o myhtmlparse.o mimehandler.o internfile.o mh_exec.o mh_html.o mh_mail.o mh_mbox.o mh_text.o docseq.o docseqdb.o docseqhist.o filtseq.o history.o plaintorich.o recollq.o reslistpager.o sortseq.o wasastringtoquery.o wasatorcl.o pathhash.o rcldb.o rcldoc.o rclquery.o searchdata.o stemdb.o stoplist.o base64.o conftree.o copyfile.o debuglog.o execmd.o fstreewalk.o idfile.o fileudi.o md5.o mimeparse.o pathut.o readfile.o smallut.o transcode.o wipedir.o x11mon.o mime-getpart.o mime-parsefull.o mime-parseonlyheader.o mime-printbody.o mime-printdoc.o mime-printheader.o mime.o convert.o iodevice.o iofactory.o
DEPS = rclaspell.dep.stamp rclconfig.dep.stamp rclinit.dep.stamp textsplit.dep.stamp unacpp.dep.stamp csguess.dep.stamp indexer.dep.stamp mimetype.dep.stamp htmlparse.dep.stamp myhtmlparse.dep.stamp mimehandler.dep.stamp internfile.dep.stamp mh_exec.dep.stamp mh_html.dep.stamp mh_mail.dep.stamp mh_mbox.dep.stamp mh_text.dep.stamp docseq.dep.stamp docseqdb.dep.stamp docseqhist.dep.stamp filtseq.dep.stamp history.dep.stamp plaintorich.dep.stamp recollq.dep.stamp reslistpager.dep.stamp sortseq.dep.stamp wasastringtoquery.dep.stamp wasatorcl.dep.stamp pathhash.dep.stamp rcldb.dep.stamp rcldoc.dep.stamp rclquery.dep.stamp searchdata.dep.stamp stemdb.dep.stamp stoplist.dep.stamp base64.dep.stamp conftree.dep.stamp copyfile.dep.stamp debuglog.dep.stamp execmd.dep.stamp fstreewalk.dep.stamp idfile.dep.stamp fileudi.dep.stamp md5.dep.stamp mimeparse.dep.stamp pathut.dep.stamp readfile.dep.stamp smallut.dep.stamp transcode.dep.stamp wipedir.dep.stamp x11mon.dep.stamp mime-getpart.dep.stamp mime-parsefull.dep.stamp mime-parseonlyheader.dep.stamp mime-printbody.dep.stamp mime-printdoc.dep.stamp mime-printheader.dep.stamp mime.dep.stamp convert.dep.stamp iodevice.dep.stamp iofactory.dep.stamp
librcl.a : $(DEPS) $(OBJS) unac.o
ar ru librcl.a $(OBJS) unac.o
$(RANLIB) librcl.a
unac.o : $(depth)/unac/unac.c $(depth)/unac/unac.h
$(CC) $(UNACCFLAGS) -c $(depth)/unac/unac.c
$(CC) $(ALL_CXXFLAGS) -c $(depth)/unac/unac.c
rclaspell.o : ../aspell/rclaspell.cpp
$(CXX) $(ALL_CXXFLAGS) -c ../aspell/rclaspell.cpp
rclconfig.o : ../common/rclconfig.cpp
@ -119,6 +117,26 @@ wipedir.o : ../utils/wipedir.cpp
$(CXX) $(ALL_CXXFLAGS) -c ../utils/wipedir.cpp
x11mon.o : ../utils/x11mon.cpp
$(CXX) $(ALL_CXXFLAGS) -c ../utils/x11mon.cpp
mime-getpart.o : ../bincimapmime/mime-getpart.cc
$(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-getpart.cc
mime-parsefull.o : ../bincimapmime/mime-parsefull.cc
$(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-parsefull.cc
mime-parseonlyheader.o : ../bincimapmime/mime-parseonlyheader.cc
$(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-parseonlyheader.cc
mime-printbody.o : ../bincimapmime/mime-printbody.cc
$(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-printbody.cc
mime-printdoc.o : ../bincimapmime/mime-printdoc.cc
$(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-printdoc.cc
mime-printheader.o : ../bincimapmime/mime-printheader.cc
$(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-printheader.cc
mime.o : ../bincimapmime/mime.cc
$(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime.cc
convert.o : ../bincimapmime/convert.cc
$(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/convert.cc
iodevice.o : ../bincimapmime/iodevice.cc
$(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/iodevice.cc
iofactory.o : ../bincimapmime/iofactory.cc
$(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/iofactory.cc
depend: $(DEPS)
clean:
rm -f $(OBJS) $(LIBS) $(DEPS) unac.o
@ -329,3 +347,43 @@ include smallut.dep
include transcode.dep
include wipedir.dep
include x11mon.dep
mime-getpart.dep.stamp : ../bincimapmime/mime-getpart.cc
$(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-getpart.cc > mime-getpart.dep
touch mime-getpart.dep.stamp
mime-parsefull.dep.stamp : ../bincimapmime/mime-parsefull.cc
$(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-parsefull.cc > mime-parsefull.dep
touch mime-parsefull.dep.stamp
mime-parseonlyheader.dep.stamp : ../bincimapmime/mime-parseonlyheader.cc
$(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-parseonlyheader.cc > mime-parseonlyheader.dep
touch mime-parseonlyheader.dep.stamp
mime-printbody.dep.stamp : ../bincimapmime/mime-printbody.cc
$(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-printbody.cc > mime-printbody.dep
touch mime-printbody.dep.stamp
mime-printdoc.dep.stamp : ../bincimapmime/mime-printdoc.cc
$(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-printdoc.cc > mime-printdoc.dep
touch mime-printdoc.dep.stamp
mime-printheader.dep.stamp : ../bincimapmime/mime-printheader.cc
$(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-printheader.cc > mime-printheader.dep
touch mime-printheader.dep.stamp
mime.dep.stamp : ../bincimapmime/mime.cc
$(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime.cc > mime.dep
touch mime.dep.stamp
convert.dep.stamp : ../bincimapmime/convert.cc
$(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/convert.cc > convert.dep
touch convert.dep.stamp
iodevice.dep.stamp : ../bincimapmime/iodevice.cc
$(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/iodevice.cc > iodevice.dep
touch iodevice.dep.stamp
iofactory.dep.stamp : ../bincimapmime/iofactory.cc
$(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/iofactory.cc > iofactory.dep
touch iofactory.dep.stamp
include mime-getpart.dep
include mime-parsefull.dep
include mime-parseonlyheader.dep
include mime-printbody.dep
include mime-printdoc.dep
include mime-printheader.dep
include mime.dep
include convert.dep
include iodevice.dep
include iofactory.dep

View File

@ -3,7 +3,7 @@
mk=Makefile
depth=${depth:-..}
SRCS="\
SRC_CPP="\
${depth}/aspell/rclaspell.cpp \
${depth}/common/rclconfig.cpp \
${depth}/common/rclinit.cpp \
@ -57,8 +57,20 @@ ${depth}/utils/wipedir.cpp \
${depth}/utils/x11mon.cpp \
"
SRC_CC="\
${depth}/bincimapmime/mime-getpart.cc \
${depth}/bincimapmime/mime-parsefull.cc \
${depth}/bincimapmime/mime-parseonlyheader.cc \
${depth}/bincimapmime/mime-printbody.cc \
${depth}/bincimapmime/mime-printdoc.cc \
${depth}/bincimapmime/mime-printheader.cc \
${depth}/bincimapmime/mime.cc \
${depth}/bincimapmime/convert.cc \
${depth}/bincimapmime/iodevice.cc \
${depth}/bincimapmime/iofactory.cc \
"
for c in $SRCS;do
for c in $SRC_CPP;do
o=`basename $c .cpp`.o
OBJS="$OBJS $o"
d=`basename $c .cpp`.dep
@ -66,6 +78,14 @@ for c in $SRCS;do
s=`basename $c .cpp`.dep.stamp
DEPS="$DEPS $s"
done
for c in $SRC_CC;do
o=`basename $c .cc`.o
OBJS="$OBJS $o"
d=`basename $c .cc`.dep
cp /dev/null $d
s=`basename $c .cc`.dep.stamp
DEPS="$DEPS $s"
done
test -f $mk && chmod +w $mk
@ -74,8 +94,6 @@ cat > $mk <<EOF
depth = ${depth}
include \$(depth)/mk/sysconf
UNACCFLAGS = \$(CFLAGS) -g -I. -I\$(depth)/unac \$(INCICONV) -DUNAC_VERSION=\\"1.0.7\\"
LIBS = librcl.a
all: \$(LIBS)
@ -88,14 +106,19 @@ librcl.a : \$(DEPS) \$(OBJS) unac.o
\$(RANLIB) librcl.a
unac.o : \$(depth)/unac/unac.c \$(depth)/unac/unac.h
\$(CC) \$(UNACCFLAGS) -c \$(depth)/unac/unac.c
\$(CC) \$(ALL_CXXFLAGS) -c \$(depth)/unac/unac.c
EOF
for c in $SRCS;do
for c in $SRC_CPP;do
o=`basename $c .cpp`.o
echo "$o : $c" >> $mk
echo " \$(CXX) \$(ALL_CXXFLAGS) -c $c" >> $mk
done
for c in $SRC_CC;do
o=`basename $c .cc`.o
echo "$o : $c" >> $mk
echo " \$(CXX) \$(ALL_CXXFLAGS) -c $c" >> $mk
done
cat >> $mk <<EOF
depend: \$(DEPS)
@ -106,14 +129,25 @@ distclean: clean
rm -f *.dep
EOF
for c in $SRCS;do
for c in $SRC_CPP;do
d=`basename $c .cpp`.dep
s=`basename $c .cpp`.dep.stamp
echo "$s : $c" >> $mk
echo " \$(CXX) -M \$(ALL_CXXFLAGS) $c > $d" >> $mk
echo " touch $s" >> $mk
done
for c in $SRCS;do
for c in $SRC_CPP;do
d=`basename $c .cpp`.dep
echo "include $d" >> $mk
done
for c in $SRC_CC;do
d=`basename $c .cc`.dep
s=`basename $c .cc`.dep.stamp
echo "$s : $c" >> $mk
echo " \$(CXX) -M \$(ALL_CXXFLAGS) $c > $d" >> $mk
echo " touch $s" >> $mk
done
for c in $SRC_CC;do
d=`basename $c .cc`.dep
echo "include $d" >> $mk
done

View File

@ -1,8 +1,7 @@
include $(depth)/mk/commondefs
include $(depth)/mk/localdefs
ALL_CXXFLAGS = $(CXXFLAGS) $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) \
-DSTATFS_INCLUDE="<sys/mount.h>"
ALL_CXXFLAGS = $(CXXFLAGS) $(COMMONCXXFLAGS) $(LOCALCXXFLAGS)
RANLIB = ranlib
LIBSYS =

View File

@ -1,7 +1,5 @@
include $(depth)/mk/commondefs
include $(depth)/mk/localdefs
ALL_CXXFLAGS = $(CXXFLAGS) $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) \
-pthread \
-DSTATFS_INCLUDE="<sys/mount.h>"
ALL_CXXFLAGS = $(CXXFLAGS) $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) -pthread
LIBSYS =

View File

@ -2,6 +2,5 @@ include $(depth)/mk/commondefs
include $(depth)/mk/localdefs
ALL_CXXFLAGS = $(CXXFLAGS) $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) \
-pthread -I/usr/include \
-DSTATFS_INCLUDE="<sys/mount.h>"
-pthread -I/usr/include
LIBSYS =

View File

@ -1,8 +1,7 @@
include $(depth)/mk/commondefs
include $(depth)/mk/localdefs
ALL_CXXFLAGS = $(CXXFLAGS) $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) \
-DSTATFS_INCLUDE="<sys/statvfs.h>"
ALL_CXXFLAGS = $(CXXFLAGS) $(COMMONCXXFLAGS) $(LOCALCXXFLAGS)
CC = gcc
CXX = g++

View File

@ -17,7 +17,6 @@ COMMONCXXFLAGS = -I. \
PIC_CXXFLAGS = -fPIC -DPIC
BIGLIB = $(depth)/lib/librcl.a
MIMELIB = $(depth)/bincimapmime/libmime.a
RANLIB = test -f

View File

@ -52,8 +52,7 @@ unix {
MOC_DIR = .moc
OBJECTS_DIR = .obj
DEFINES += RECOLL_DATADIR='\\"@QTRECOLL_DATADIR@\\"'
LIBS += ../lib/librcl.a ../bincimapmime/libmime.a \
LIBS += ../lib/librcl.a \
$(BSTATIC) @LIBXAPIAN@ @LIBICONV@ $(BDYNAMIC) \
-lz

View File

@ -62,8 +62,7 @@ unix {
MOC_DIR = .moc
OBJECTS_DIR = .obj
DEFINES += RECOLL_DATADIR=\"@QTRECOLL_DATADIR@\"
LIBS += ../lib/librcl.a ../bincimapmime/libmime.a \
LIBS += ../lib/librcl.a \
$(BSTATIC) @LIBXAPIAN@ @LIBICONV@ $(BDYNAMIC) \
-lz

View File

@ -14,21 +14,21 @@ xadump : $(XADUMP_OBJS)
$(CXX) $(ALL_CXXFLAGS) -o xadump $(XADUMP_OBJS) \
$(LIBICONV) $(LIBXAPIAN) $(LIBSYS)
RECOLLQ_OBJS= recollq.o $(BIGLIB) $(MIMELIB)
RECOLLQ_OBJS= recollq.o $(BIGLIB)
recollq : $(RECOLLQ_OBJS)
$(CXX) $(ALL_CXXFLAGS) -o recollq $(RECOLLQ_OBJS) \
$(LIBICONV) $(LIBXAPIAN) $(LIBSYS)
recollq.o : recollq.cpp
$(CXX) $(ALL_CXXFLAGS) -DTEST_RECOLLQ -c recollq.cpp
HISTORY_OBJS= trhist.o $(BIGLIB) $(MIMELIB)
HISTORY_OBJS= trhist.o $(BIGLIB)
trhist : $(HISTORY_OBJS)
$(CXX) $(ALL_CXXFLAGS) -o trhist $(HISTORY_OBJS) \
$(LIBICONV) $(LIBXAPIAN)
trhist.o : history.cpp history.h
$(CXX) $(ALL_CXXFLAGS) -DTEST_HISTORY -c -o trhist.o history.cpp
WASASTRINGTOQUERY_OBJS= trwasastrtoq.o $(BIGLIB) $(MIMELIB)
WASASTRINGTOQUERY_OBJS= trwasastrtoq.o $(BIGLIB)
trwasastrtoq : $(WASASTRINGTOQUERY_OBJS)
$(CXX) $(ALL_CXXFLAGS) -o trwasastrtoq $(WASASTRINGTOQUERY_OBJS) \
$(LIBICONV) $(LIBXAPIAN)

View File

@ -13170,7 +13170,7 @@ int unacmaybefold_string_utf16(const char* in, size_t in_length,
if(out == 0) {
if(debug_level >= UNAC_DEBUG_LOW)
DEBUG("realloc %d bytes failed\n", out_size+1);
// *outp is still valid. Let the caller free it
/* *outp is still valid. Let the caller free it */
return -1;
}
} else {
@ -13302,7 +13302,7 @@ static int convert(const char* from, const char* to,
/* +1 for null */
out = realloc(out, out_size + 1);
if(out == 0) {
// *outp still valid, no freeing
/* *outp still valid, no freeing */
if(debug_level >= UNAC_DEBUG_LOW)
DEBUG("realloc %d bytes failed\n", out_size+1);
return -1;
@ -13375,8 +13375,8 @@ static int convert(const char* from, const char* to,
/* +1 for null */
out_base = realloc(out_base, out_size + 1);
if (out_base == 0) {
// *outp potentially not valid any more. Free here,
// and zero out
/* *outp potentially not valid any more. Free here,
* and zero out */
if(debug_level >= UNAC_DEBUG_LOW)
DEBUG("realloc %d bytes failed\n", out_size+1);
free(saved);

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: pathut.cpp,v 1.22 2008-07-01 11:51:51 dockes Exp $ (C) 2004 J.F.Dockes";
static char rcsid[] = "@(#$Id: pathut.cpp,v 1.23 2008-11-24 15:47:40 dockes Exp $ (C) 2004 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -41,11 +41,20 @@ using std::stack;
#include "transcode.h"
#include <sys/types.h>
#ifndef STATFS_INCLUDE
#define STATFS_INCLUDE <sys/vfs.h>
// Let's include all files where statfs can be defined and hope for no
// conflict...
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#endif
#ifdef HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>
#endif
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
#include STATFS_INCLUDE
bool fsocc(const string &path, int *pc, long *blocks)
{