aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile10
-rw-r--r--xapian-dump.cc34
2 files changed, 42 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0f50a434..614c5760 100644
--- a/Makefile
+++ b/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)
diff --git a/xapian-dump.cc b/xapian-dump.cc
new file mode 100644
index 00000000..6d1fc1be
--- /dev/null
+++ b/xapian-dump.cc
@@ -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;
+}