mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +01:00
Add the beginnings of a xapian-dump program.
This will (when it is finished) make a much more reliable way to ensure that notmuch's sync program behaves identically to sup-sync. It doesn't actually do anything yet.
This commit is contained in:
parent
5986cfe5e7
commit
11f99eb8ea
2 changed files with 42 additions and 2 deletions
10
Makefile
10
Makefile
|
@ -1,9 +1,15 @@
|
|||
PROGS=g_mime_test
|
||||
PROGS=g_mime_test xapian-dump
|
||||
|
||||
MYCFLAGS=-Wall
|
||||
MYCXXFLAGS=-Wall
|
||||
|
||||
all: $(PROGS)
|
||||
|
||||
g_mime_test: g_mime_test.c
|
||||
$(CC) g_mime_test.c `pkg-config --cflags --libs gmime-2.4` -o g_mime_test
|
||||
$(CC) $(CFLAGS) $(MYCFLAGS) g_mime_test.c `pkg-config --cflags --libs gmime-2.4` -o g_mime_test
|
||||
|
||||
xapian-dump: xapian-dump.cc
|
||||
$(CXX) $(CXXFLAGS) $(MYCXXFLAGS) xapian-dump.cc `xapian-config --libs --cxxflags` -o xapian-dump
|
||||
|
||||
clean:
|
||||
rm -f $(PROGS)
|
||||
|
|
34
xapian-dump.cc
Normal file
34
xapian-dump.cc
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright © 2009 Carl Worth
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see http://www.gnu.org/licenses/ .
|
||||
*
|
||||
* Author: Carl Worth <cworth@cworth.org>
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include <xapian.h>
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
if (argc < 2) {
|
||||
fprintf (stderr, "Usage: %s <path-to-xapian-database>\n",
|
||||
argv[0]);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue