Add --enable-deletion option to buildindex. If used, buildindex will remove deleted...
[beagle.git] / Util / Makefile.am
blob4e63a1b5253aae4e9c680b31619d52d4dae3bc4f
1 # Warnings we don't want to see
2 # 0169 = The private field is never used
4 CSC = mcs -debug -nowarn:0169
5 CSFLAGS = -target:library
7 UTIL_TARGET = Util.dll
8 UTIL_TARGET_CONFIG = $(UTIL_TARGET).config
10 UI_UTIL_TARGET = UiUtil.dll
11 UI_UTIL_TARGET_CONFIG = $(UI_UTIL_TARGET).config
13 if OS_LINUX
14 CSFLAGS += -define:OS_LINUX
15 endif
17 if OS_FREEBSD
18 CSFLAGS += -define:OS_FREEBSD
19 endif
21 if ENABLE_WEBSERVICES
22 CSFLAGS += -define:ENABLE_WEBSERVICES
23 endif
25 EXTSTR = ExternalStringsHack.cs
26 EXTSTR_IN = $(srcdir)/$(EXTSTR).in
27 $(EXTSTR): $(EXTSTR_IN)
28         sed     -e "s|\@prefix\@|$(prefix)|g"                   \
29                 -e "s|\@sysconfdir\@|$(sysconfdir)|g"           \
30                 -e "s|\@pkglibdir\@|$(pkglibdir)|g"             \
31                 -e "s|\@pkgdatadir\@|$(pkgdatadir)|g"           \
32                 -e "s|\@localstatedir\@|$(localstatedir)|g"     \
33                 -e "s|\@VERSION\@|$(VERSION)|g"                 \
34                 -e "s|\@GNOME_PREFIX\@|$(GNOME_PREFIX)|g"       \
35                 -e "s|\@KDE_PREFIX\@|$(KDE_PREFIX)|g"           \
36                 -e "s|\@SQLITE_MAJ_VER\@|$(SQLITE_MAJ_VER)|g"   \
37                 < $(EXTSTR_IN) > $@
39 UTIL_CSFILES =                                  \
40         $(srcdir)/ArrayFu.cs                    \
41         $(srcdir)/BetterBitArray.cs             \
42         $(srcdir)/EndianConverter.cs            \
43         $(srcdir)/camel.cs                      \
44         $(srcdir)/CommandLineFu.cs              \
45         $(srcdir)/Conf.cs                       \
46         $(srcdir)/DelayedTextWriter.cs          \
47         $(srcdir)/DigikamTags.cs                \
48         $(srcdir)/DirectoryWalker.cs            \
49         $(srcdir)/Evolution.cs                  \
50         $(srcdir)/ExceptionHandlingThread.cs    \
51         $(srcdir)/ExifData.cs                   \
52         $(srcdir)/ExtendedAttribute.cs          \
53         $(srcdir)/FileAdvise.cs                 \
54         $(srcdir)/FileSystem.cs                 \
55         $(srcdir)/FrequencyStatistics.cs        \
56         $(srcdir)/FSpotTools.cs                 \
57         $(srcdir)/GuidFu.cs                     \
58         $(srcdir)/ImBuddy.cs                    \
59         $(srcdir)/ImLog.cs                      \
60         $(srcdir)/Inotify.cs                    \
61         $(srcdir)/IoPriority.cs                 \
62         $(srcdir)/JpegHeader.cs                 \
63         $(srcdir)/KdeUtils.cs                   \
64         $(srcdir)/KonqHistoryUtil.cs            \
65         $(srcdir)/Log.cs                        \
66         $(srcdir)/Logger.cs                     \
67         $(srcdir)/MetadataStore.cs              \
68         $(srcdir)/Mozilla.cs                    \
69         $(srcdir)/MultiReader.cs                \
70         $(srcdir)/NautilusTools.cs              \
71         $(srcdir)/Note.cs                       \
72         $(srcdir)/PathFinder.cs                 \
73         $(srcdir)/PngHeader.cs                  \
74         $(srcdir)/PullingReader.cs              \
75         $(srcdir)/ReflectionFu.cs               \
76         $(srcdir)/SafeProcess.cs                \
77         $(srcdir)/Scheduler.cs                  \
78         $(srcdir)/SmallIntArray.cs              \
79         $(srcdir)/Stopwatch.cs                  \
80         $(srcdir)/StringFu.cs                   \
81         $(srcdir)/StringMatcher.cs              \
82         $(srcdir)/SystemInformation.cs          \
83         $(srcdir)/TeeTextWriter.cs              \
84         $(srcdir)/ThreadPond.cs                 \
85         $(srcdir)/Tiff.cs                       \
86         $(srcdir)/Timeline.cs                   \
87         $(srcdir)/TopScores.cs                  \
88         $(srcdir)/UnclosableStream.cs           \
89         $(srcdir)/UriFu.cs                      \
90         $(srcdir)/XdgMime.cs                    \
91         $(srcdir)/XmlFu.cs                      \
92         $(srcdir)/XmpFile.cs                    \
93         $(srcdir)/SemWeb/ForwardLogic.cs                \
94         $(srcdir)/SemWeb/KnowledgeModel.cs              \
95         $(srcdir)/SemWeb/MemoryStore.cs         \
96         $(srcdir)/SemWeb/N3Parser.cs                    \
97         $(srcdir)/SemWeb/N3Writer.cs                    \
98         $(srcdir)/SemWeb/NamespaceManager.cs            \
99         $(srcdir)/SemWeb/Query.cs                       \
100         $(srcdir)/SemWeb/RdfParser.cs                   \
101         $(srcdir)/SemWeb/RdfWriter.cs                   \
102         $(srcdir)/SemWeb/Reasoning.cs                   \
103         $(srcdir)/SemWeb/Resource.cs                    \
104         $(srcdir)/SemWeb/RSquary.cs                     \
105         $(srcdir)/SemWeb/RSquaryFilters.cs              \
106         $(srcdir)/SemWeb/Sparql.cs                      \
107         $(srcdir)/SemWeb/SQLStore.cs                    \
108         $(srcdir)/SemWeb/Statement.cs                   \
109         $(srcdir)/SemWeb/Store.cs                       \
110         $(srcdir)/SemWeb/UriMap.cs                      \
111         $(srcdir)/SemWeb/Util.cs                        \
112         $(srcdir)/SemWeb/XmlParser.cs                   \
113         $(srcdir)/SemWeb/XmlWriter.cs                   \
114         $(srcdir)/SemWeb/XPathSemWebNavigator.cs        \
115         $(srcdir)/PropertyKeywordAttribute.cs
118 if HAS_LIBCHM 
119 UTIL_CSFILES +=                                 \
120         $(srcdir)/ChmFile.cs
121 endif
123 UTIL_ASSEMBLIES =                               \
124         $(BEAGLED_LIBS)                         \
125         -r:System.Web.Services                  \
126         -r:System.Data                          \
127         -r:Mono.Data.SqliteClient               \
128         -r:Mono.Posix                           \
129         -r:System.Web                           \
130         -r:ICSharpCode.SharpZipLib
132 if ENABLE_GALAGO
133 UTIL_CSFILES +=                                 \
134         $(srcdir)/Galago.cs
136 UTIL_ASSEMBLIES +=                              \
137         $(GALAGO_LIBS)
138 endif
140 if ENABLE_INOTIFY
141 INOTIFY_EXE = Inotify.exe
142 CSFLAGS += -define:ENABLE_INOTIFY
143 else
144 INOTIFY_EXE =
145 endif
147 UTIL_TARGET_FILES = $(UTIL_CSFILES) $(EXTSTR)
149 if ENABLE_GOOGLEDRIVER
150 GOOGLE_WSDL = $(srcdir)/GoogleSearch.wsdl
151 GOOGLE_CS   = GoogleSearch.cs
153 $(GOOGLE_CS): $(GOOGLE_WSDL)
154         wsdl -namespace:Beagle.Util -out:$@ $^
156 UTIL_TARGET_FILES +=                            \
157         $(GOOGLE_CS)
158 endif
160 $(UTIL_TARGET): $(UTIL_TARGET_FILES)
161         $(CSC) -unsafe -out:$@ $(CSFLAGS) $^ $(UTIL_ASSEMBLIES)
163 UI_UTIL_CSFILES =                               \
164         $(srcdir)/CompatFileChooser.cs          \
165         $(srcdir)/GnomeFu.cs                    \
166         $(srcdir)/GtkUtils.cs                   \
167         $(srcdir)/HigMessageDialog.cs           \
168         $(srcdir)/XKeybinder.cs
170 UI_UTIL_ASSEMBLIES =                            \
171         $(BEAGLE_UI_LIBS)                       \
172         -r:Util.dll
174 $(UI_UTIL_TARGET): $(UI_UTIL_CSFILES) $(UTIL_TARGET)
175         $(CSC) -unsafe -out:$@ $(CSFLAGS) $(UI_UTIL_CSFILES) $(UI_UTIL_ASSEMBLIES)
177 INOTIFY_TEST_CSFILES =                          \
178         $(srcdir)/Inotify.cs                    \
179         $(srcdir)/Log.cs                        \
180         $(srcdir)/Logger.cs                     \
181         $(srcdir)/DelayedTextWriter.cs          \
182         $(srcdir)/TeeTextWriter.cs              \
183         $(srcdir)/DirectoryWalker.cs            \
184         $(srcdir)/FileSystem.cs                 \
185         $(srcdir)/ExceptionHandlingThread.cs
187 Inotify.exe: $(INOTIFY_TEST_CSFILES)
188         $(CSC) -unsafe -out:$@ $^ -r:Mono.Posix -define:INOTIFY_TEST -define:ENABLE_INOTIFY
190 ALL_TARGETS =                   \
191         $(UTIL_TARGET)          \
192         $(INOTIFY_EXE)
194 if ENABLE_GUI
195 ALL_TARGETS += $(UI_UTIL_TARGET)
196 endif
198 all: $(ALL_TARGETS)
200 install-data-local: $(ALL_TARGETS)
201         $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
202         $(INSTALL_DATA) $(UTIL_TARGET) $(UTIL_TARGET).mdb $(UTIL_TARGET_CONFIG) $(DESTDIR)$(pkglibdir)
203 if ENABLE_GUI
204         $(INSTALL_DATA) $(UI_UTIL_TARGET) $(UI_UTIL_TARGET).mdb $(srcdir)/$(UI_UTIL_TARGET_CONFIG) $(DESTDIR)$(pkglibdir)
205 endif
207 uninstall-local:
208         rm -f $(DESTDIR)$(pkglibdir)/$(UTIL_TARGET) $(DESTDIR)$(pkglibdir)/$(UTIL_TARGET).mdb $(DESTDIR)$(pkglibdir)/$(UTIL_TARGET_CONFIG)
209         rm -f $(DESTDIR)$(pkglibdir)/$(UI_UTIL_TARGET) $(DESTDIR)$(pkglibdir)/$(UI_UTIL_TARGET).mdb $(DESTDIR)$(pkglibdir)/$(UI_UTIL_TARGET_CONFIG)
212 COND_CS_FILES =                 \
213         $(srcdir)/ChmFile.cs    \
214         $(srcdir)/Galago.cs
216 EXTRA_DIST =                    \
217         $(EXTSTR_IN)            \
218         $(UTIL_CSFILES)         \
219         $(UI_UTIL_CSFILES)      \
220         $(COND_CS_FILES)        \
221         UiUtil.dll.config       \
222         Util.dll.config.in      \
223         inotify-test
225 CLEANFILES =                    \
226         $(EXTSTR)               \
227         $(UTIL_TARGET)          \
228         $(UTIL_TARGET).mdb      \
229         $(UI_UTIL_TARGET)       \
230         $(UI_UTIL_TARGET).mdb   \
231         Inotify.exe             \
232         Inotify.exe.mdb
234 if ENABLE_GOOGLEDRIVER
235 EXTRA_DIST +=                   \
236         $(GOOGLE_WSDL)
238 CLEANFILES +=                   \
239         $(GOOGLE_CS)
240 endif