Fix a bunch of memory problems in beagle:
[beagle.git] / beagled / Makefile.am
blob6a281f0cec56b93c1d990409124bc879ca3dd1a1
2 # Warnings we don't want to see.
3 # Most of these are thanks to DotLucene.  It would be nice if we could use
4 # "#pragma warning" on these.
6 # 0162 = Unreachable code detected
7 # 0164 = This label has not been referenced
8 # 0168 = The variable 'foo' is declared but never used
9 # 0169 = The private method/field 'foo' is never used
10 # 0219 = Variable is assigned but never used
11 # 0436 = Ignore imported type (local SqliteClient)
13 # unsafe arg for Mono.Data.SqliteClient fork
14 CSC = $(MCS) -debug -nowarn:0162,0164,0168,0169,0219,0436 -unsafe
16 BACKENDDIR = $(pkglibdir)/Backends
18 PLUGIN_TARGET = BeagleDaemonPlugins.dll
20 PLUGIN_CSFLAGS = -target:library
22 PLUGIN_CSFILES =                        \
23         $(srcdir)/Flavor.cs             \
24         $(srcdir)/Filter.cs
26 PLUGIN_LOCAL_ASSEMBLIES =               \
27         ../Util/Util.dll                \
28         ../BeagleClient/Beagle.dll
30 PLUGIN_ASSEMBLIES =                             \
31         -r:Mono.Posix                           \
32         $(BEAGLED_LIBS)                         \
33         $(PLUGIN_LOCAL_ASSEMBLIES:%=-r:%)
36 $(PLUGIN_TARGET): $(PLUGIN_CSFILES) $(PLUGIN_LOCAL_ASSEMBLIES)
37         $(CSC) -out:$@ $(PLUGIN_CSFLAGS) $(PLUGIN_CSFILES) $(PLUGIN_ASSEMBLIES)
39 ############################################################
41 WRAPPER_IN = wrapper.in
42 WRAPPER_SED = sed                                       \
43         -e "s|\@prefix\@|$(prefix)|g"                   \
44         -e "s|\@pkglibdir\@|$(pkglibdir)|g"             \
45         -e "s|\@libdir\@|$(libdir)|g"                   \
46         -e "s|\@evolibdir\@|$(EVO_LIBDIR)|g"            \
47         -e "s|\@gacprefix\@|$(GAC_PREFIX)|g"            \
48         -e "s|\@bash\@|$(BASH)|"                        \
49         -e "s|\@wrapper\@|$@|g"
51 ############################################################
53 lucenedir = $(srcdir)/Lucene.Net
55 LUCENE_1_9_CSFILES =                                                    \
56         $(lucenedir)/Analysis/Standard/CharStream.cs    \
57         $(lucenedir)/Analysis/Standard/FastCharStream.cs        \
58         $(lucenedir)/Analysis/Standard/ParseException.cs        \
59         $(lucenedir)/Analysis/Standard/StandardAnalyzer.cs      \
60         $(lucenedir)/Analysis/Standard/StandardFilter.cs        \
61         $(lucenedir)/Analysis/Standard/StandardTokenizer.cs     \
62         $(lucenedir)/Analysis/Standard/StandardTokenizerConstants.cs    \
63         $(lucenedir)/Analysis/Standard/StandardTokenizerTokenManager.cs \
64         $(lucenedir)/Analysis/Standard/Token.cs \
65         $(lucenedir)/Analysis/Standard/TokenMgrError.cs \
66         $(lucenedir)/Analysis/Analyzer.cs       \
67         $(lucenedir)/Analysis/CharTokenizer.cs  \
68         $(lucenedir)/Analysis/ISOLatin1AccentFilter.cs  \
69         $(lucenedir)/Analysis/KeywordAnalyzer.cs        \
70         $(lucenedir)/Analysis/KeywordTokenizer.cs       \
71         $(lucenedir)/Analysis/LengthFilter.cs   \
72         $(lucenedir)/Analysis/LetterTokenizer.cs        \
73         $(lucenedir)/Analysis/LowerCaseFilter.cs        \
74         $(lucenedir)/Analysis/LowerCaseTokenizer.cs     \
75         $(lucenedir)/Analysis/PerFieldAnalyzerWrapper.cs        \
76         $(lucenedir)/Analysis/PorterStemFilter.cs       \
77         $(lucenedir)/Analysis/PorterStemmer.cs  \
78         $(lucenedir)/Analysis/SimpleAnalyzer.cs \
79         $(lucenedir)/Analysis/StopAnalyzer.cs   \
80         $(lucenedir)/Analysis/StopFilter.cs     \
81         $(lucenedir)/Analysis/Token.cs  \
82         $(lucenedir)/Analysis/TokenFilter.cs    \
83         $(lucenedir)/Analysis/Tokenizer.cs      \
84         $(lucenedir)/Analysis/TokenStream.cs    \
85         $(lucenedir)/Analysis/WhitespaceAnalyzer.cs     \
86         $(lucenedir)/Analysis/WhitespaceTokenizer.cs    \
87         $(lucenedir)/Analysis/WordlistLoader.cs \
88         $(lucenedir)/Document/DateField.cs      \
89         $(lucenedir)/Document/DateTools.cs      \
90         $(lucenedir)/Document/Document.cs       \
91         $(lucenedir)/Document/Field.cs  \
92         $(lucenedir)/Document/NumberTools.cs    \
93         $(lucenedir)/Index/CompoundFileReader.cs        \
94         $(lucenedir)/Index/CompoundFileWriter.cs        \
95         $(lucenedir)/Index/DocumentWriter.cs    \
96         $(lucenedir)/Index/FieldInfo.cs \
97         $(lucenedir)/Index/FieldInfos.cs        \
98         $(lucenedir)/Index/FieldsReader.cs      \
99         $(lucenedir)/Index/FieldsWriter.cs      \
100         $(lucenedir)/Index/FilterIndexReader.cs \
101         $(lucenedir)/Index/IndexFileNameFilter.cs       \
102         $(lucenedir)/Index/IndexFileNames.cs    \
103         $(lucenedir)/Index/IndexModifier.cs     \
104         $(lucenedir)/Index/IndexReader.cs       \
105         $(lucenedir)/Index/IndexWriter.cs       \
106         $(lucenedir)/Index/MultipleTermPositions.cs     \
107         $(lucenedir)/Index/MultiReader.cs       \
108         $(lucenedir)/Index/ParallelReader.cs    \
109         $(lucenedir)/Index/SegmentInfo.cs       \
110         $(lucenedir)/Index/SegmentInfos.cs      \
111         $(lucenedir)/Index/SegmentMergeInfo.cs  \
112         $(lucenedir)/Index/SegmentMergeQueue.cs \
113         $(lucenedir)/Index/SegmentMerger.cs     \
114         $(lucenedir)/Index/SegmentReader.cs     \
115         $(lucenedir)/Index/SegmentTermDocs.cs   \
116         $(lucenedir)/Index/SegmentTermEnum.cs   \
117         $(lucenedir)/Index/SegmentTermPositions.cs      \
118         $(lucenedir)/Index/SegmentTermPositionVector.cs \
119         $(lucenedir)/Index/SegmentTermVector.cs \
120         $(lucenedir)/Index/Term.cs      \
121         $(lucenedir)/Index/TermBuffer.cs        \
122         $(lucenedir)/Index/TermDocs.cs  \
123         $(lucenedir)/Index/TermEnum.cs  \
124         $(lucenedir)/Index/TermFreqVector.cs    \
125         $(lucenedir)/Index/TermInfo.cs  \
126         $(lucenedir)/Index/TermInfosReader.cs   \
127         $(lucenedir)/Index/TermInfosWriter.cs   \
128         $(lucenedir)/Index/TermPositions.cs     \
129         $(lucenedir)/Index/TermPositionVector.cs        \
130         $(lucenedir)/Index/TermVectorOffsetInfo.cs      \
131         $(lucenedir)/Index/TermVectorsReader.cs \
132         $(lucenedir)/Index/TermVectorsWriter.cs \
133         $(lucenedir)/QueryParser/CharStream.cs  \
134         $(lucenedir)/QueryParser/FastCharStream.cs      \
135         $(lucenedir)/QueryParser/MultiFieldQueryParser.cs       \
136         $(lucenedir)/QueryParser/ParseException.cs      \
137         $(lucenedir)/QueryParser/QueryParser.cs \
138         $(lucenedir)/QueryParser/QueryParserConstants.cs        \
139         $(lucenedir)/QueryParser/QueryParserTokenManager.cs     \
140         $(lucenedir)/QueryParser/Token.cs       \
141         $(lucenedir)/QueryParser/TokenMgrError.cs       \
142         $(lucenedir)/Search/Regex/RegexQuery.cs \
143         $(lucenedir)/Search/Regex/RegexTermEnum.cs      \
144         $(lucenedir)/Search/Regex/SpanRegexQuery.cs     \
145         $(lucenedir)/Search/Spans/NearSpans.cs  \
146         $(lucenedir)/Search/Spans/SpanFirstQuery.cs     \
147         $(lucenedir)/Search/Spans/SpanNearQuery.cs      \
148         $(lucenedir)/Search/Spans/SpanNotQuery.cs       \
149         $(lucenedir)/Search/Spans/SpanOrQuery.cs        \
150         $(lucenedir)/Search/Spans/SpanQuery.cs  \
151         $(lucenedir)/Search/Spans/Spans.cs      \
152         $(lucenedir)/Search/Spans/SpanScorer.cs \
153         $(lucenedir)/Search/Spans/SpanTermQuery.cs      \
154         $(lucenedir)/Search/Spans/SpanWeight.cs \
155         $(lucenedir)/Search/BooleanClause.cs    \
156         $(lucenedir)/Search/BooleanQuery.cs     \
157         $(lucenedir)/Search/BooleanScorer.cs    \
158         $(lucenedir)/Search/BooleanScorer2.cs   \
159         $(lucenedir)/Search/CachingWrapperFilter.cs     \
160         $(lucenedir)/Search/ConjunctionScorer.cs        \
161         $(lucenedir)/Search/ConstantScoreQuery.cs       \
162         $(lucenedir)/Search/ConstantScoreRangeQuery.cs  \
163         $(lucenedir)/Search/DateFilter.cs       \
164         $(lucenedir)/Search/DefaultSimilarity.cs        \
165         $(lucenedir)/Search/DisjunctionMaxQuery.cs      \
166         $(lucenedir)/Search/DisjunctionMaxScorer.cs     \
167         $(lucenedir)/Search/DisjunctionSumScorer.cs     \
168         $(lucenedir)/Search/ExactPhraseScorer.cs        \
169         $(lucenedir)/Search/Explanation.cs      \
170         $(lucenedir)/Search/FieldCache.cs       \
171         $(lucenedir)/Search/FieldCacheImpl.cs   \
172         $(lucenedir)/Search/FieldDoc.cs \
173         $(lucenedir)/Search/FieldDocSortedHitQueue.cs   \
174         $(lucenedir)/Search/FieldSortedHitQueue.cs      \
175         $(lucenedir)/Search/Filter.cs   \
176         $(lucenedir)/Search/FilteredQuery.cs    \
177         $(lucenedir)/Search/FilteredTermEnum.cs \
178         $(lucenedir)/Search/FuzzyQuery.cs       \
179         $(lucenedir)/Search/FuzzyTermEnum.cs    \
180         $(lucenedir)/Search/Hit.cs      \
181         $(lucenedir)/Search/HitCollector.cs     \
182         $(lucenedir)/Search/HitIterator.cs      \
183         $(lucenedir)/Search/HitQueue.cs \
184         $(lucenedir)/Search/Hits.cs     \
185         $(lucenedir)/Search/IndexSearcher.cs    \
186         $(lucenedir)/Search/MatchAllDocsQuery.cs        \
187         $(lucenedir)/Search/MultiPhraseQuery.cs \
188         $(lucenedir)/Search/MultiSearcher.cs    \
189         $(lucenedir)/Search/MultiTermQuery.cs   \
190         $(lucenedir)/Search/NonMatchingScorer.cs        \
191         $(lucenedir)/Search/ParallelMultiSearcher.cs    \
192         $(lucenedir)/Search/PhrasePositions.cs  \
193         $(lucenedir)/Search/PhrasePrefixQuery.cs        \
194         $(lucenedir)/Search/PhraseQuery.cs      \
195         $(lucenedir)/Search/PhraseQueue.cs      \
196         $(lucenedir)/Search/PhraseScorer.cs     \
197         $(lucenedir)/Search/PrefixQuery.cs      \
198         $(lucenedir)/Search/Query.cs    \
199         $(lucenedir)/Search/QueryFilter.cs      \
200         $(lucenedir)/Search/QueryTermVector.cs  \
201         $(lucenedir)/Search/RangeFilter.cs      \
202         $(lucenedir)/Search/RangeQuery.cs       \
203         $(lucenedir)/Search/RemoteSearchable.cs \
204         $(lucenedir)/Search/ReqExclScorer.cs    \
205         $(lucenedir)/Search/ReqOptSumScorer.cs  \
206         $(lucenedir)/Search/ScoreDoc.cs \
207         $(lucenedir)/Search/ScoreDocComparator.cs       \
208         $(lucenedir)/Search/Scorer.cs   \
209         $(lucenedir)/Search/Searchable.cs       \
210         $(lucenedir)/Search/Searcher.cs \
211         $(lucenedir)/Search/Similarity.cs       \
212         $(lucenedir)/Search/SimilarityDelegator.cs      \
213         $(lucenedir)/Search/SloppyPhraseScorer.cs       \
214         $(lucenedir)/Search/Sort.cs     \
215         $(lucenedir)/Search/SortComparator.cs   \
216         $(lucenedir)/Search/SortComparatorSource.cs     \
217         $(lucenedir)/Search/SortField.cs        \
218         $(lucenedir)/Search/TermQuery.cs        \
219         $(lucenedir)/Search/TermScorer.cs       \
220         $(lucenedir)/Search/TopDocs.cs  \
221         $(lucenedir)/Search/TopFieldDocs.cs     \
222         $(lucenedir)/Search/Weight.cs   \
223         $(lucenedir)/Search/WildcardQuery.cs    \
224         $(lucenedir)/Search/WildcardTermEnum.cs \
225         $(lucenedir)/Store/BufferedIndexInput.cs        \
226         $(lucenedir)/Store/BufferedIndexOutput.cs       \
227         $(lucenedir)/Store/Directory.cs \
228         $(lucenedir)/Store/FSDirectory.cs       \
229         $(lucenedir)/Store/IndexInput.cs        \
230         $(lucenedir)/Store/IndexOutput.cs       \
231         $(lucenedir)/Store/InputStream.cs       \
232         $(lucenedir)/Store/Lock.cs      \
233         $(lucenedir)/Store/MMapDirectory.cs     \
234         $(lucenedir)/Store/OutputStream.cs      \
235         $(lucenedir)/Store/RAMDirectory.cs      \
236         $(lucenedir)/Store/RAMFile.cs   \
237         $(lucenedir)/Store/RAMInputStream.cs    \
238         $(lucenedir)/Store/RAMOutputStream.cs   \
239         $(lucenedir)/Util/BitVector.cs  \
240         $(lucenedir)/Util/Constants.cs  \
241         $(lucenedir)/Util/Parameter.cs  \
242         $(lucenedir)/Util/PriorityQueue.cs      \
243         $(lucenedir)/Util/SmallFloat.cs \
244         $(lucenedir)/Util/StringHelper.cs       \
245         $(lucenedir)/Util/ToStringUtils.cs      \
246         $(lucenedir)/AssemblyInfo.cs    \
247         $(lucenedir)/LucenePackage.cs   \
248         $(lucenedir)/SharpZipLibAdapter.cs      \
249         $(lucenedir)/SupportClass.cs
251 LUCENE_CSFILES = $(LUCENE_1_9_CSFILES)
253 ############################################################
255 sqlitedir = $(srcdir)/Mono.Data.SqliteClient
257 SQLITE_CSFILES =                                        \
258         $(sqlitedir)/SqliteCommand.cs                   \
259         $(sqlitedir)/SqliteConnection.cs                \
260         $(sqlitedir)/Sqlite.cs                          \
261         $(sqlitedir)/SqliteDataAdapter.cs               \
262         $(sqlitedir)/SqliteDataReader.cs                \
263         $(sqlitedir)/SqliteExceptions.cs                \
264         $(sqlitedir)/SqliteParameterCollection.cs       \
265         $(sqlitedir)/SqliteParameter.cs                 \
266         $(sqlitedir)/SqliteRowUpdatedEventArgs.cs       \
267         $(sqlitedir)/SqliteRowUpdatedEventHandler.cs    \
268         $(sqlitedir)/SqliteRowUpdatingEventArgs.cs      \
269         $(sqlitedir)/SqliteRowUpdatingEventHandler.cs   \
270         $(sqlitedir)/SqliteTransaction.cs
272 ############################################################
274 DAEMON_DLL_TARGET = BeagleDaemonLib.dll
276 DAEMON_DLL_CSFLAGS = -target:library $(BEAGLE_DEFINES)
278 fsqueryabledir = $(srcdir)/FileSystemQueryable
279 FILE_SYSTEM_QUERYABLE_CSFILES =                                 \
280         $(fsqueryabledir)/DirectoryModel.cs                     \
281         $(fsqueryabledir)/DirectoryState.cs                     \
282         $(fsqueryabledir)/TreeCrawlTask.cs                      \
283         $(fsqueryabledir)/FileCrawlTask.cs                      \
284         $(fsqueryabledir)/DirectoryIndexableGenerator.cs        \
285         $(fsqueryabledir)/FileNameFilter.cs                     \
286         $(fsqueryabledir)/LuceneNameResolver.cs                 \
287         $(fsqueryabledir)/FileSystemQueryable.cs                \
288         $(fsqueryabledir)/IFileEventBackend.cs                  \
289         $(fsqueryabledir)/InotifyBackend.cs                     \
290         $(fsqueryabledir)/NullFileEventBackend.cs
293 gaimlogqueryable = $(srcdir)/GaimLogQueryable
294 GAIM_LOG_QUERYABLE_CSFILES =                            \
295         $(gaimlogqueryable)/GaimLogQueryable.cs
297 tomboyqueryable = $(srcdir)/TomboyQueryable
298 TOMBOY_QUERYABLE_CSFILES =                              \
299         $(tomboyqueryable)/TomboyQueryable.cs
301 labyrinthqueryable = $(srcdir)/LabyrinthQueryable
302 LABYRINTH_QUERYABLE_CSFILES =                           \
303         $(labyrinthqueryable)/LabyrinthQueryable.cs
305 kmailqueryable = $(srcdir)/KMailQueryable
306 KMAIL_QUERYABLE_CSFILES =                               \
307         $(kmailqueryable)/KMailQueryable.cs             \
308         $(kmailqueryable)/KMailIndexableGenerator.cs    \
309         $(kmailqueryable)/KMailIndexer.cs
311 blamqueryable = $(srcdir)/BlamQueryable
312 BLAM_QUERYABLE_CSFILES =                                \
313         $(blamqueryable)/BlamQueryable.cs
315 lifereaqueryable = $(srcdir)/LifereaQueryable
316 LIFEREA_QUERYABLE_CSFILES =                             \
317         $(lifereaqueryable)/LifereaQueryable.cs
319 akregatorqueryable = $(srcdir)/AkregatorQueryable
320 AKREGATOR_QUERYABLE_CSFILES =                           \
321         $(akregatorqueryable)/AkregatorQueryable.cs
323 konqhistoryqueryable = $(srcdir)/KonqHistoryQueryable
324 KONQHISTORY_QUERYABLE_CSFILES =                         \
325         $(konqhistoryqueryable)/KonqQueryable.cs
327 kopetequeryable = $(srcdir)/KopeteQueryable
328 KOPETE_QUERYABLE_CSFILES =                              \
329         $(kopetequeryable)/KopeteQueryable.cs           \
330         $(kopetequeryable)/KopeteCrawler.cs
332 knotesqueryable = $(srcdir)/KNotesQueryable
333 KNOTES_QUERYABLE_CSFILES =                              \
334         $(knotesqueryable)/KNotesQueryable.cs
336 kabcqueryable = $(srcdir)/KAddressBookQueryable
337 KABC_QUERYABLE_CSFILES =                                \
338         $(kabcqueryable)/KabcQueryable.cs
340 indexingservicequeryable = $(srcdir)/IndexingServiceQueryable
341 INDEXING_SERVICE_QUERYABLE_CSFILES =                    \
342         $(indexingservicequeryable)/IndexingServiceQueryable.cs
344 DAEMON_DLL_CSFILES =                                            \
345         $(LUCENE_CSFILES)                                       \
346         $(KMAIL_QUERYABLE_CSFILES)                              \
347         $(FILE_SYSTEM_QUERYABLE_CSFILES)                        \
348         $(GAIM_LOG_QUERYABLE_CSFILES)                           \
349         $(INDEXING_SERVICE_QUERYABLE_CSFILES)                   \
350         $(TOMBOY_QUERYABLE_CSFILES)                             \
351         $(LABYRINTH_QUERYABLE_CSFILES)                          \
352         $(BLAM_QUERYABLE_CSFILES)                               \
353         $(LIFEREA_QUERYABLE_CSFILES)                            \
354         $(AKREGATOR_QUERYABLE_CSFILES)                          \
355         $(KONQHISTORY_QUERYABLE_CSFILES)                        \
356         $(KNOTES_QUERYABLE_CSFILES)                             \
357         $(KABC_QUERYABLE_CSFILES)                               \
358         $(KOPETE_QUERYABLE_CSFILES)                             \
359         $(srcdir)/AssemblyInfo.cs                               \
360         $(srcdir)/FileAttributes.cs                             \
361         $(srcdir)/FileAttributesStore.cs                        \
362         $(srcdir)/FileAttributesStore_ExtendedAttribute.cs      \
363         $(srcdir)/FileAttributesStore_Mixed.cs                  \
364         $(srcdir)/FileAttributesStore_Sqlite.cs                 \
365         $(srcdir)/FilterFactory.cs                              \
366         $(srcdir)/IFileAttributesStore.cs                       \
367         $(srcdir)/IIndexer.cs                                   \
368         $(srcdir)/IndexSynchronization.cs                       \
369         $(srcdir)/IndexerReceipts.cs                            \
370         $(srcdir)/IndexerRequest.cs                             \
371         $(srcdir)/IQueryResult.cs                               \
372         $(srcdir)/IQueryWorker.cs                               \
373         $(srcdir)/IQueryable.cs                                 \
374         $(srcdir)/LuceneBitArray.cs                             \
375         $(srcdir)/LuceneCommon.cs                               \
376         $(srcdir)/LuceneIndexingDriver.cs                       \
377         $(srcdir)/LuceneQueryingDriver.cs                       \
378         $(srcdir)/LuceneFileQueryable.cs                        \
379         $(srcdir)/LuceneQueryable.cs                            \
380         $(srcdir)/NoiseFilter.cs                                \
381         $(srcdir)/PropertyKeywordFu.cs                          \
382         $(srcdir)/QueryDriver.cs                                \
383         $(srcdir)/QueryExecutor.cs                              \
384         $(srcdir)/QueryResult.cs                                \
385         $(srcdir)/QueryStringParser.cs                          \
386         $(srcdir)/Queryable.cs                                  \
387         $(srcdir)/QueryableFlavor.cs                            \
388         $(srcdir)/RemoteControlExecutors.cs                     \
389         $(srcdir)/RemoteIndexerRequest.cs                       \
390         $(srcdir)/RemoteIndexerResponse.cs                      \
391         $(srcdir)/Server.cs                                     \
392         $(srcdir)/Shutdown.cs                                   \
393         $(srcdir)/SnippetExecutor.cs                            \
394         $(srcdir)/SnippetFu.cs                                  \
395         $(srcdir)/SqliteUtils.cs                                \
396         $(srcdir)/StaticQueryable.cs                            \
397         $(srcdir)/TextCache.cs
399 DAEMON_DLL_LOCAL_ASSEMBLIES =           \
400         ../Util/Util.dll                \
401         ../BeagleClient/Beagle.dll      \
402         ./$(PLUGIN_TARGET)
404 DAEMON_DLL_ASSEMBLIES =                         \
405         $(BEAGLED_LIBS)                         \
406         $(DAEMON_DLL_LOCAL_ASSEMBLIES:%=-r:%)   \
407         $(SHARPZIPLIB_LIBS)             \
408         -r:Mono.Data.SqliteClient               \
409         -r:Mono.Posix                           \
410         -r:System.Runtime.Remoting              \
411         -r:System.Web
413 if USE_LOCAL_SQLITE
414 DAEMON_DLL_CSFILES += $(SQLITE_CSFILES)
415 DAEMON_DLL_ASSEMBLIES += -r:System.Data
416 else
417 DAEMON_DLL_ASSEMBLIES += -r:Mono.Data.SqliteClient
418 endif
420 if ENABLE_GOOGLEDRIVER
421 DAEMON_DLL_CSFILES +=                  \
422        $(srcdir)/GoogleDriver.cs
423 endif
425 $(DAEMON_DLL_TARGET): $(DAEMON_DLL_CSFILES) $(DAEMON_DLL_LOCAL_ASSEMBLIES)
426         $(CSC) -out:$@ $(DAEMON_DLL_CSFLAGS) $(DAEMON_DLL_CSFILES) $(DAEMON_DLL_ASSEMBLIES)
428 ############################################################
431 ### Pluggable backend support
434 BACKEND_CSFLAGS = -target:library
435 BACKEND_LOCAL_ASSEMBLIES =                      \
436         ../Util/Util.dll                        \
437         ../BeagleClient/Beagle.dll              \
438         ./$(DAEMON_DLL_TARGET)
440 BACKEND_ASSEMBLIES =                            \
441         $(SHARPZIPLIB_LIBS)                     \
442         $(BACKEND_LOCAL_ASSEMBLIES:%=-r:%)      \
443         -r:Mono.Posix
446 ### Evolution backend
449 edsqueryable = $(srcdir)/EvolutionDataServerQueryable
450 EDS_QUERYABLE_CSFILES =                                 \
451         $(edsqueryable)/BookContainer.cs                \
452         $(edsqueryable)/CalContainer.cs                 \
453         $(edsqueryable)/Container.cs                    \
454         $(edsqueryable)/EvolutionDataServerQueryable.cs \
455         $(edsqueryable)/SourcesHandler.cs
457 evomailqueryable = $(srcdir)/EvolutionMailDriver
458 EVO_MAIL_QUERYABLE_CSFILES =                                    \
459         $(evomailqueryable)/EvolutionMailDriver.cs              \
460         $(evomailqueryable)/EvolutionMailIndexableGenerator.cs  \
461         $(evomailqueryable)/GConfThreadHelper.cs                \
462         $(evomailqueryable)/MailCrawler.cs
464 EVO_DLL_TARGET = EvolutionBackends.dll
465 EVO_DLL_CSFLAGS = $(BACKEND_CSFLAGS)
466 EVO_DLL_CSFILES = EvolutionBackendsAssemblyInfo.cs $(EDS_QUERYABLE_CSFILES) $(EVO_MAIL_QUERYABLE_CSFILES)
467 EVO_DLL_ASSEMBLIES = $(BACKEND_ASSEMBLIES) $(EVO_LIBS)
469 $(EVO_DLL_TARGET): $(EVO_DLL_CSFILES) $(DAEMON_DLL_LOCAL_ASSEMBLIES) $(DAEMON_DLL_TARGET)
470         $(CSC) -out:$@ $(EVO_DLL_CSFLAGS) $(EVO_DLL_CSFILES) -r:$(DAEMON_DLL_TARGET) $(EVO_DLL_ASSEMBLIES)
472 ############################################################
474 DAEMON_WRAPPER = beagled
475 DAEMON_WRAPPER_IN = beagled.in
476 DAEMON_TARGET = BeagleDaemon.exe
478 $(DAEMON_WRAPPER): $(srcdir)/$(DAEMON_WRAPPER_IN)
479         $(WRAPPER_SED) -e "s|\@target\@|$(DAEMON_TARGET)|g" < $(srcdir)/$(DAEMON_WRAPPER_IN) > $@
480         chmod +x $(DAEMON_WRAPPER)
482 DAEMON_CSFLAGS =                                \
483         -target:exe                             \
484         $(BEAGLE_DEFINES)
486 DAEMON_CSFILES =                                \
487         $(srcdir)/BeagleDaemon.cs               \
488         $(srcdir)/RemoteIndexer.cs
490 DAEMON_LOCAL_ASSEMBLIES =                       \
491         ../Util/Util.dll                        \
492         ../BeagleClient/Beagle.dll              \
493         ./$(PLUGIN_TARGET)                      \
494         ./$(DAEMON_DLL_TARGET)
496 DAEMON_ASSEMBLIES =                             \
497         $(BEAGLED_LIBS)                         \
498         $(SHARPZIPLIB_LIBS)                     \
499         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
500         -r:Mono.Posix
502 $(DAEMON_TARGET): $(DAEMON_CSFILES) $(DAEMON_LOCAL_ASSEMBLIES)
503         $(CSC) -out:$@ $(DAEMON_CSFLAGS) $(DAEMON_CSFILES) $(DAEMON_ASSEMBLIES)
505 if ENABLE_THUNDERBIRD   
506 THUNDERBIRD_DIR = $(srcdir)/ThunderbirdQueryable
508 THUNDERBIRD_TARGET = ThunderbirdBackends.dll
510 THUNDERBIRD_CSFLAGS = -target:library
513 THUNDERBIRD_CSFILES =                                           \
514         $(THUNDERBIRD_DIR)/LuceneAccess.cs                      \
515         $(THUNDERBIRD_DIR)/ThunderbirdIndexer.cs                \
516         $(THUNDERBIRD_DIR)/ThunderbirdIndexableGenerator.cs     \
517         $(THUNDERBIRD_DIR)/ThunderbirdQueryable.cs              \
518         $(THUNDERBIRD_DIR)/ThunderbirdInotify.cs                \
519         $(THUNDERBIRD_DIR)/Mail.cs                              \
520         $(THUNDERBIRD_DIR)/Contact.cs                           \
521         $(THUNDERBIRD_DIR)/Rss.cs                               \
522         $(THUNDERBIRD_DIR)/Nntp.cs                              \
523         $(THUNDERBIRD_DIR)/MoveMail.cs
525 THUNDERBIRD_LOCAL_ASSEMBLIES =          \
526         ../Util/Util.dll                \
527         ../BeagleClient/Beagle.dll      \
528         ./BeagleDaemonLib.dll
530 THUNDERBIRD_ASSEMBLIES =                                \
531         -r:Mono.Posix                           \
532         $(BEAGLED_LIBS)                         \
533         $(THUNDERBIRD_LOCAL_ASSEMBLIES:%=-r:%)
536 $(THUNDERBIRD_TARGET): $(THUNDERBIRD_CSFILES) $(THUNDERBIRD_LOCAL_ASSEMBLIES)
537         $(CSC) -out:$@ $(THUNDERBIRD_CSFLAGS) $(THUNDERBIRD_CSFILES) $(THUNDERBIRD_ASSEMBLIES)
538 endif
540 ############################################################
541 ############################################################
542 ############################################################
544 # This next section is a very good example of why we need real mono support in
545 # automake.  This is a massive wart on our development platform.
547 INDEX_HELPER_WRAPPER = beagled-index-helper
548 INDEX_HELPER_WRAPPER_IN = $(INDEX_HELPER_WRAPPER).in
549 INDEX_HELPER_TARGET = IndexHelper.exe
551 $(INDEX_HELPER_WRAPPER): $(srcdir)/$(INDEX_HELPER_WRAPPER_IN)
552         $(WRAPPER_SED) -e "s|\@target\@|$(INDEX_HELPER_TARGET)|g" < $(srcdir)/$(INDEX_HELPER_WRAPPER_IN) > $@
553         chmod +x $(INDEX_HELPER_WRAPPER)
555 INDEX_HELPER_CSFLAGS = -target:exe $(BEAGLE_DEFINES)
557 indexhelperdir = $(srcdir)/IndexHelper
559 INDEX_HELPER_CSFILES =  \
560         $(indexhelperdir)/IndexHelper.cs                \
561         $(indexhelperdir)/RemoteIndexerExecutor.cs
564 INDEX_HELPER_LOCAL_ASSEMBLIES =         \
565         ../Util/Util.dll                \
566         ../BeagleClient/Beagle.dll      \
567         ./$(DAEMON_DLL_TARGET)
569 INDEX_HELPER_ASSEMBLIES = \
570         $(BEAGLED_LIBS)                         \
571         $(SHARPZIPLIB_LIBS)                     \
572         $(INDEX_HELPER_LOCAL_ASSEMBLIES:%=-r:%) \
573         -r:Mono.Posix                           \
574         -r:System.Runtime.Remoting
576 $(INDEX_HELPER_TARGET): $(INDEX_HELPER_CSFILES) $(INDEX_HELPER_LOCAL_ASSEMBLIES)
577         $(CSC) -out:$@ $(INDEX_HELPER_CSFLAGS) $(INDEX_HELPER_CSFILES) $(INDEX_HELPER_ASSEMBLIES)
579 ############################################################
581 EXTRACT_CONTENT_WRAPPER = beagle-extract-content
582 EXTRACT_CONTENT_TARGET = ExtractContent.exe
584 $(EXTRACT_CONTENT_WRAPPER): $(srcdir)/$(WRAPPER_IN)
585         $(WRAPPER_SED) -e "s|\@target\@|$(EXTRACT_CONTENT_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
586         chmod +x $(EXTRACT_CONTENT_WRAPPER)
589 EXTRACT_CONTENT_CSFLAGS = \
590         -target:exe
592 EXTRACT_CONTENT_CSFILES = \
593         $(srcdir)/ExtractContent.cs
595 EXTRACT_CONTENT_LOCAL_ASSEMBLIES = \
596         ../Util/Util.dll                        \
597         ../BeagleClient/Beagle.dll              \
598         ./$(PLUGIN_TARGET)                      \
599         ./$(DAEMON_DLL_TARGET)
601 EXTRACT_CONTENT_ASSEMBLIES = \
602         $(BEAGLED_LIBS)                         \
603         $(SHARPZIPLIB_LIBS)                     \
604         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
605         -r:Mono.Posix                           \
606         -r:System.Runtime.Remoting
608 $(EXTRACT_CONTENT_TARGET): $(EXTRACT_CONTENT_CSFILES) $(EXTRACT_CONTENT_LOCAL_ASSEMBLIES)
609         $(CSC) -out:$@ $(EXTRACT_CONTENT_CSFLAGS) $(EXTRACT_CONTENT_CSFILES) $(EXTRACT_CONTENT_ASSEMBLIES)
611 ############################################################
613 DUMP_INDEX_WRAPPER = beagle-dump-index
614 DUMP_INDEX_TARGET = DumpIndex.exe
616 $(DUMP_INDEX_WRAPPER): $(srcdir)/$(WRAPPER_IN)
617         $(WRAPPER_SED) -e "s|\@target\@|$(DUMP_INDEX_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
618         chmod +x $(DUMP_INDEX_WRAPPER)
620 DUMP_INDEX_CSFLAGS = \
621         -target:exe
623 DUMP_INDEX_CSFILES = \
624         $(srcdir)/DumpIndex.cs
626 DUMP_INDEX_LOCAL_ASSEMBLIES = \
627         ../Util/Util.dll                        \
628         ../BeagleClient/Beagle.dll              \
629         ./$(PLUGIN_TARGET)                      \
630         ./$(DAEMON_DLL_TARGET)
632 DUMP_INDEX_ASSEMBLIES = \
633         $(BEAGLED_LIBS)                         \
634         $(SHARPZIPLIB_LIBS)                     \
635         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
636         -r:Mono.Posix                           \
637         -r:System.Runtime.Remoting
639 $(DUMP_INDEX_TARGET): $(DUMP_INDEX_CSFILES) $(DUMP_INDEX_LOCAL_ASSEMBLIES)
640         $(CSC) -out:$@ $(DUMP_INDEX_CSFLAGS) $(DUMP_INDEX_CSFILES) $(DUMP_INDEX_ASSEMBLIES)
642 ############################################################
644 INDEX_WEB_CONTENT_WRAPPER = beagle-index-url
645 INDEX_WEB_CONTENT_TARGET = IndexWebContent.exe
647 $(INDEX_WEB_CONTENT_WRAPPER): $(srcdir)/$(WRAPPER_IN)
648         $(WRAPPER_SED) -e "s|\@target\@|$(INDEX_WEB_CONTENT_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
649         chmod +x $(INDEX_WEB_CONTENT_WRAPPER)
652 INDEX_WEB_CONTENT_CSFLAGS = \
653         -target:exe
655 INDEX_WEB_CONTENT_CSFILES = \
656         $(srcdir)/IndexWebContent.cs
658 INDEX_WEB_CONTENT_LOCAL_ASSEMBLIES = \
659         ../Util/Util.dll                        \
660         ../BeagleClient/Beagle.dll              \
661         ./$(PLUGIN_TARGET)                      \
662         ./$(DAEMON_DLL_TARGET)
664 INDEX_WEB_CONTENT_ASSEMBLIES =  \
665         $(INDEX_WEB_CONTENT_LOCAL_ASSEMBLIES:%=-r:%)
667 $(INDEX_WEB_CONTENT_TARGET): $(INDEX_WEB_CONTENT_CSFILES) $(INDEX_WEB_CONTENT_LOCAL_ASSEMBLIES)
668         $(CSC) -out:$@ $(INDEX_WEB_CONTENT_CSFLAGS) $(INDEX_WEB_CONTENT_CSFILES) $(INDEX_WEB_CONTENT_ASSEMBLIES)
670 ############################################################
672 MASTER_DELETE_WRAPPER = beagle-master-delete-button
673 MASTER_DELETE_TARGET = MasterDelete.exe
675 $(MASTER_DELETE_WRAPPER): $(srcdir)/$(WRAPPER_IN)
676         $(WRAPPER_SED) -e "s|\@target\@|$(MASTER_DELETE_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
677         chmod +x $(MASTER_DELETE_WRAPPER)
680 MASTER_DELETE_CSFLAGS = \
681         -target:exe
683 MASTER_DELETE_CSFILES = \
684         $(srcdir)/MasterDelete.cs
686 MASTER_DELETE_LOCAL_ASSEMBLIES = \
687         ../Util/Util.dll                        \
688         ../BeagleClient/Beagle.dll              \
689         ./$(PLUGIN_TARGET)                      \
690         ./$(DAEMON_DLL_TARGET)
692 MASTER_DELETE_ASSEMBLIES = \
693         $(BEAGLED_LIBS)                         \
694         $(SHARPZIPLIB_LIBS)                     \
695         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
696         -r:Mono.Posix                           \
697         -r:System.Runtime.Remoting
699 $(MASTER_DELETE_TARGET): $(MASTER_DELETE_CSFILES) $(MASTER_DELETE_LOCAL_ASSEMBLIES)
700         $(CSC) -out:$@ $(MASTER_DELETE_CSFLAGS) $(MASTER_DELETE_CSFILES) $(MASTER_DELETE_ASSEMBLIES)
702 ############################################################
704 SNIPPET_TEST_WRAPPER = beagle-snippet-test
705 SNIPPET_TEST_TARGET = SnippetTest.exe
707 $(SNIPPET_TEST_WRAPPER): $(srcdir)/$(WRAPPER_IN)
708         $(WRAPPER_SED) -e "s|\@target\@|$(SNIPPET_TEST_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
709         chmod +x $(SNIPPET_TEST_WRAPPER)
711 SNIPPET_TEST_CSFLAGS = \
712         -target:exe
714 SNIPPET_TEST_CSFILES = \
715         $(srcdir)/SnippetTest.cs
717 SNIPPET_TEST_LOCAL_ASSEMBLIES = \
718         ../Util/Util.dll                        \
719         ../BeagleClient/Beagle.dll              \
720         ./$(PLUGIN_TARGET)                      \
721         ./$(DAEMON_DLL_TARGET)
723 SNIPPET_TEST_ASSEMBLIES = \
724         $(BEAGLED_LIBS)                         \
725         $(SHARPZIPLIB_LIBS)                     \
726         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
727         -r:Mono.Posix                           \
728         -r:System.Runtime.Remoting
730 $(SNIPPET_TEST_TARGET): $(SNIPPET_TEST_CSFILES) $(SNIPPET_TEST_LOCAL_ASSEMBLIES)
731         $(CSC) -out:$@ $(SNIPPET_TEST_CSFLAGS) $(SNIPPET_TEST_CSFILES) $(SNIPPET_TEST_ASSEMBLIES)
733 ############################################################
735 TERM_STATS_WRAPPER = beagle-term-stats
736 TERM_STATS_TARGET = TermStatsTool.exe
738 $(TERM_STATS_WRAPPER): $(srcdir)/$(WRAPPER_IN)
739         $(WRAPPER_SED) -e "s|\@target\@|$(TERM_STATS_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
740         chmod +x $(TERM_STATS_WRAPPER)
742 TERM_STATS_CSFLAGS = \
743         -target:exe
745 TERM_STATS_CSFILES = \
746         $(srcdir)/TermStatsTool.cs
748 TERM_STATS_LOCAL_ASSEMBLIES =   \
749         ../Util/Util.dll                        \
750         ../BeagleClient/Beagle.dll              \
751         ./$(PLUGIN_TARGET)                      \
752         ./$(DAEMON_DLL_TARGET)
754 TERM_STATS_ASSEMBLIES = \
755         $(BEAGLED_LIBS)                         \
756         $(SHARPZIPLIB_LIBS)                     \
757         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
758         -r:Mono.Posix                           \
759         -r:System.Runtime.Remoting
761 $(TERM_STATS_TARGET): $(TERM_STATS_CSFILES) $(TERM_STATS_LOCAL_ASSEMBLIES)
762         $(CSC) -out:$@ $(TERM_STATS_CSFLAGS) $(TERM_STATS_CSFILES) $(TERM_STATS_ASSEMBLIES)
764 ############################################################
766 NAME_INDEX_WRAPPER = beagle-name-index
767 NAME_INDEX_TARGET = NameIndexTool.exe
769 $(NAME_INDEX_WRAPPER): $(srcdir)/$(WRAPPER_IN)
770         $(WRAPPER_SED) -e "s|\@target\@|$(NAME_INDEX_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
771         chmod +x $(NAME_INDEX_WRAPPER)
773 NAME_INDEX_CSFLAGS = \
774         -target:exe
776 NAME_INDEX_CSFILES = \
777         $(srcdir)/NameIndexTool.cs
779 NAME_INDEX_LOCAL_ASSEMBLIES =   \
780         ../Util/Util.dll                        \
781         ../BeagleClient/Beagle.dll              \
782         ./$(PLUGIN_TARGET)                      \
783         ./$(DAEMON_DLL_TARGET)
785 NAME_INDEX_ASSEMBLIES = \
786         $(BEAGLED_LIBS)                         \
787         $(SHARPZIPLIB_LIBS)                     \
788         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
789         -r:Mono.Posix                           \
790         -r:System.Runtime.Remoting
792 $(NAME_INDEX_TARGET): $(NAME_INDEX_CSFILES) $(NAME_INDEX_LOCAL_ASSEMBLIES)
793         $(CSC) -out:$@ $(NAME_INDEX_CSFLAGS) $(NAME_INDEX_CSFILES) $(NAME_INDEX_ASSEMBLIES)
795 ############################################################
797 FS_SANITY_CHECK_WRAPPER = beagle-file-system-sanity-check
798 FS_SANITY_CHECK_TARGET = SanityCheckTool.exe
800 $(FS_SANITY_CHECK_WRAPPER): $(srcdir)/$(WRAPPER_IN)
801         $(WRAPPER_SED) -e "s|\@target\@|$(FS_SANITY_CHECK_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
802         chmod +x $(FS_SANITY_CHECK_WRAPPER)
804 FS_SANITY_CHECK_CSFLAGS = \
805         -target:exe
807 FS_SANITY_CHECK_CSFILES = \
808         $(srcdir)/SanityCheckTool.cs
810 FS_SANITY_CHECK_LOCAL_ASSEMBLIES = \
811         ../Util/Util.dll                        \
812         ../BeagleClient/Beagle.dll              \
813         ./$(PLUGIN_TARGET)                      \
814         ./$(DAEMON_DLL_TARGET)
816 FS_SANITY_CHECK_ASSEMBLIES = \
817         $(BEAGLED_LIBS)                         \
818         $(SHARPZIPLIB_LIBS)                     \
819         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
820         -r:Mono.Posix                           \
821         -r:System.Runtime.Remoting
823 $(FS_SANITY_CHECK_TARGET): $(FS_SANITY_CHECK_CSFILES) $(FS_SANITY_CHECK_LOCAL_ASSEMBLIES)
824         $(CSC) -out:$@ $(FS_SANITY_CHECK_CSFLAGS) $(FS_SANITY_CHECK_CSFILES) $(FS_SANITY_CHECK_ASSEMBLIES)
826 ############################################################
828 BUILD_INDEX_WRAPPER = beagle-build-index
829 BUILD_INDEX_TARGET = BuildIndex.exe
831 $(BUILD_INDEX_WRAPPER): $(srcdir)/$(WRAPPER_IN)
832         $(WRAPPER_SED) -e "s|\@target\@|$(BUILD_INDEX_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
833         chmod +x $(BUILD_INDEX_WRAPPER)
835 BUILD_INDEX_CSFLAGS = \
836         -target:exe
838 BUILD_INDEX_CSFILES = \
839         $(srcdir)/BuildIndex.cs
841 BUILD_INDEX_LOCAL_ASSEMBLIES = \
842         ../Util/Util.dll                        \
843         ../BeagleClient/Beagle.dll              \
844         ./$(PLUGIN_TARGET)                      \
845         ./$(DAEMON_DLL_TARGET)
847 BUILD_INDEX_ASSEMBLIES = \
848         $(BEAGLED_LIBS)                         \
849         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
850         -r:Mono.Posix
852 $(BUILD_INDEX_TARGET): $(BUILD_INDEX_CSFILES) $(BUILD_INDEX_LOCAL_ASSEMBLIES)
853         $(CSC) -out:$@ $(BUILD_INDEX_CSFLAGS) $(BUILD_INDEX_CSFILES) $(BUILD_INDEX_ASSEMBLIES)
855 ############################################################
857 MANAGE_INDEX_WRAPPER = beagle-manage-index
858 MANAGE_INDEX_TARGET = ManageIndex.exe
860 $(MANAGE_INDEX_WRAPPER): $(srcdir)/$(WRAPPER_IN)
861         $(WRAPPER_SED) -e "s|\@target\@|$(MANAGE_INDEX_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
862         chmod +x $(MANAGE_INDEX_WRAPPER)
864 MANAGE_INDEX_CSFLAGS = \
865         -target:exe
867 MANAGE_INDEX_CSFILES = \
868         $(srcdir)/ManageIndex.cs
870 MANAGE_INDEX_LOCAL_ASSEMBLIES = \
871         ../Util/Util.dll                        \
872         ../BeagleClient/Beagle.dll              \
873         ./$(PLUGIN_TARGET)                      \
874         ./$(DAEMON_DLL_TARGET)
876 MANAGE_INDEX_ASSEMBLIES = \
877         $(BEAGLED_LIBS)                         \
878         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
879         -r:Mono.Posix
881 $(MANAGE_INDEX_TARGET): $(MANAGE_INDEX_CSFILES) $(MANAGE_INDEX_LOCAL_ASSEMBLIES)
882         $(CSC) -out:$@ $(MANAGE_INDEX_CSFLAGS) $(MANAGE_INDEX_CSFILES) $(MANAGE_INDEX_ASSEMBLIES)
884 ############################################################
886 CRAWL_SYSTEM_IN = beagle-crawl-system.in
887 CRAWL_SYSTEM = beagle-crawl-system
889 $(CRAWL_SYSTEM): $(srcdir)/$(CRAWL_SYSTEM_IN)
890         $(WRAPPER_SEB) -e "s|\@target\@|$(CRAWL_SYSTEM)|g" < $(srcdir)/$(CRAWL_SYSTEM_IN) > $@
891         chmod +x $(CRAWL_SYSTEM)
893 # OK, now back to our regularly scheduled program.  But notice all of the
894 # EXTRA_DIST and CLEANFILES stuff at the bottom of the file.  Yuck.
896 ############################################################
897 ############################################################
898 ############################################################
900 #       $(MASTER_DELETE_TARGET)
902 #       $(FS_SANITY_CHECK_TARGET)
904 ALL_TARGETS =                           \
905         $(PLUGIN_TARGET)                \
906         $(DAEMON_DLL_TARGET)            \
907         $(DAEMON_TARGET)                \
908         $(DAEMON_WRAPPER)               \
909         $(INDEX_HELPER_TARGET)          \
910         $(INDEX_HELPER_WRAPPER)         \
911         $(INDEX_WEB_CONTENT_TARGET)     \
912         $(INDEX_WEB_CONTENT_WRAPPER)    \
913         $(EXTRACT_CONTENT_TARGET)       \
914         $(EXTRACT_CONTENT_WRAPPER)      \
915         $(DUMP_INDEX_TARGET)            \
916         $(SNIPPET_TEST_TARGET)          \
917         $(TERM_STATS_TARGET)            \
918         $(NAME_INDEX_TARGET)            \
919         $(MANAGE_INDEX_TARGET)          \
920         $(MANAGE_INDEX_WRAPPER)         \
921         $(BUILD_INDEX_TARGET)           \
922         $(BUILD_INDEX_WRAPPER)
924 if ENABLE_THUNDERBIRD
925 ALL_TARGETS += $(THUNDERBIRD_TARGET)
926 endif
928 if ENABLE_EVOLUTION
929 ALL_TARGETS +=                          \
930         $(EVO_DLL_TARGET)
931 endif
933 man_MANS =                              \
934         beagled.1                       \
935         beagle-build-index.8            \
936         beagle-manage-index.8
938 all: $(ALL_TARGETS)
940 install-data-local: $(ALL_TARGETS)
941         $(mkinstalldirs) $(DESTDIR)$(bindir)
942         $(mkinstalldirs) $(DESTDIR)$(sbindir)
943         $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
944         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
945         $(mkinstalldirs) $(DESTDIR)$(BACKENDDIR)
946 if ENABLE_EVOLUTION
947         $(INSTALL_DATA) $(EVO_DLL_TARGET) $(EVO_DLL_TARGET).mdb $(DESTDIR)$(BACKENDDIR)
948 endif
949         @for i in $(BIN_WRAPPERS); do                                           \
950                 sed -e "s|\#installed=1|installed=1|" < $$i > $$i.tmp;          \
951                 echo "$(INSTALL_SCRIPT) $$i.tmp $(DESTDIR)$(bindir)/$$i";       \
952                 $(INSTALL_SCRIPT) $$i.tmp $(DESTDIR)$(bindir)/$$i || exit 1;    \
953                 rm -f $$i.tmp;                                                  \
954         done
956         @for i in $(SBIN_WRAPPERS); do                                          \
957                 sed -e "s|\#installed=1|installed=1|" < $$i > $$i.tmp;          \
958                 echo "$(INSTALL_SCRIPT) $$i.tmp $(DESTDIR)$(sbindir)/$$i";      \
959                 $(INSTALL_SCRIPT) $$i.tmp $(DESTDIR)$(sbindir)/$$i || exit 1;   \
960                 rm -f $$i.tmp;                                                  \
961         done
963         @sed -e "s|\#installed=1|installed=1|" < $(INDEX_HELPER_WRAPPER) > $(INDEX_HELPER_WRAPPER).tmp
964         $(INSTALL_SCRIPT) $(INDEX_HELPER_WRAPPER).tmp $(DESTDIR)$(pkglibdir)/$(INDEX_HELPER_WRAPPER)
965         @rm -f $(INDEX_HELPER_WRAPPER).tmp
967         $(INSTALL_DATA) $(PLUGIN_TARGET)                 $(DESTDIR)$(pkglibdir)
968         $(INSTALL_DATA) $(PLUGIN_TARGET).mdb             $(DESTDIR)$(pkglibdir)
969         $(INSTALL_DATA) $(DAEMON_DLL_TARGET)             $(DESTDIR)$(pkglibdir)
970         $(INSTALL_DATA) $(DAEMON_DLL_TARGET).mdb         $(DESTDIR)$(pkglibdir)
971         $(INSTALL_DATA) $(DAEMON_TARGET)                 $(DESTDIR)$(pkglibdir)
972         $(INSTALL_DATA) $(DAEMON_TARGET).mdb             $(DESTDIR)$(pkglibdir)
973         $(INSTALL_DATA) $(EXTRACT_CONTENT_TARGET)        $(DESTDIR)$(pkglibdir)
974         $(INSTALL_DATA) $(EXTRACT_CONTENT_TARGET).mdb    $(DESTDIR)$(pkglibdir)
975         $(INSTALL_DATA) $(INDEX_WEB_CONTENT_TARGET)      $(DESTDIR)$(pkglibdir)
976         $(INSTALL_DATA) $(INDEX_WEB_CONTENT_TARGET).mdb  $(DESTDIR)$(pkglibdir)
977         $(INSTALL_DATA) $(INDEX_HELPER_TARGET)           $(DESTDIR)$(pkglibdir)
978         $(INSTALL_DATA) $(INDEX_HELPER_TARGET).mdb       $(DESTDIR)$(pkglibdir)
979         $(INSTALL_DATA) $(BUILD_INDEX_TARGET)            $(DESTDIR)$(pkglibdir)
980         $(INSTALL_DATA) $(BUILD_INDEX_TARGET).mdb        $(DESTDIR)$(pkglibdir)
981         $(INSTALL_DATA) $(MANAGE_INDEX_TARGET)           $(DESTDIR)$(pkglibdir)
982         $(INSTALL_DATA) $(MANAGE_INDEX_TARGET).mdb       $(DESTDIR)$(pkglibdir)
983 if ENABLE_THUNDERBIRD
984         $(INSTALL_DATA) $(THUNDERBIRD_TARGET)                 $(DESTDIR)$(BACKENDDIR)
985         $(INSTALL_DATA) $(THUNDERBIRD_TARGET).mdb             $(DESTDIR)$(BACKENDDIR)
986 endif
988 uninstall-local:
989 if ENABLE_THUNDERBIRD
990         rm -f $(DESTDIR)$(BACKENDDIR)/$(THUNDERBIRD_TARGET)
991         rm -f $(DESTDIR)$(BACKENDDIR)/$(THUNDERBIRD_TARGET).mdb
992 endif
993 if ENABLE_EVOLUTION
994         rm -f $(DESTDIR)$(BACKENDDIR)/$(EVO_DLL_TARGET)
995         rm -f $(DESTDIR)$(BACKENDDIR)/$(EVO_DLL_TARGET).mdb
996 endif
998         @for i in $(BIN_WRAPPERS); do                           \
999                 echo "rm -f $(DESTDIR)$(bindir)/$$i";           \
1000                 rm -f $(DESTDIR)$(bindir)/$$i || exit 1;        \
1001         done
1003         @for i in $(SBIN_WRAPPERS); do                          \
1004                 echo "rm -f $(DESTDIR)$(sbindir)/$$i";          \
1005                 rm -f $(DESTDIR)$(sbindir)/$$i || exit 1;       \
1006         done
1008         rm -f $(DESTDIR)$(pkglibdir)/$(PLUGIN_TARGET)
1009         rm -f $(DESTDIR)$(pkglibdir)/$(PLUGIN_TARGET).mdb
1010         rm -f $(DESTDIR)$(pkglibdir)/$(DAEMON_DLL_TARGET)
1011         rm -f $(DESTDIR)$(pkglibdir)/$(DAEMON_DLL_TARGET).mdb
1012         rm -f $(DESTDIR)$(pkglibdir)/$(DAEMON_TARGET)
1013         rm -f $(DESTDIR)$(pkglibdir)/$(DAEMON_TARGET).mdb
1014         rm -f $(DESTDIR)$(pkglibdir)/$(INDEX_HELPER_TARGET)
1015         rm -f $(DESTDIR)$(pkglibdir)/$(INDEX_HELPER_TARGET).mdb
1016         rm -f $(DESTDIR)$(pkglibdir)/$(INDEX_HELPER_WRAPPER)
1017         rm -f $(DESTDIR)$(pkglibdir)/$(INDEX_HELPER_WRAPPER).mdb
1018         rm -f $(DESTDIR)$(pkglibdir)/$(EXTRACT_CONTENT_TARGET)
1019         rm -f $(DESTDIR)$(pkglibdir)/$(EXTRACT_CONTENT_TARGET).mdb
1020         rm -f $(DESTDIR)$(pkglibdir)/$(INDEX_WEB_CONTENT_TARGET)
1021         rm -f $(DESTDIR)$(pkglibdir)/$(INDEX_WEB_CONTENT_TARGET).mdb
1022         rm -f $(DESTDIR)$(pkglibdir)/$(BUILD_INDEX_TARGET)
1023         rm -f $(DESTDIR)$(pkglibdir)/$(BUILD_INDEX_TARGET).mdb
1024         rm -f $(DESTDIR)$(pkglibdir)/$(MANAGE_INDEX_TARGET)
1025         rm -f $(DESTDIR)$(pkglibdir)/$(MANAGE_INDEX_TARGET).mdb
1027 BIN_WRAPPERS = \
1028         $(DAEMON_WRAPPER)               \
1029         $(EXTRACT_CONTENT_WRAPPER)      \
1030         $(INDEX_WEB_CONTENT_WRAPPER)
1032 SBIN_WRAPPERS = \
1033         $(BUILD_INDEX_WRAPPER)          \
1034         $(MANAGE_INDEX_WRAPPER)
1036 #       $(MASTER_DELETE_WRAPPER)
1037 #       $(FS_SANITY_CHECK_WRAPPER)
1039 noinst_SCRIPTS= \
1040         $(DUMP_INDEX_WRAPPER)           \
1041         $(SNIPPET_TEST_WRAPPER)         \
1042         $(TERM_STATS_WRAPPER)           \
1043         $(NAME_INDEX_WRAPPER)           
1045 EXTRA_DIST = \
1046         $(WRAPPER_IN)                           \
1047         $(DAEMON_WRAPPER_IN)                    \
1048         $(INDEX_HELPER_WRAPPER_IN)              \
1049         $(man_MANS)                             \
1050         $(PLUGIN_CSFILES)                       \
1051         $(DAEMON_DLL_CSFILES)                   \
1052         $(DAEMON_CSFILES)                       \
1053         $(EVO_DLL_CSFILES)                      \
1054         $(THUNDERBIRD_CSFILES)                  \
1055         $(EXTRACT_CONTENT_CSFILES)              \
1056         $(DUMP_INDEX_CSFILES)                   \
1057         $(INDEX_WEB_CONTENT_CSFILES)            \
1058         $(SNIPPET_TEST_CSFILES)                 \
1059         $(INDEX_HELPER_CSFILES)                 \
1060         $(MASTER_DELETE_CSFILES)                \
1061         $(TERM_STATS_CSFILES)                   \
1062         $(NAME_INDEX_CSFILES)                   \
1063         $(FS_SANITY_CHECK_CSFILES)              \
1064         $(MANAGE_INDEX_CSFILES)                 \
1065         $(BUILD_INDEX_CSFILES)
1067 CLEANFILES = \
1068         $(PLUGIN_TARGET)                        \
1069         $(PLUGIN_TARGET).mdb                    \
1070         $(DAEMON_DLL_TARGET)                    \
1071         $(DAEMON_DLL_TARGET).mdb                \
1072         $(DAEMON_TARGET)                        \
1073         $(DAEMON_TARGET).mdb                    \
1074         $(DAEMON_WRAPPER)                       \
1075         $(EVO_DLL_TARGET)                       \
1076         $(EVO_DLL_TARGET).mdb                   \
1077         $(INDEX_HELPER_TARGET)                  \
1078         $(INDEX_HELPER_TARGET).mdb              \
1079         $(INDEX_HELPER_WRAPPER)                 \
1080         $(EXTRACT_CONTENT_TARGET)               \
1081         $(EXTRACT_CONTENT_TARGET).mdb           \
1082         $(EXTRACT_CONTENT_WRAPPER)              \
1083         $(DUMP_INDEX_TARGET)                    \
1084         $(DUMP_INDEX_TARGET).mdb                \
1085         $(DUMP_INDEX_WRAPPER)                   \
1086         $(INDEX_WEB_CONTENT_TARGET)             \
1087         $(INDEX_WEB_CONTENT_TARGET).mdb         \
1088         $(INDEX_WEB_CONTENT_WRAPPER)            \
1089         $(MASTER_DELETE_TARGET)                 \
1090         $(MASTER_DELETE_TARGET).mdb             \
1091         $(MASTER_DELETE_WRAPPER)                \
1092         $(SNIPPET_TEST_TARGET)                  \
1093         $(SNIPPET_TEST_TARGET).mdb              \
1094         $(SNIPPET_TEST_WRAPPER)                 \
1095         $(TERM_STATS_TARGET)                    \
1096         $(TERM_STATS_TARGET).mdb                \
1097         $(TERM_STATS_WRAPPER)                   \
1098         $(NAME_INDEX_TARGET)                    \
1099         $(NAME_INDEX_TARGET).mdb                \
1100         $(NAME_INDEX_WRAPPER)                   \
1101         $(FS_SANITY_CHECK_TARGET)               \
1102         $(FS_SANITY_CHECK_TARGET).mdb           \
1103         $(FS_SANITY_CHECK_WRAPPER)              \
1104         $(MANAGE_INDEX_TARGET)                  \
1105         $(MANAGE_INDEX_TARGET).mdb              \
1106         $(MANAGE_INDEX_WRAPPER)                 \
1107         $(BUILD_INDEX_TARGET)                   \
1108         $(BUILD_INDEX_TARGET).mdb               \
1109         $(BUILD_INDEX_WRAPPER)                  \
1110         $(THUNDERBIRD_TARGET)                   \
1111         $(THUNDERBIRD_TARGET).mdb