2006-09-10 Francisco Javier F. Serrador <serrador@openshine.com>
[beagle.git] / beagled / Makefile.am
blob48454fcbd5f0a645cba6d4b7dd63a893799c9e20
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)/AssemblyInfo.cs                                    \
57         $(lucenedir)/LucenePackage.cs                                   \
58         $(lucenedir)/SupportClass.cs                                    \
59         $(lucenedir)/Store/BufferedIndexInput.cs                        \
60         $(lucenedir)/Store/BufferedIndexOutput.cs                       \
61         $(lucenedir)/Store/Directory.cs                                 \
62         $(lucenedir)/Store/FSDirectory.cs                               \
63         $(lucenedir)/Store/IndexInput.cs                                \
64         $(lucenedir)/Store/IndexOutput.cs                               \
65         $(lucenedir)/Store/InputStream.cs                               \
66         $(lucenedir)/Store/Lock.cs                                      \
67         $(lucenedir)/Store/MMapDirectory.cs                             \
68         $(lucenedir)/Store/OutputStream.cs                              \
69         $(lucenedir)/Store/RAMDirectory.cs                              \
70         $(lucenedir)/Store/RAMFile.cs                                   \
71         $(lucenedir)/Store/RAMInputStream.cs                            \
72         $(lucenedir)/Store/RAMOutputStream.cs                           \
73         $(lucenedir)/Util/BitVector.cs                                  \
74         $(lucenedir)/Util/Constants.cs                                  \
75         $(lucenedir)/Util/Parameter.cs                                  \
76         $(lucenedir)/Util/PriorityQueue.cs                              \
77         $(lucenedir)/Util/StringHelper.cs                               \
78         $(lucenedir)/Index/CompoundFileReader.cs                        \
79         $(lucenedir)/Index/CompoundFileWriter.cs                        \
80         $(lucenedir)/Index/DocumentWriter.cs                            \
81         $(lucenedir)/Index/FieldInfo.cs                                 \
82         $(lucenedir)/Index/FieldInfos.cs                                \
83         $(lucenedir)/Index/FieldsReader.cs                              \
84         $(lucenedir)/Index/FieldsWriter.cs                              \
85         $(lucenedir)/Index/FilterIndexReader.cs                         \
86         $(lucenedir)/Index/IndexReader.cs                               \
87         $(lucenedir)/Index/IndexWriter.cs                               \
88         $(lucenedir)/Index/MultipleTermPositions.cs                     \
89         $(lucenedir)/Index/MultiReader.cs                               \
90         $(lucenedir)/Index/SegmentInfo.cs                               \
91         $(lucenedir)/Index/SegmentInfos.cs                              \
92         $(lucenedir)/Index/SegmentMergeInfo.cs                          \
93         $(lucenedir)/Index/SegmentMergeQueue.cs                         \
94         $(lucenedir)/Index/SegmentMerger.cs                             \
95         $(lucenedir)/Index/SegmentReader.cs                             \
96         $(lucenedir)/Index/SegmentTermDocs.cs                           \
97         $(lucenedir)/Index/SegmentTermEnum.cs                           \
98         $(lucenedir)/Index/SegmentTermPositions.cs                      \
99         $(lucenedir)/Index/SegmentTermPositionVector.cs                 \
100         $(lucenedir)/Index/SegmentTermVector.cs                         \
101         $(lucenedir)/Index/Term.cs                                      \
102         $(lucenedir)/Index/TermBuffer.cs                                \
103         $(lucenedir)/Index/TermDocs.cs                                  \
104         $(lucenedir)/Index/TermEnum.cs                                  \
105         $(lucenedir)/Index/TermFreqVector.cs                            \
106         $(lucenedir)/Index/TermInfo.cs                                  \
107         $(lucenedir)/Index/TermInfosReader.cs                           \
108         $(lucenedir)/Index/TermInfosWriter.cs                           \
109         $(lucenedir)/Index/TermPositions.cs                             \
110         $(lucenedir)/Index/TermPositionVector.cs                        \
111         $(lucenedir)/Index/TermVectorOffsetInfo.cs                      \
112         $(lucenedir)/Index/TermVectorsReader.cs                         \
113         $(lucenedir)/Index/TermVectorsWriter.cs                         \
114         $(lucenedir)/Document/DateField.cs                              \
115         $(lucenedir)/Document/DateTools.cs                              \
116         $(lucenedir)/Document/Document.cs                               \
117         $(lucenedir)/Document/Field.cs                                  \
118         $(lucenedir)/Document/NumberTools.cs                            \
119         $(lucenedir)/Analysis/DE/WordlistLoader.cs                      \
120         $(lucenedir)/Analysis/Standard/CharStream.cs                    \
121         $(lucenedir)/Analysis/Standard/FastCharStream.cs                \
122         $(lucenedir)/Analysis/Standard/ParseException.cs                \
123         $(lucenedir)/Analysis/Standard/StandardAnalyzer.cs              \
124         $(lucenedir)/Analysis/Standard/StandardFilter.cs                \
125         $(lucenedir)/Analysis/Standard/StandardTokenizer.cs             \
126         $(lucenedir)/Analysis/Standard/StandardTokenizerConstants.cs    \
127         $(lucenedir)/Analysis/Standard/StandardTokenizerTokenManager.cs \
128         $(lucenedir)/Analysis/Standard/Token.cs                         \
129         $(lucenedir)/Analysis/Standard/TokenMgrError.cs                 \
130         $(lucenedir)/Analysis/Analyzer.cs                               \
131         $(lucenedir)/Analysis/CharTokenizer.cs                          \
132         $(lucenedir)/Analysis/LetterTokenizer.cs                        \
133         $(lucenedir)/Analysis/LowerCaseFilter.cs                        \
134         $(lucenedir)/Analysis/LowerCaseTokenizer.cs                     \
135         $(lucenedir)/Analysis/PerFieldAnalyzerWrapper.cs                \
136         $(lucenedir)/Analysis/PorterStemFilter.cs                       \
137         $(lucenedir)/Analysis/PorterStemmer.cs                          \
138         $(lucenedir)/Analysis/SimpleAnalyzer.cs                         \
139         $(lucenedir)/Analysis/StopAnalyzer.cs                           \
140         $(lucenedir)/Analysis/StopFilter.cs                             \
141         $(lucenedir)/Analysis/Token.cs                                  \
142         $(lucenedir)/Analysis/TokenFilter.cs                            \
143         $(lucenedir)/Analysis/Tokenizer.cs                              \
144         $(lucenedir)/Analysis/TokenStream.cs                            \
145         $(lucenedir)/Analysis/WhitespaceAnalyzer.cs                     \
146         $(lucenedir)/Analysis/WhitespaceTokenizer.cs                    \
147         $(lucenedir)/Search/Spans/NearSpans.cs                          \
148         $(lucenedir)/Search/Spans/SpanFirstQuery.cs                     \
149         $(lucenedir)/Search/Spans/SpanNearQuery.cs                      \
150         $(lucenedir)/Search/Spans/SpanNotQuery.cs                       \
151         $(lucenedir)/Search/Spans/SpanOrQuery.cs                        \
152         $(lucenedir)/Search/Spans/SpanQuery.cs                          \
153         $(lucenedir)/Search/Spans/Spans.cs                              \
154         $(lucenedir)/Search/Spans/SpanScorer.cs                         \
155         $(lucenedir)/Search/Spans/SpanTermQuery.cs                      \
156         $(lucenedir)/Search/Spans/SpanWeight.cs                         \
157         $(lucenedir)/Search/BooleanClause.cs                            \
158         $(lucenedir)/Search/BooleanQuery.cs                             \
159         $(lucenedir)/Search/BooleanScorer.cs                            \
160         $(lucenedir)/Search/BooleanScorer2.cs                           \
161         $(lucenedir)/Search/CachingWrapperFilter.cs                     \
162         $(lucenedir)/Search/ConjunctionScorer.cs                        \
163         $(lucenedir)/Search/DateFilter.cs                               \
164         $(lucenedir)/Search/DefaultSimilarity.cs                        \
165         $(lucenedir)/Search/DisjunctionSumScorer.cs                     \
166         $(lucenedir)/Search/ExactPhraseScorer.cs                        \
167         $(lucenedir)/Search/Explanation.cs                              \
168         $(lucenedir)/Search/FieldCache.cs                               \
169         $(lucenedir)/Search/FieldCacheImpl.cs                           \
170         $(lucenedir)/Search/FieldDoc.cs                                 \
171         $(lucenedir)/Search/FieldDocSortedHitQueue.cs                   \
172         $(lucenedir)/Search/FieldSortedHitQueue.cs                      \
173         $(lucenedir)/Search/Filter.cs                                   \
174         $(lucenedir)/Search/FilteredQuery.cs                            \
175         $(lucenedir)/Search/FilteredTermEnum.cs                         \
176         $(lucenedir)/Search/FuzzyQuery.cs                               \
177         $(lucenedir)/Search/FuzzyTermEnum.cs                            \
178         $(lucenedir)/Search/HitCollector.cs                             \
179         $(lucenedir)/Search/HitQueue.cs                                 \
180         $(lucenedir)/Search/Hits.cs                                     \
181         $(lucenedir)/Search/IndexSearcher.cs                            \
182         $(lucenedir)/Search/MultiPhraseQuery.cs                         \
183         $(lucenedir)/Search/MultiSearcher.cs                            \
184         $(lucenedir)/Search/MultiTermQuery.cs                           \
185         $(lucenedir)/Search/NonMatchingScorer.cs                        \
186         $(lucenedir)/Search/ParallelMultiSearcher.cs                    \
187         $(lucenedir)/Search/PhrasePositions.cs                          \
188         $(lucenedir)/Search/PhrasePrefixQuery.cs                        \
189         $(lucenedir)/Search/PhraseQuery.cs                              \
190         $(lucenedir)/Search/PhraseQueue.cs                              \
191         $(lucenedir)/Search/PhraseScorer.cs                             \
192         $(lucenedir)/Search/PrefixQuery.cs                              \
193         $(lucenedir)/Search/Query.cs                                    \
194         $(lucenedir)/Search/QueryFilter.cs                              \
195         $(lucenedir)/Search/QueryTermVector.cs                          \
196         $(lucenedir)/Search/RangeFilter.cs                              \
197         $(lucenedir)/Search/RangeQuery.cs                               \
198         $(lucenedir)/Search/RemoteSearchable.cs                         \
199         $(lucenedir)/Search/ReqExclScorer.cs                            \
200         $(lucenedir)/Search/ReqOptSumScorer.cs                          \
201         $(lucenedir)/Search/ScoreDoc.cs                                 \
202         $(lucenedir)/Search/ScoreDocComparator.cs                       \
203         $(lucenedir)/Search/Scorer.cs                                   \
204         $(lucenedir)/Search/Searchable.cs                               \
205         $(lucenedir)/Search/Searcher.cs                                 \
206         $(lucenedir)/Search/Similarity.cs                               \
207         $(lucenedir)/Search/SimilarityDelegator.cs                      \
208         $(lucenedir)/Search/SloppyPhraseScorer.cs                       \
209         $(lucenedir)/Search/Sort.cs                                     \
210         $(lucenedir)/Search/SortComparator.cs                           \
211         $(lucenedir)/Search/SortComparatorSource.cs                     \
212         $(lucenedir)/Search/SortField.cs                                \
213         $(lucenedir)/Search/TermQuery.cs                                \
214         $(lucenedir)/Search/TermScorer.cs                               \
215         $(lucenedir)/Search/TopDocs.cs                                  \
216         $(lucenedir)/Search/TopFieldDocs.cs                             \
217         $(lucenedir)/Search/Weight.cs                                   \
218         $(lucenedir)/Search/WildcardQuery.cs                            \
219         $(lucenedir)/Search/WildcardTermEnum.cs                         \
220         $(lucenedir)/QueryParser/Precedence/CharStream.cs               \
221         $(lucenedir)/QueryParser/Precedence/ParseException.cs           \
222         $(lucenedir)/QueryParser/Precedence/FastCharStream.cs           \
223         $(lucenedir)/QueryParser/Precedence/PrecedenceQueryParserConstants.cs\
224         $(lucenedir)/QueryParser/Precedence/Token.cs                    \
225         $(lucenedir)/QueryParser/Precedence/PrecedenceQueryParserTokenManager.cs\
226         $(lucenedir)/QueryParser/Precedence/PrecedenceQueryParser.cs    \
227         $(lucenedir)/QueryParser/Precedence/TokenMgrError.cs            \
228         $(lucenedir)/QueryParser/CharStream.cs                          \
229         $(lucenedir)/QueryParser/FastCharStream.cs                      \
230         $(lucenedir)/QueryParser/MultiFieldQueryParser.cs               \
231         $(lucenedir)/QueryParser/ParseException.cs                      \
232         $(lucenedir)/QueryParser/QueryParser.cs                         \
233         $(lucenedir)/QueryParser/QueryParserConstants.cs                \
234         $(lucenedir)/QueryParser/QueryParserTokenManager.cs             \
235         $(lucenedir)/QueryParser/Token.cs                               \
236         $(lucenedir)/QueryParser/TokenMgrError.cs
238 LUCENE_CSFILES = $(LUCENE_1_9_CSFILES)
240 ############################################################
242 sqlitedir = $(srcdir)/Mono.Data.SqliteClient
244 SQLITE_CSFILES =                                        \
245         $(sqlitedir)/SqliteCommand.cs                   \
246         $(sqlitedir)/SqliteConnection.cs                \
247         $(sqlitedir)/Sqlite.cs                          \
248         $(sqlitedir)/SqliteDataAdapter.cs               \
249         $(sqlitedir)/SqliteDataReader.cs                \
250         $(sqlitedir)/SqliteExceptions.cs                \
251         $(sqlitedir)/SqliteParameterCollection.cs       \
252         $(sqlitedir)/SqliteParameter.cs                 \
253         $(sqlitedir)/SqliteRowUpdatedEventArgs.cs       \
254         $(sqlitedir)/SqliteRowUpdatedEventHandler.cs    \
255         $(sqlitedir)/SqliteRowUpdatingEventArgs.cs      \
256         $(sqlitedir)/SqliteRowUpdatingEventHandler.cs   \
257         $(sqlitedir)/SqliteTransaction.cs
259 ############################################################
261 DAEMON_DLL_TARGET = BeagleDaemonLib.dll
263 DAEMON_DLL_CSFLAGS = -target:library $(BEAGLE_DEFINES)
265 fsqueryabledir = $(srcdir)/FileSystemQueryable
266 FILE_SYSTEM_QUERYABLE_CSFILES =                                 \
267         $(fsqueryabledir)/DirectoryModel.cs                     \
268         $(fsqueryabledir)/DirectoryState.cs                     \
269         $(fsqueryabledir)/TreeCrawlTask.cs                      \
270         $(fsqueryabledir)/FileCrawlTask.cs                      \
271         $(fsqueryabledir)/DirectoryIndexableGenerator.cs        \
272         $(fsqueryabledir)/FileNameFilter.cs                     \
273         $(fsqueryabledir)/LuceneNameResolver.cs                 \
274         $(fsqueryabledir)/FileSystemQueryable.cs                \
275         $(fsqueryabledir)/IFileEventBackend.cs                  \
276         $(fsqueryabledir)/InotifyBackend.cs                     \
277         $(fsqueryabledir)/NullFileEventBackend.cs
280 gaimlogqueryable = $(srcdir)/GaimLogQueryable
281 GAIM_LOG_QUERYABLE_CSFILES =                            \
282         $(gaimlogqueryable)/GaimLogQueryable.cs
284 tomboyqueryable = $(srcdir)/TomboyQueryable
285 TOMBOY_QUERYABLE_CSFILES =                              \
286         $(tomboyqueryable)/TomboyQueryable.cs
288 kmailqueryable = $(srcdir)/KMailQueryable
289 KMAIL_QUERYABLE_CSFILES =                               \
290         $(kmailqueryable)/KMailQueryable.cs             \
291         $(kmailqueryable)/KMailIndexableGenerator.cs    \
292         $(kmailqueryable)/KMailIndexer.cs
294 blamqueryable = $(srcdir)/BlamQueryable
295 BLAM_QUERYABLE_CSFILES =                                \
296         $(blamqueryable)/BlamQueryable.cs
298 lifereaqueryable = $(srcdir)/LifereaQueryable
299 LIFEREA_QUERYABLE_CSFILES =                             \
300         $(lifereaqueryable)/LifereaQueryable.cs
302 akregatorqueryable = $(srcdir)/AkregatorQueryable
303 AKREGATOR_QUERYABLE_CSFILES =                           \
304         $(akregatorqueryable)/AkregatorQueryable.cs
306 konqhistoryqueryable = $(srcdir)/KonqHistoryQueryable
307 KONQHISTORY_QUERYABLE_CSFILES =                         \
308         $(konqhistoryqueryable)/KonqQueryable.cs
310 kopetequeryable = $(srcdir)/KopeteQueryable
311 KOPETE_QUERYABLE_CSFILES =                              \
312         $(kopetequeryable)/KopeteQueryable.cs           \
313         $(kopetequeryable)/KopeteCrawler.cs
315 indexingservicequeryable = $(srcdir)/IndexingServiceQueryable
316 INDEXING_SERVICE_QUERYABLE_CSFILES =                    \
317         $(indexingservicequeryable)/IndexingServiceQueryable.cs
319 DAEMON_DLL_CSFILES =                                            \
320         $(LUCENE_CSFILES)                                       \
321         $(KMAIL_QUERYABLE_CSFILES)                              \
322         $(FILE_SYSTEM_QUERYABLE_CSFILES)                        \
323         $(GAIM_LOG_QUERYABLE_CSFILES)                           \
324         $(INDEXING_SERVICE_QUERYABLE_CSFILES)                   \
325         $(TOMBOY_QUERYABLE_CSFILES)                             \
326         $(BLAM_QUERYABLE_CSFILES)                               \
327         $(LIFEREA_QUERYABLE_CSFILES)                            \
328         $(AKREGATOR_QUERYABLE_CSFILES)                          \
329         $(KONQHISTORY_QUERYABLE_CSFILES)                                \
330         $(KOPETE_QUERYABLE_CSFILES)                             \
331         $(srcdir)/FileAttributes.cs                             \
332         $(srcdir)/FileAttributesStore.cs                        \
333         $(srcdir)/FileAttributesStore_ExtendedAttribute.cs      \
334         $(srcdir)/FileAttributesStore_Mixed.cs                  \
335         $(srcdir)/FileAttributesStore_Sqlite.cs                 \
336         $(srcdir)/FilterFactory.cs                              \
337         $(srcdir)/IFileAttributesStore.cs                       \
338         $(srcdir)/IIndexer.cs                                   \
339         $(srcdir)/IndexSynchronization.cs                       \
340         $(srcdir)/IndexerReceipts.cs                            \
341         $(srcdir)/IndexerRequest.cs                             \
342         $(srcdir)/IQueryResult.cs                               \
343         $(srcdir)/IQueryWorker.cs                               \
344         $(srcdir)/IQueryable.cs                                 \
345         $(srcdir)/LuceneBitArray.cs                             \
346         $(srcdir)/LuceneCommon.cs                               \
347         $(srcdir)/LuceneIndexingDriver.cs                       \
348         $(srcdir)/LuceneQueryingDriver.cs                       \
349         $(srcdir)/LuceneFileQueryable.cs                        \
350         $(srcdir)/LuceneQueryable.cs                            \
351         $(srcdir)/NoiseFilter.cs                                \
352         $(srcdir)/PropertyKeywordFu.cs                          \
353         $(srcdir)/QueryDriver.cs                                \
354         $(srcdir)/QueryExecutor.cs                              \
355         $(srcdir)/QueryResult.cs                                \
356         $(srcdir)/QueryStringParser.cs                          \
357         $(srcdir)/Queryable.cs                                  \
358         $(srcdir)/QueryableFlavor.cs                            \
359         $(srcdir)/RemoteControlExecutors.cs                     \
360         $(srcdir)/RemoteIndexerRequest.cs                       \
361         $(srcdir)/RemoteIndexerResponse.cs                      \
362         $(srcdir)/Server.cs                                     \
363         $(srcdir)/Shutdown.cs                                   \
364         $(srcdir)/SnippetExecutor.cs                            \
365         $(srcdir)/SnippetFu.cs                                  \
366         $(srcdir)/SqliteUtils.cs                                \
367         $(srcdir)/StaticQueryable.cs                            \
368         $(srcdir)/TextCache.cs
370 DAEMON_DLL_LOCAL_ASSEMBLIES =           \
371         ../Util/Util.dll                \
372         ../BeagleClient/Beagle.dll      \
373         ./$(PLUGIN_TARGET)
375 DAEMON_DLL_ASSEMBLIES =                         \
376         $(BEAGLED_LIBS)                         \
377         $(DAEMON_DLL_LOCAL_ASSEMBLIES:%=-r:%)   \
378         $(SHARPZIPLIB_LIBS)             \
379         -r:Mono.Data.SqliteClient               \
380         -r:Mono.Posix                           \
381         -r:System.Runtime.Remoting              \
382         -r:System.Web
384 if USE_LOCAL_SQLITE
385 DAEMON_DLL_CSFILES += $(SQLITE_CSFILES)
386 DAEMON_DLL_ASSEMBLIES += -r:System.Data
387 else
388 DAEMON_DLL_ASSEMBLIES += -r:Mono.Data.SqliteClient
389 endif
391 #if ENABLE_MOZILLA_BACKEND
392 #mozillaqueryable = $(srcdir)/MozillaQueryable
393 #MOZILLA_QUERYABLE_CSFILES =                            \
394 #       $(mozillaqueryable)/MozillaQueryable.cs
395 #DAEMON_DLL_CSFILES +=                                  \
396 #       $(MOZILLA_QUERYABLE_CSFILES)
397 #endif
399 if ENABLE_WEBSERVICES
400 DAEMON_DLL_CSFILES += \
401         $(webservicesdir)/WebServiceProxy.cs    \
402         $(webservicesdir)/NetBeagleHandler.cs   \
403         $(webservicesdir)/NetBeagleQueryable.cs 
404 DAEMON_DLL_ASSEMBLIES += -r:System.Web.Services 
405 endif
407 if ENABLE_GOOGLEDRIVER
408 DAEMON_DLL_CSFILES +=                  \
409        $(srcdir)/GoogleDriver.cs
410 endif
412 $(DAEMON_DLL_TARGET): $(DAEMON_DLL_CSFILES) $(DAEMON_DLL_LOCAL_ASSEMBLIES)
413         $(CSC) -out:$@ $(DAEMON_DLL_CSFLAGS) $(DAEMON_DLL_CSFILES) $(DAEMON_DLL_ASSEMBLIES)
415 ############################################################
418 ### Pluggable backend support
421 BACKEND_CSFLAGS = -target:library
422 BACKEND_LOCAL_ASSEMBLIES =                      \
423         ../Util/Util.dll                        \
424         ../BeagleClient/Beagle.dll              \
425         ./$(DAEMON_DLL_TARGET)
427 BACKEND_ASSEMBLIES =                            \
428         $(SHARPZIPLIB_LIBS)                     \
429         $(BACKEND_LOCAL_ASSEMBLIES:%=-r:%)      \
430         -r:Mono.Posix
433 ### Evolution backend
436 edsqueryable = $(srcdir)/EvolutionDataServerQueryable
437 EDS_QUERYABLE_CSFILES =                                 \
438         $(edsqueryable)/BookContainer.cs                \
439         $(edsqueryable)/CalContainer.cs                 \
440         $(edsqueryable)/Container.cs                    \
441         $(edsqueryable)/EvolutionDataServerQueryable.cs \
442         $(edsqueryable)/SourcesHandler.cs
444 evomailqueryable = $(srcdir)/EvolutionMailDriver
445 EVO_MAIL_QUERYABLE_CSFILES =                                    \
446         $(evomailqueryable)/EvolutionMailDriver.cs              \
447         $(evomailqueryable)/EvolutionMailIndexableGenerator.cs  \
448         $(evomailqueryable)/GConfThreadHelper.cs                \
449         $(evomailqueryable)/MailCrawler.cs
451 EVO_DLL_TARGET = EvolutionBackends.dll
452 EVO_DLL_CSFLAGS = $(BACKEND_CSFLAGS)
453 EVO_DLL_CSFILES = $(EDS_QUERYABLE_CSFILES) $(EVO_MAIL_QUERYABLE_CSFILES)
454 EVO_DLL_ASSEMBLIES = $(BACKEND_ASSEMBLIES) $(EVO_LIBS)
456 $(EVO_DLL_TARGET): $(EVO_DLL_CSFILES) $(DAEMON_DLL_LOCAL_ASSEMBLIES) $(DAEMON_DLL_TARGET)
457         $(CSC) -out:$@ $(EVO_DLL_CSFLAGS) $(EVO_DLL_CSFILES) -r:$(DAEMON_DLL_TARGET) $(EVO_DLL_ASSEMBLIES)
459 ############################################################
462 ### Web Services
465 webservicesdir = $(srcdir)/WebServices
466 xspdir = $(srcdir)/WebServices/WebServer
468 WEBSERVICES_XSP_TARGET = BeagleXsp.dll
470 WEBSERVICES_XSP_CSFLAGS = -target:library 
472 WEBSERVICES_XSP_ASSEMBLIES =                    \
473         -r:System                               \
474         -r:System.Web                           \
475         -r:System.Runtime.Remoting      
477 WEBSERVICES_XSP_CSFILES =                       \
478         $(xspdir)/IApplicationHost.cs           \
479         $(xspdir)/MonoWorkerRequest.cs          \
480         $(xspdir)/Tracing.cs                    \
481         $(xspdir)/ApplicationServer.cs          \
482         $(xspdir)/LingeringNetworkStream.cs     \
483         $(xspdir)/BaseApplicationHost.cs        \
484         $(xspdir)/BaseRequestBroker.cs          \
485         $(xspdir)/IWebSource.cs                 \
486         $(xspdir)/server.cs                     \
487         $(xspdir)/InitialWorkerRequest.cs       \
488         $(xspdir)/XSPApplicationHost.cs         \
489         $(xspdir)/XSPWorkerRequest.cs           \
490         $(xspdir)/AssemblyInfo.cs
492 $(WEBSERVICES_XSP_TARGET): $(WEBSERVICES_XSP_CSFILES) 
493         $(CSC) -out:$@ $(WEBSERVICES_XSP_CSFLAGS) $(WEBSERVICES_XSP_CSFILES) $(WEBSERVICES_XSP_ASSEMBLIES)
496 WEBSERVICES_BACKEND_TARGET = BeagleWebServicesBackEnd.dll
498 WEBSERVICES_BACKEND_LOCAL_ASSEMBLIES =  \
499         ../Util/Util.dll                \
500         ../images/Images.dll            \
501         ../BeagleClient/Beagle.dll      \
502         ../Tiles/Tiles.dll              \
503         BeagleDaemonPlugins.dll         \
504         BeagleDaemonLib.dll                     \
505         $(WEBSERVICES_XSP_TARGET)
507 WEBSERVICES_BACKEND_ASSEMBLIES = \
508         $(WEBSERVICES_BACKEND_LOCAL_ASSEMBLIES:%=-r:%)  \
509         -r:System                                       \
510         -r:System.Web                           \
511         -r:System.Runtime.Remoting      \
512         $(BEAGLED_LIBS)
514 WEBSERVICES_BACKEND_CSFILES = \
515         $(webservicesdir)/ExternalAccessFilter.cs       \
516         $(webservicesdir)/WebBackEnd.cs         \
517         $(webservicesdir)/WebServiceBackEnd.cs
519 WEBSERVICES_CSFLAGS = -target:library -noconfig
521 $(WEBSERVICES_BACKEND_TARGET): $(WEBSERVICES_BACKEND_CSFILES) $(WEBSERVICES_BACKEND_LOCAL_ASSEMBLIES)
522         $(CSC) -out:$@ $(WEBSERVICES_CSFLAGS) $(WEBSERVICES_BACKEND_CSFILES) $(WEBSERVICES_BACKEND_ASSEMBLIES)
524 WEBSERVICES_FRONTEND_TARGET = BeagleWebServicesFrontEnd.dll
525 WEBSERVICES_FRONTEND_CSFILES = \
526         $(webservicesdir)/WebFrontEnd.cs        \
527         $(webservicesdir)/WebServiceFrontEnd.cs
529 WEBSERVICES_FRONTEND_ASSEMBLIES =       \
530         $(WEBSERVICES_BACKEND_ASSEMBLIES)       \
531         -r:$(WEBSERVICES_BACKEND_TARGET)        \
532         -r:System.Web.Services
534 $(WEBSERVICES_FRONTEND_TARGET): $(WEBSERVICES_FRONTEND_CSFILES) $(WEBSERVICES_BACKEND_TARGET) 
535         $(CSC) -out:$@ $(WEBSERVICES_CSFLAGS) $(WEBSERVICES_FRONTEND_CSFILES) $(WEBSERVICES_FRONTEND_ASSEMBLIES)
537 WEBSERVICES_RESOURCES =                         \
538         $(webservicesdir)/search.aspx   \
539         $(webservicesdir)/search.asmx   \
540         $(webservicesdir)/web.config
542 WEBSERVICES_RESOURCES_DIST =            \
543         $(webservicesdir)/search.aspx   \
544         $(webservicesdir)/search.asmx   \
545         $(webservicesdir)/web.config
547 XSP_DIR = $(pkgdatadir)/xsp
548 XSPBIN_DIR = $(XSP_DIR)/bin
550 ############################################################
552 DAEMON_WRAPPER = beagled
553 DAEMON_WRAPPER_IN = beagled.in
554 DAEMON_TARGET = BeagleDaemon.exe
556 $(DAEMON_WRAPPER): $(srcdir)/$(DAEMON_WRAPPER_IN)
557         $(WRAPPER_SED) -e "s|\@target\@|$(DAEMON_TARGET)|g" < $(srcdir)/$(DAEMON_WRAPPER_IN) > $@
558         chmod +x $(DAEMON_WRAPPER)
560 DAEMON_CSFLAGS =                                \
561         -target:exe                             \
562         $(BEAGLE_DEFINES)
564 DAEMON_CSFILES =                                \
565         $(srcdir)/BeagleDaemon.cs               \
566         $(srcdir)/RemoteIndexer.cs
568 DAEMON_LOCAL_ASSEMBLIES =                       \
569         ../Util/Util.dll                        \
570         ../BeagleClient/Beagle.dll              \
571         ./$(PLUGIN_TARGET)                      \
572         ./$(DAEMON_DLL_TARGET)
574 DAEMON_ASSEMBLIES =                             \
575         $(BEAGLED_LIBS)                         \
576         $(SHARPZIPLIB_LIBS)                     \
577         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
578         -r:Mono.Posix
580 if ENABLE_WEBSERVICES
581 DAEMON_CSFLAGS += -define:ENABLE_WEBSERVICES
583 DAEMON_LOCAL_ASSEMBLIES +=              \
584         BeagleDaemonPlugins.dll         \
585         ../images/Images.dll            \
586         ../Tiles/Tiles.dll              \
587         $(WEBSERVICES_BACKEND_TARGET)   \
588         $(WEBSERVICES_FRONTEND_TARGET)  
590 DAEMON_ASSEMBLIES += -r:System.Runtime.Remoting
591 endif
593 $(DAEMON_TARGET): $(DAEMON_CSFILES) $(DAEMON_LOCAL_ASSEMBLIES)
594         $(CSC) -out:$@ $(DAEMON_CSFLAGS) $(DAEMON_CSFILES) $(DAEMON_ASSEMBLIES)
596 if ENABLE_THUNDERBIRD   
597 THUNDERBIRD_DIR = $(srcdir)/ThunderbirdQueryable
599 THUNDERBIRD_TARGET = ThunderbirdBackends.dll
601 THUNDERBIRD_CSFLAGS = -target:library
604 THUNDERBIRD_CSFILES =                                           \
605         $(THUNDERBIRD_DIR)/LuceneAccess.cs                      \
606         $(THUNDERBIRD_DIR)/ThunderbirdIndexer.cs                \
607         $(THUNDERBIRD_DIR)/ThunderbirdIndexableGenerator.cs     \
608         $(THUNDERBIRD_DIR)/ThunderbirdQueryable.cs              \
609         $(THUNDERBIRD_DIR)/ThunderbirdInotify.cs                \
610         $(THUNDERBIRD_DIR)/Mail.cs                              \
611         $(THUNDERBIRD_DIR)/Contact.cs                           \
612         $(THUNDERBIRD_DIR)/Rss.cs                               \
613         $(THUNDERBIRD_DIR)/Nntp.cs                              \
614         $(THUNDERBIRD_DIR)/MoveMail.cs
616 THUNDERBIRD_LOCAL_ASSEMBLIES =          \
617         ../Util/Util.dll                \
618         ../BeagleClient/Beagle.dll      \
619         ./BeagleDaemonLib.dll
621 THUNDERBIRD_ASSEMBLIES =                                \
622         -r:Mono.Posix                           \
623         $(BEAGLED_LIBS)                         \
624         $(THUNDERBIRD_LOCAL_ASSEMBLIES:%=-r:%)
627 $(THUNDERBIRD_TARGET): $(THUNDERBIRD_CSFILES) $(THUNDERBIRD_LOCAL_ASSEMBLIES)
628         $(CSC) -out:$@ $(THUNDERBIRD_CSFLAGS) $(THUNDERBIRD_CSFILES) $(THUNDERBIRD_ASSEMBLIES)
629 endif
631 ############################################################
632 ############################################################
633 ############################################################
635 # This next section is a very good example of why we need real mono support in
636 # automake.  This is a massive wart on our development platform.
638 INDEX_HELPER_WRAPPER = beagled-index-helper
639 INDEX_HELPER_WRAPPER_IN = $(INDEX_HELPER_WRAPPER).in
640 INDEX_HELPER_TARGET = IndexHelper.exe
642 $(INDEX_HELPER_WRAPPER): $(srcdir)/$(INDEX_HELPER_WRAPPER_IN)
643         $(WRAPPER_SED) -e "s|\@target\@|$(INDEX_HELPER_TARGET)|g" < $(srcdir)/$(INDEX_HELPER_WRAPPER_IN) > $@
644         chmod +x $(INDEX_HELPER_WRAPPER)
646 INDEX_HELPER_CSFLAGS = -target:exe $(BEAGLE_DEFINES)
648 indexhelperdir = $(srcdir)/IndexHelper
650 INDEX_HELPER_CSFILES =  \
651         $(indexhelperdir)/IndexHelper.cs                \
652         $(indexhelperdir)/RemoteIndexerExecutor.cs
655 INDEX_HELPER_LOCAL_ASSEMBLIES =         \
656         ../Util/Util.dll                \
657         ../BeagleClient/Beagle.dll      \
658         ./$(DAEMON_DLL_TARGET)
660 INDEX_HELPER_ASSEMBLIES = \
661         $(BEAGLED_LIBS)                         \
662         $(SHARPZIPLIB_LIBS)                     \
663         $(INDEX_HELPER_LOCAL_ASSEMBLIES:%=-r:%) \
664         -r:Mono.Posix                           \
665         -r:System.Runtime.Remoting
667 $(INDEX_HELPER_TARGET): $(INDEX_HELPER_CSFILES) $(INDEX_HELPER_LOCAL_ASSEMBLIES)
668         $(CSC) -out:$@ $(INDEX_HELPER_CSFLAGS) $(INDEX_HELPER_CSFILES) $(INDEX_HELPER_ASSEMBLIES)
670 ############################################################
672 EXTRACT_CONTENT_WRAPPER = beagle-extract-content
673 EXTRACT_CONTENT_TARGET = ExtractContent.exe
675 $(EXTRACT_CONTENT_WRAPPER): $(srcdir)/$(WRAPPER_IN)
676         $(WRAPPER_SED) -e "s|\@target\@|$(EXTRACT_CONTENT_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
677         chmod +x $(EXTRACT_CONTENT_WRAPPER)
680 EXTRACT_CONTENT_CSFLAGS = \
681         -target:exe
683 EXTRACT_CONTENT_CSFILES = \
684         $(srcdir)/ExtractContent.cs
686 EXTRACT_CONTENT_LOCAL_ASSEMBLIES = \
687         ../Util/Util.dll                        \
688         ../BeagleClient/Beagle.dll              \
689         ./$(PLUGIN_TARGET)                      \
690         ./$(DAEMON_DLL_TARGET)
692 EXTRACT_CONTENT_ASSEMBLIES = \
693         $(BEAGLED_LIBS)                         \
694         $(SHARPZIPLIB_LIBS)                     \
695         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
696         -r:Mono.Posix                           \
697         -r:System.Runtime.Remoting
699 $(EXTRACT_CONTENT_TARGET): $(EXTRACT_CONTENT_CSFILES) $(EXTRACT_CONTENT_LOCAL_ASSEMBLIES)
700         $(CSC) -out:$@ $(EXTRACT_CONTENT_CSFLAGS) $(EXTRACT_CONTENT_CSFILES) $(EXTRACT_CONTENT_ASSEMBLIES)
702 ############################################################
704 DUMP_INDEX_WRAPPER = beagle-dump-index
705 DUMP_INDEX_TARGET = DumpIndex.exe
707 $(DUMP_INDEX_WRAPPER): $(srcdir)/$(WRAPPER_IN)
708         $(WRAPPER_SED) -e "s|\@target\@|$(DUMP_INDEX_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
709         chmod +x $(DUMP_INDEX_WRAPPER)
711 DUMP_INDEX_CSFLAGS = \
712         -target:exe
714 DUMP_INDEX_CSFILES = \
715         $(srcdir)/DumpIndex.cs
717 DUMP_INDEX_LOCAL_ASSEMBLIES = \
718         ../Util/Util.dll                        \
719         ../BeagleClient/Beagle.dll              \
720         ./$(PLUGIN_TARGET)                      \
721         ./$(DAEMON_DLL_TARGET)
723 DUMP_INDEX_ASSEMBLIES = \
724         $(BEAGLED_LIBS)                         \
725         $(SHARPZIPLIB_LIBS)                     \
726         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
727         -r:Mono.Posix                           \
728         -r:System.Runtime.Remoting
730 $(DUMP_INDEX_TARGET): $(DUMP_INDEX_CSFILES) $(DUMP_INDEX_LOCAL_ASSEMBLIES)
731         $(CSC) -out:$@ $(DUMP_INDEX_CSFLAGS) $(DUMP_INDEX_CSFILES) $(DUMP_INDEX_ASSEMBLIES)
733 ############################################################
735 INDEX_WEB_CONTENT_WRAPPER = beagle-index-url
736 INDEX_WEB_CONTENT_TARGET = IndexWebContent.exe
738 $(INDEX_WEB_CONTENT_WRAPPER): $(srcdir)/$(WRAPPER_IN)
739         $(WRAPPER_SED) -e "s|\@target\@|$(INDEX_WEB_CONTENT_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
740         chmod +x $(INDEX_WEB_CONTENT_WRAPPER)
743 INDEX_WEB_CONTENT_CSFLAGS = \
744         -target:exe
746 INDEX_WEB_CONTENT_CSFILES = \
747         $(srcdir)/IndexWebContent.cs
749 INDEX_WEB_CONTENT_LOCAL_ASSEMBLIES = \
750         ../Util/Util.dll                        \
751         ../BeagleClient/Beagle.dll              \
752         ./$(PLUGIN_TARGET)                      \
753         ./$(DAEMON_DLL_TARGET)
755 INDEX_WEB_CONTENT_ASSEMBLIES =  \
756         $(INDEX_WEB_CONTENT_LOCAL_ASSEMBLIES:%=-r:%)
758 $(INDEX_WEB_CONTENT_TARGET): $(INDEX_WEB_CONTENT_CSFILES) $(INDEX_WEB_CONTENT_LOCAL_ASSEMBLIES)
759         $(CSC) -out:$@ $(INDEX_WEB_CONTENT_CSFLAGS) $(INDEX_WEB_CONTENT_CSFILES) $(INDEX_WEB_CONTENT_ASSEMBLIES)
761 ############################################################
763 MASTER_DELETE_WRAPPER = beagle-master-delete-button
764 MASTER_DELETE_TARGET = MasterDelete.exe
766 $(MASTER_DELETE_WRAPPER): $(srcdir)/$(WRAPPER_IN)
767         $(WRAPPER_SED) -e "s|\@target\@|$(MASTER_DELETE_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
768         chmod +x $(MASTER_DELETE_WRAPPER)
771 MASTER_DELETE_CSFLAGS = \
772         -target:exe
774 MASTER_DELETE_CSFILES = \
775         $(srcdir)/MasterDelete.cs
777 MASTER_DELETE_LOCAL_ASSEMBLIES = \
778         ../Util/Util.dll                        \
779         ../BeagleClient/Beagle.dll              \
780         ./$(PLUGIN_TARGET)                      \
781         ./$(DAEMON_DLL_TARGET)
783 MASTER_DELETE_ASSEMBLIES = \
784         $(BEAGLED_LIBS)                         \
785         $(SHARPZIPLIB_LIBS)                     \
786         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
787         -r:Mono.Posix                           \
788         -r:System.Runtime.Remoting
790 $(MASTER_DELETE_TARGET): $(MASTER_DELETE_CSFILES) $(MASTER_DELETE_LOCAL_ASSEMBLIES)
791         $(CSC) -out:$@ $(MASTER_DELETE_CSFLAGS) $(MASTER_DELETE_CSFILES) $(MASTER_DELETE_ASSEMBLIES)
793 ############################################################
795 SNIPPET_TEST_WRAPPER = beagle-snippet-test
796 SNIPPET_TEST_TARGET = SnippetTest.exe
798 $(SNIPPET_TEST_WRAPPER): $(srcdir)/$(WRAPPER_IN)
799         $(WRAPPER_SED) -e "s|\@target\@|$(SNIPPET_TEST_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
800         chmod +x $(SNIPPET_TEST_WRAPPER)
802 SNIPPET_TEST_CSFLAGS = \
803         -target:exe
805 SNIPPET_TEST_CSFILES = \
806         $(srcdir)/SnippetTest.cs
808 SNIPPET_TEST_LOCAL_ASSEMBLIES = \
809         ../Util/Util.dll                        \
810         ../BeagleClient/Beagle.dll              \
811         ./$(PLUGIN_TARGET)                      \
812         ./$(DAEMON_DLL_TARGET)
814 SNIPPET_TEST_ASSEMBLIES = \
815         $(BEAGLED_LIBS)                         \
816         $(SHARPZIPLIB_LIBS)                     \
817         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
818         -r:Mono.Posix                           \
819         -r:System.Runtime.Remoting
821 $(SNIPPET_TEST_TARGET): $(SNIPPET_TEST_CSFILES) $(SNIPPET_TEST_LOCAL_ASSEMBLIES)
822         $(CSC) -out:$@ $(SNIPPET_TEST_CSFLAGS) $(SNIPPET_TEST_CSFILES) $(SNIPPET_TEST_ASSEMBLIES)
824 ############################################################
826 TERM_STATS_WRAPPER = beagle-term-stats
827 TERM_STATS_TARGET = TermStatsTool.exe
829 $(TERM_STATS_WRAPPER): $(srcdir)/$(WRAPPER_IN)
830         $(WRAPPER_SED) -e "s|\@target\@|$(TERM_STATS_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
831         chmod +x $(TERM_STATS_WRAPPER)
833 TERM_STATS_CSFLAGS = \
834         -target:exe
836 TERM_STATS_CSFILES = \
837         $(srcdir)/TermStatsTool.cs
839 TERM_STATS_LOCAL_ASSEMBLIES =   \
840         ../Util/Util.dll                        \
841         ../BeagleClient/Beagle.dll              \
842         ./$(PLUGIN_TARGET)                      \
843         ./$(DAEMON_DLL_TARGET)
845 TERM_STATS_ASSEMBLIES = \
846         $(BEAGLED_LIBS)                         \
847         $(SHARPZIPLIB_LIBS)                     \
848         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
849         -r:Mono.Posix                           \
850         -r:System.Runtime.Remoting
852 $(TERM_STATS_TARGET): $(TERM_STATS_CSFILES) $(TERM_STATS_LOCAL_ASSEMBLIES)
853         $(CSC) -out:$@ $(TERM_STATS_CSFLAGS) $(TERM_STATS_CSFILES) $(TERM_STATS_ASSEMBLIES)
855 ############################################################
857 NAME_INDEX_WRAPPER = beagle-name-index
858 NAME_INDEX_TARGET = NameIndexTool.exe
860 $(NAME_INDEX_WRAPPER): $(srcdir)/$(WRAPPER_IN)
861         $(WRAPPER_SED) -e "s|\@target\@|$(NAME_INDEX_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
862         chmod +x $(NAME_INDEX_WRAPPER)
864 NAME_INDEX_CSFLAGS = \
865         -target:exe
867 NAME_INDEX_CSFILES = \
868         $(srcdir)/NameIndexTool.cs
870 NAME_INDEX_LOCAL_ASSEMBLIES =   \
871         ../Util/Util.dll                        \
872         ../BeagleClient/Beagle.dll              \
873         ./$(PLUGIN_TARGET)                      \
874         ./$(DAEMON_DLL_TARGET)
876 NAME_INDEX_ASSEMBLIES = \
877         $(BEAGLED_LIBS)                         \
878         $(SHARPZIPLIB_LIBS)                     \
879         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
880         -r:Mono.Posix                           \
881         -r:System.Runtime.Remoting
883 $(NAME_INDEX_TARGET): $(NAME_INDEX_CSFILES) $(NAME_INDEX_LOCAL_ASSEMBLIES)
884         $(CSC) -out:$@ $(NAME_INDEX_CSFLAGS) $(NAME_INDEX_CSFILES) $(NAME_INDEX_ASSEMBLIES)
886 ############################################################
888 FS_SANITY_CHECK_WRAPPER = beagle-file-system-sanity-check
889 FS_SANITY_CHECK_TARGET = SanityCheckTool.exe
891 $(FS_SANITY_CHECK_WRAPPER): $(srcdir)/$(WRAPPER_IN)
892         $(WRAPPER_SED) -e "s|\@target\@|$(FS_SANITY_CHECK_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
893         chmod +x $(FS_SANITY_CHECK_WRAPPER)
895 FS_SANITY_CHECK_CSFLAGS = \
896         -target:exe
898 FS_SANITY_CHECK_CSFILES = \
899         $(srcdir)/SanityCheckTool.cs
901 FS_SANITY_CHECK_LOCAL_ASSEMBLIES = \
902         ../Util/Util.dll                        \
903         ../BeagleClient/Beagle.dll              \
904         ./$(PLUGIN_TARGET)                      \
905         ./$(DAEMON_DLL_TARGET)
907 FS_SANITY_CHECK_ASSEMBLIES = \
908         $(BEAGLED_LIBS)                         \
909         $(SHARPZIPLIB_LIBS)                     \
910         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
911         -r:Mono.Posix                           \
912         -r:System.Runtime.Remoting
914 $(FS_SANITY_CHECK_TARGET): $(FS_SANITY_CHECK_CSFILES) $(FS_SANITY_CHECK_LOCAL_ASSEMBLIES)
915         $(CSC) -out:$@ $(FS_SANITY_CHECK_CSFLAGS) $(FS_SANITY_CHECK_CSFILES) $(FS_SANITY_CHECK_ASSEMBLIES)
917 ############################################################
919 BUILD_INDEX_WRAPPER = beagle-build-index
920 BUILD_INDEX_TARGET = BuildIndex.exe
922 $(BUILD_INDEX_WRAPPER): $(srcdir)/$(WRAPPER_IN)
923         $(WRAPPER_SED) -e "s|\@target\@|$(BUILD_INDEX_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
924         chmod +x $(BUILD_INDEX_WRAPPER)
926 BUILD_INDEX_CSFLAGS = \
927         -target:exe
929 BUILD_INDEX_CSFILES = \
930         $(srcdir)/BuildIndex.cs
932 BUILD_INDEX_LOCAL_ASSEMBLIES = \
933         ../Util/Util.dll                        \
934         ../BeagleClient/Beagle.dll              \
935         ./$(PLUGIN_TARGET)                      \
936         ./$(DAEMON_DLL_TARGET)
938 BUILD_INDEX_ASSEMBLIES = \
939         $(BEAGLED_LIBS)                         \
940         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
941         -r:Mono.Posix
943 $(BUILD_INDEX_TARGET): $(BUILD_INDEX_CSFILES) $(BUILD_INDEX_LOCAL_ASSEMBLIES)
944         $(CSC) -out:$@ $(BUILD_INDEX_CSFLAGS) $(BUILD_INDEX_CSFILES) $(BUILD_INDEX_ASSEMBLIES)
946 ############################################################
948 MANAGE_INDEX_WRAPPER = beagle-manage-index
949 MANAGE_INDEX_TARGET = ManageIndex.exe
951 $(MANAGE_INDEX_WRAPPER): $(srcdir)/$(WRAPPER_IN)
952         $(WRAPPER_SED) -e "s|\@target\@|$(MANAGE_INDEX_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
953         chmod +x $(MANAGE_INDEX_WRAPPER)
955 MANAGE_INDEX_CSFLAGS = \
956         -target:exe
958 MANAGE_INDEX_CSFILES = \
959         $(srcdir)/ManageIndex.cs
961 MANAGE_INDEX_LOCAL_ASSEMBLIES = \
962         ../Util/Util.dll                        \
963         ../BeagleClient/Beagle.dll              \
964         ./$(PLUGIN_TARGET)                      \
965         ./$(DAEMON_DLL_TARGET)
967 MANAGE_INDEX_ASSEMBLIES = \
968         $(BEAGLED_LIBS)                         \
969         $(DAEMON_LOCAL_ASSEMBLIES:%=-r:%)       \
970         -r:Mono.Posix
972 $(MANAGE_INDEX_TARGET): $(MANAGE_INDEX_CSFILES) $(MANAGE_INDEX_LOCAL_ASSEMBLIES)
973         $(CSC) -out:$@ $(MANAGE_INDEX_CSFLAGS) $(MANAGE_INDEX_CSFILES) $(MANAGE_INDEX_ASSEMBLIES)
975 ############################################################
977 CRAWL_SYSTEM_IN = beagle-crawl-system.in
978 CRAWL_SYSTEM = beagle-crawl-system
980 $(CRAWL_SYSTEM): $(srcdir)/$(CRAWL_SYSTEM_IN)
981         $(WRAPPER_SEB) -e "s|\@target\@|$(CRAWL_SYSTEM)|g" < $(srcdir)/$(CRAWL_SYSTEM_IN) > $@
982         chmod +x $(CRAWL_SYSTEM)
984 # OK, now back to our regularly scheduled program.  But notice all of the
985 # EXTRA_DIST and CLEANFILES stuff at the bottom of the file.  Yuck.
987 ############################################################
988 ############################################################
989 ############################################################
991 #       $(MASTER_DELETE_TARGET)
993 #       $(FS_SANITY_CHECK_TARGET)
995 ALL_TARGETS =                           \
996         $(PLUGIN_TARGET)                \
997         $(DAEMON_DLL_TARGET)            \
998         $(DAEMON_TARGET)                \
999         $(DAEMON_WRAPPER)               \
1000         $(INDEX_HELPER_TARGET)          \
1001         $(INDEX_HELPER_WRAPPER)         \
1002         $(INDEX_WEB_CONTENT_TARGET)     \
1003         $(INDEX_WEB_CONTENT_WRAPPER)    \
1004         $(EXTRACT_CONTENT_TARGET)       \
1005         $(EXTRACT_CONTENT_WRAPPER)      \
1006         $(DUMP_INDEX_TARGET)            \
1007         $(SNIPPET_TEST_TARGET)          \
1008         $(TERM_STATS_TARGET)            \
1009         $(NAME_INDEX_TARGET)            \
1010         $(MANAGE_INDEX_TARGET)          \
1011         $(MANAGE_INDEX_WRAPPER)         \
1012         $(BUILD_INDEX_TARGET)           \
1013         $(BUILD_INDEX_WRAPPER)
1015 if ENABLE_THUNDERBIRD
1016 ALL_TARGETS += $(THUNDERBIRD_TARGET)
1017 endif
1019 if ENABLE_WEBSERVICES
1020 ALL_TARGETS +=                          \
1021         $(XSP_TARGET)                   \
1022         $(WEBSERVICES_FRONTEND_TARGET)  \
1023         $(WEBSERVICES_BACKEND_TARGET)   
1024 endif
1026 if ENABLE_EVOLUTION
1027 ALL_TARGETS +=                          \
1028         $(EVO_DLL_TARGET)
1029 endif
1031 man_MANS =                              \
1032         beagled.1                       \
1033         beagle-build-index.8            \
1034         beagle-manage-index.8
1036 all: $(ALL_TARGETS)
1038 install-data-local: $(ALL_TARGETS)
1039         $(mkinstalldirs) $(DESTDIR)$(bindir)
1040         $(mkinstalldirs) $(DESTDIR)$(sbindir)
1041         $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
1042         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1043         $(mkinstalldirs) $(DESTDIR)$(BACKENDDIR)
1044 if ENABLE_WEBSERVICES
1045         $(mkinstalldirs) $(DESTDIR)$(XSP_DIR)
1046         $(mkinstalldirs) $(DESTDIR)$(XSPBIN_DIR)
1047 endif
1048 if ENABLE_EVOLUTION
1049         $(INSTALL_DATA) $(EVO_DLL_TARGET) $(EVO_DLL_TARGET).mdb $(DESTDIR)$(BACKENDDIR)
1050 endif
1051         @for i in $(BIN_WRAPPERS); do                                           \
1052                 sed -e "s|\#installed=1|installed=1|" < $$i > $$i.tmp;          \
1053                 echo "$(INSTALL_SCRIPT) $$i.tmp $(DESTDIR)$(bindir)/$$i";       \
1054                 $(INSTALL_SCRIPT) $$i.tmp $(DESTDIR)$(bindir)/$$i || exit 1;    \
1055                 rm -f $$i.tmp;                                                  \
1056         done
1058         @for i in $(SBIN_WRAPPERS); do                                          \
1059                 sed -e "s|\#installed=1|installed=1|" < $$i > $$i.tmp;          \
1060                 echo "$(INSTALL_SCRIPT) $$i.tmp $(DESTDIR)$(sbindir)/$$i";      \
1061                 $(INSTALL_SCRIPT) $$i.tmp $(DESTDIR)$(sbindir)/$$i || exit 1;   \
1062                 rm -f $$i.tmp;                                                  \
1063         done
1065         @sed -e "s|\#installed=1|installed=1|" < $(INDEX_HELPER_WRAPPER) > $(INDEX_HELPER_WRAPPER).tmp
1066         $(INSTALL_SCRIPT) $(INDEX_HELPER_WRAPPER).tmp $(DESTDIR)$(pkglibdir)/$(INDEX_HELPER_WRAPPER)
1067         @rm -f $(INDEX_HELPER_WRAPPER).tmp
1069         $(INSTALL_DATA) $(PLUGIN_TARGET)                 $(DESTDIR)$(pkglibdir)
1070         $(INSTALL_DATA) $(PLUGIN_TARGET).mdb             $(DESTDIR)$(pkglibdir)
1071         $(INSTALL_DATA) $(DAEMON_DLL_TARGET)             $(DESTDIR)$(pkglibdir)
1072         $(INSTALL_DATA) $(DAEMON_DLL_TARGET).mdb         $(DESTDIR)$(pkglibdir)
1073         $(INSTALL_DATA) $(DAEMON_TARGET)                 $(DESTDIR)$(pkglibdir)
1074         $(INSTALL_DATA) $(DAEMON_TARGET).mdb             $(DESTDIR)$(pkglibdir)
1075         $(INSTALL_DATA) $(EXTRACT_CONTENT_TARGET)        $(DESTDIR)$(pkglibdir)
1076         $(INSTALL_DATA) $(EXTRACT_CONTENT_TARGET).mdb    $(DESTDIR)$(pkglibdir)
1077         $(INSTALL_DATA) $(INDEX_WEB_CONTENT_TARGET)      $(DESTDIR)$(pkglibdir)
1078         $(INSTALL_DATA) $(INDEX_WEB_CONTENT_TARGET).mdb  $(DESTDIR)$(pkglibdir)
1079         $(INSTALL_DATA) $(INDEX_HELPER_TARGET)           $(DESTDIR)$(pkglibdir)
1080         $(INSTALL_DATA) $(INDEX_HELPER_TARGET).mdb       $(DESTDIR)$(pkglibdir)
1081         $(INSTALL_DATA) $(BUILD_INDEX_TARGET)            $(DESTDIR)$(pkglibdir)
1082         $(INSTALL_DATA) $(BUILD_INDEX_TARGET).mdb        $(DESTDIR)$(pkglibdir)
1083         $(INSTALL_DATA) $(MANAGE_INDEX_TARGET)           $(DESTDIR)$(pkglibdir)
1084         $(INSTALL_DATA) $(MANAGE_INDEX_TARGET).mdb       $(DESTDIR)$(pkglibdir)
1085 if ENABLE_WEBSERVICES
1086         $(INSTALL_DATA) $(WEBSERVICES_XSP_TARGET) $(DESTDIR)$(pkglibdir)
1087         $(INSTALL_DATA) $(WEBSERVICES_BACKEND_TARGET) $(DESTDIR)$(pkglibdir)
1088         $(INSTALL_DATA) $(WEBSERVICES_FRONTEND_TARGET) $(DESTDIR)$(XSPBIN_DIR)
1089         $(INSTALL_DATA) $(WEBSERVICES_BACKEND_TARGET) $(DESTDIR)$(XSPBIN_DIR)
1090         $(INSTALL_DATA)  $(WEBSERVICES_RESOURCES) $(DESTDIR)$(XSP_DIR)
1091 #       $(INSTALL_DATA) ../Util/Util.dll ../images/Images.dll ../BeagleClient/Beagle.dll ../Tiles/Tiles.dll BeagleDaemonPlugins.dll BeagleDaemonLib.dll $(DESTDIR)$(XSPBIN_DIR)
1093 endif
1094 if ENABLE_THUNDERBIRD
1095         $(INSTALL_DATA) $(THUNDERBIRD_TARGET)                 $(DESTDIR)$(BACKENDDIR)
1096         $(INSTALL_DATA) $(THUNDERBIRD_TARGET).mdb             $(DESTDIR)$(BACKENDDIR)
1097 endif
1099 uninstall-local:
1100 if ENABLE_WEBSERVICES
1101         rm -f $(DESTDIR)$(pkglibdir)/$(WEBSERVICES_BACKEND_TARGET)
1102         rm -f $(DESTDIR)$(pkglibdir)/$(WEBSERVICES_XSP_TARGET)
1103         rm -rf $(DESTDIR)$(XSP_DIR)
1104 endif
1105 if ENABLE_THUNDERBIRD
1106         rm -f $(DESTDIR)$(BACKENDDIR)/$(THUNDERBIRD_TARGET)
1107         rm -f $(DESTDIR)$(BACKENDDIR)/$(THUNDERBIRD_TARGET).mdb
1108 endif
1109 if ENABLE_EVOLUTION
1110         rm -f $(DESTDIR)$(BACKENDDIR)/$(EVO_DLL_TARGET)
1111         rm -f $(DESTDIR)$(BACKENDDIR)/$(EVO_DLL_TARGET).mdb
1112 endif
1114         @for i in $(BIN_WRAPPERS); do                           \
1115                 echo "rm -f $(DESTDIR)$(bindir)/$$i";           \
1116                 rm -f $(DESTDIR)$(bindir)/$$i || exit 1;        \
1117         done
1119         @for i in $(SBIN_WRAPPERS); do                          \
1120                 echo "rm -f $(DESTDIR)$(sbindir)/$$i";          \
1121                 rm -f $(DESTDIR)$(sbindir)/$$i || exit 1;       \
1122         done
1124         rm -f $(DESTDIR)$(pkglibdir)/$(PLUGIN_TARGET)
1125         rm -f $(DESTDIR)$(pkglibdir)/$(PLUGIN_TARGET).mdb
1126         rm -f $(DESTDIR)$(pkglibdir)/$(DAEMON_DLL_TARGET)
1127         rm -f $(DESTDIR)$(pkglibdir)/$(DAEMON_DLL_TARGET).mdb
1128         rm -f $(DESTDIR)$(pkglibdir)/$(DAEMON_TARGET)
1129         rm -f $(DESTDIR)$(pkglibdir)/$(DAEMON_TARGET).mdb
1130         rm -f $(DESTDIR)$(pkglibdir)/$(INDEX_HELPER_TARGET)
1131         rm -f $(DESTDIR)$(pkglibdir)/$(INDEX_HELPER_TARGET).mdb
1132         rm -f $(DESTDIR)$(pkglibdir)/$(INDEX_HELPER_WRAPPER)
1133         rm -f $(DESTDIR)$(pkglibdir)/$(INDEX_HELPER_WRAPPER).mdb
1134         rm -f $(DESTDIR)$(pkglibdir)/$(EXTRACT_CONTENT_TARGET)
1135         rm -f $(DESTDIR)$(pkglibdir)/$(EXTRACT_CONTENT_TARGET).mdb
1136         rm -f $(DESTDIR)$(pkglibdir)/$(INDEX_WEB_CONTENT_TARGET)
1137         rm -f $(DESTDIR)$(pkglibdir)/$(INDEX_WEB_CONTENT_TARGET).mdb
1138         rm -f $(DESTDIR)$(pkglibdir)/$(BUILD_INDEX_TARGET)
1139         rm -f $(DESTDIR)$(pkglibdir)/$(BUILD_INDEX_TARGET).mdb
1140         rm -f $(DESTDIR)$(pkglibdir)/$(MANAGE_INDEX_TARGET)
1141         rm -f $(DESTDIR)$(pkglibdir)/$(MANAGE_INDEX_TARGET).mdb
1143 BIN_WRAPPERS = \
1144         $(DAEMON_WRAPPER)               \
1145         $(EXTRACT_CONTENT_WRAPPER)      \
1146         $(INDEX_WEB_CONTENT_WRAPPER)
1148 SBIN_WRAPPERS = \
1149         $(BUILD_INDEX_WRAPPER)          \
1150         $(MANAGE_INDEX_WRAPPER)
1152 #       $(MASTER_DELETE_WRAPPER)
1153 #       $(FS_SANITY_CHECK_WRAPPER)
1155 noinst_SCRIPTS= \
1156         $(DUMP_INDEX_WRAPPER)           \
1157         $(SNIPPET_TEST_WRAPPER)         \
1158         $(TERM_STATS_WRAPPER)           \
1159         $(NAME_INDEX_WRAPPER)           
1161 EXTRA_DIST = \
1162         $(WRAPPER_IN)                           \
1163         $(DAEMON_WRAPPER_IN)                    \
1164         $(INDEX_HELPER_WRAPPER_IN)              \
1165         $(man_MANS)                             \
1166         $(PLUGIN_CSFILES)                       \
1167         $(DAEMON_DLL_CSFILES)                   \
1168         $(DAEMON_CSFILES)                       \
1169         $(EVO_DLL_CSFILES)                      \
1170         $(THUNDERBIRD_CSFILES)                  \
1171         $(EXTRACT_CONTENT_CSFILES)              \
1172         $(DUMP_INDEX_CSFILES)                   \
1173         $(INDEX_WEB_CONTENT_CSFILES)            \
1174         $(SNIPPET_TEST_CSFILES)                 \
1175         $(INDEX_HELPER_CSFILES)                 \
1176         $(MASTER_DELETE_CSFILES)                \
1177         $(TERM_STATS_CSFILES)                   \
1178         $(NAME_INDEX_CSFILES)                   \
1179         $(FS_SANITY_CHECK_CSFILES)              \
1180         $(MANAGE_INDEX_CSFILES)                 \
1181         $(BUILD_INDEX_CSFILES)                  \
1182         $(WEBSERVICES_XSP_CSFILES)              \
1183         $(WEBSERVICES_BACKEND_CSFILES)          \
1184         $(WEBSERVICES_FRONTEND_CSFILES)         \
1185         $(WEBSERVICES_RESOURCES_DIST)           \
1186         $(webservicesdir)/WebServiceProxy.cs    \
1187         $(webservicesdir)/NetBeagleHandler.cs   \
1188         $(webservicesdir)/NetBeagleQueryable.cs
1190 CLEANFILES = \
1191         $(PLUGIN_TARGET)                        \
1192         $(PLUGIN_TARGET).mdb                    \
1193         $(DAEMON_DLL_TARGET)                    \
1194         $(DAEMON_DLL_TARGET).mdb                \
1195         $(DAEMON_TARGET)                        \
1196         $(DAEMON_TARGET).mdb                    \
1197         $(DAEMON_WRAPPER)                       \
1198         $(EVO_DLL_TARGET)                       \
1199         $(EVO_DLL_TARGET).mdb                   \
1200         $(INDEX_HELPER_TARGET)                  \
1201         $(INDEX_HELPER_TARGET).mdb              \
1202         $(INDEX_HELPER_WRAPPER)                 \
1203         $(EXTRACT_CONTENT_TARGET)               \
1204         $(EXTRACT_CONTENT_TARGET).mdb           \
1205         $(EXTRACT_CONTENT_WRAPPER)              \
1206         $(DUMP_INDEX_TARGET)                    \
1207         $(DUMP_INDEX_TARGET).mdb                \
1208         $(DUMP_INDEX_WRAPPER)                   \
1209         $(INDEX_WEB_CONTENT_TARGET)             \
1210         $(INDEX_WEB_CONTENT_TARGET).mdb         \
1211         $(INDEX_WEB_CONTENT_WRAPPER)            \
1212         $(MASTER_DELETE_TARGET)                 \
1213         $(MASTER_DELETE_TARGET).mdb             \
1214         $(MASTER_DELETE_WRAPPER)                \
1215         $(SNIPPET_TEST_TARGET)                  \
1216         $(SNIPPET_TEST_TARGET).mdb              \
1217         $(SNIPPET_TEST_WRAPPER)                 \
1218         $(TERM_STATS_TARGET)                    \
1219         $(TERM_STATS_TARGET).mdb                \
1220         $(TERM_STATS_WRAPPER)                   \
1221         $(NAME_INDEX_TARGET)                    \
1222         $(NAME_INDEX_TARGET).mdb                \
1223         $(NAME_INDEX_WRAPPER)                   \
1224         $(FS_SANITY_CHECK_TARGET)               \
1225         $(FS_SANITY_CHECK_TARGET).mdb           \
1226         $(FS_SANITY_CHECK_WRAPPER)              \
1227         $(MANAGE_INDEX_TARGET)                  \
1228         $(MANAGE_INDEX_TARGET).mdb              \
1229         $(MANAGE_INDEX_WRAPPER)                 \
1230         $(BUILD_INDEX_TARGET)                   \
1231         $(BUILD_INDEX_TARGET).mdb               \
1232         $(BUILD_INDEX_WRAPPER)                  \
1233         $(WEBSERVICES_BACKEND_TARGET)           \
1234         $(WEBSERVICES_BACKEND_TARGET).mdb       \
1235         $(WEBSERVICES_FRONTEND_TARGET)          \
1236         $(WEBSERVICES_FRONTEND_TARGET).mdb      \
1237         $(WEBSERVICES_XSP_TARGET)               \
1238         $(WEBSERVICES_XSP_TARGET).mdb           \
1239         $(THUNDERBIRD_TARGET)                   \
1240         $(THUNDERBIRD_TARGET).mdb