1 ## Process this file with automake to produce Makefile.in
3 include ../generic/generic.mk
5 ## Test programs to be run
7 LOG_COMPILER = $(OSX_SIP_HACK_ENV) $(RUN_CSHARP)
12 generated-csharp/BB2Weight.cs \
13 generated-csharp/BM25PlusWeight.cs\
14 generated-csharp/BM25Weight.cs \
15 generated-csharp/BoolWeight.cs \
16 generated-csharp/Compactor.cs \
17 generated-csharp/CoordWeight.cs \
18 generated-csharp/Database.cs \
19 generated-csharp/DateRangeProcessor.cs \
20 generated-csharp/DateValueRangeProcessor.cs \
21 generated-csharp/DecreasingValueWeightPostingSource.cs \
22 generated-csharp/DLHWeight.cs \
23 generated-csharp/DPHWeight.cs \
24 generated-csharp/Document.cs \
25 generated-csharp/ESet.cs \
26 generated-csharp/ESetIterator.cs \
27 generated-csharp/Enquire.cs \
28 generated-csharp/ExpandDecider.cs \
29 generated-csharp/ExpandDeciderAnd.cs \
30 generated-csharp/ExpandDeciderFilterPrefix.cs \
31 generated-csharp/FieldProcessor.cs \
32 generated-csharp/FixedWeightPostingSource.cs \
33 generated-csharp/GreatCircleMetric.cs \
34 generated-csharp/IfB2Weight.cs \
35 generated-csharp/IneB2Weight.cs \
36 generated-csharp/InL2Weight.cs \
37 generated-csharp/KeyMaker.cs \
38 generated-csharp/LMWeight.cs \
39 generated-csharp/LatLongCoord.cs \
40 generated-csharp/LatLongCoords.cs \
41 generated-csharp/LatLongCoordsIterator.cs \
42 generated-csharp/LatLongDistanceKeyMaker.cs \
43 generated-csharp/LatLongDistancePostingSource.cs \
44 generated-csharp/LatLongMetric.cs \
45 generated-csharp/MatchDecider.cs \
46 generated-csharp/MatchSpy.cs \
47 generated-csharp/MSet.cs \
48 generated-csharp/MSetIterator.cs \
49 generated-csharp/MultiValueKeyMaker.cs \
50 generated-csharp/NumberRangeProcessor.cs \
51 generated-csharp/NumberValueRangeProcessor.cs \
52 generated-csharp/PL2PlusWeight.cs \
53 generated-csharp/PL2Weight.cs \
54 generated-csharp/PositionIterator.cs \
55 generated-csharp/PostingIterator.cs \
56 generated-csharp/PostingSource.cs \
57 generated-csharp/Query.cs \
58 generated-csharp/QueryParser.cs \
59 generated-csharp/Remote.cs \
60 generated-csharp/RSet.cs \
61 generated-csharp/SWIGTYPE_p_std__string.cs \
62 generated-csharp/RangeProcessor.cs \
63 generated-csharp/Registry.cs \
64 generated-csharp/SimpleStopper.cs \
65 generated-csharp/Stem.cs \
66 generated-csharp/StemImplementation.cs \
67 generated-csharp/Stopper.cs \
68 generated-csharp/StringValueRangeProcessor.cs \
69 generated-csharp/TermGenerator.cs \
70 generated-csharp/TermIterator.cs \
71 generated-csharp/TfIdfWeight.cs \
72 generated-csharp/TradWeight.cs \
73 generated-csharp/UnitRangeProcessor.cs \
74 generated-csharp/ValueCountMatchSpy.cs \
75 generated-csharp/ValueIterator.cs \
76 generated-csharp/ValueMapPostingSource.cs \
77 generated-csharp/ValuePostingSource.cs \
78 generated-csharp/ValueRangeProcessor.cs \
79 generated-csharp/ValueSetMatchDecider.cs \
80 generated-csharp/ValueWeightPostingSource.cs \
81 generated-csharp/Version.cs \
82 generated-csharp/Weight.cs \
83 generated-csharp/WritableDatabase.cs \
84 generated-csharp/Xapian.cs \
85 generated-csharp/XapianPINVOKE.cs
90 $(ASSEMBLY).dll: $(XAPIAN_SWIG_CS_SRCS) AssemblyInfo.cs XapianSharp.snk
91 ## We specify both -keyfile and -keycontainer - hopefully this means that if
92 ## this is the first time we're signing, the key in the file is used and
93 ## then stored in the key container. From then on, the key in the container
95 $(CSC) -unsafe -target:library -out:$(ASSEMBLY).dll \
96 -keyfile:XapianSharp.snk -keycontainer:"Xapian Signing Key" \
97 `for f in $(XAPIAN_SWIG_CS_SRCS); do if test -f "$$f"; then echo $$f; else echo $(srcdir)/$$f ; fi ; done` \
100 SWIG_GENERATED = xapian_wrap.cc xapian_wrap.h $(XAPIAN_SWIG_CS_SRCS)
102 BUILT_SOURCES = $(SWIG_GENERATED)
104 EXTRA_DIST = csharp.i SmokeTest.cs docs/index.rst $(SWIG_GENERATED)
106 lib_LTLIBRARIES = _XapianSharp.la
108 # Remove the .la file - _XapianSharp.la is never linked against (it's a module)
109 # and C# doesn't use libltdl. Note that the library gets installed by
110 # install-data, so that's where we need to hook.
112 rm -f $(DESTDIR)$(libdir)/_XapianSharp.la
114 # Because we don't install the .la file, "make uninstall" doesn't work and
115 # we need to remove the file ourselves.
117 eval `grep '^dlname=' $(lib_LTLIBRARIES)` ; \
118 rm -f $(DESTDIR)$(libdir)/"$$dlname"
119 $(GACUTIL) /u $(ASSEMBLY) /f $(GACUTIL_FLAGS)
121 AM_CXXFLAGS = @SWIG_CXXFLAGS@ $(XAPIAN_CXXFLAGS)
122 _XapianSharp_la_LDFLAGS = -avoid-version -module $(NO_UNDEFINED)
123 _XapianSharp_la_SOURCES = xapian_wrap.cc
124 _XapianSharp_la_LIBADD = $(XAPIAN_LIBS)
126 install-data-local: $(ASSEMBLY).dll
127 $(GACUTIL) /i $(ASSEMBLY).dll /f $(GACUTIL_FLAGS)
129 SmokeTest.exe: SmokeTest.cs $(ASSEMBLY).dll
130 $(CSC) -unsafe -target:exe -out:SmokeTest.exe `test -f SmokeTest.cs||echo '$(srcdir)/'`SmokeTest.cs -r:$(ASSEMBLY).dll
132 all-am: $(ASSEMBLY).dll
134 CLEANFILES = XapianSharp.snk $(ASSEMBLY).dll SmokeTest.exe
137 stamp = xapian_wrap.stamp
138 RUN_SWIG = stamp='$(stamp)' $(PERL) '$(top_srcdir)'/swig-depcomp $(SWIG)
140 xapian_wrap.cc xapian_wrap.h $(XAPIAN_SWIG_CS_SRCS): $(stamp)
144 : # Make sure that we don't package stale generated sources in the
145 : # case where SWIG changes its mind as to which files it generates.
146 -rm -f generated-csharp/*
147 $(MKDIR_P) generated-csharp
148 $(RUN_SWIG) $(SWIG_WERROR) -I'$(srcdir)' $(SWIG_FLAGS) -c++ \
149 -csharp -namespace Xapian -module Xapian -dllimport _XapianSharp \
150 -o xapian_wrap.cc -outdir generated-csharp '$(srcdir)/'csharp.i
151 : # Check that exactly the sources we expected were generated.
152 $(PERL) -e 'print "$$_\n" for sort @ARGV' generated-csharp/*.cs > generated-csharp/list
153 $(PERL) -e 'print "$$_\n" for sort @ARGV' $(XAPIAN_SWIG_CS_SRCS)|diff -c - generated-csharp/list
156 -include xapian_wrap.d
158 CLEANFILES += $(stamp)
160 MAINTAINERCLEANFILES = $(BUILT_SOURCES)
162 maintainer-clean-local:
163 rm -rf generated-csharp
165 exampledatadir = $(docdir)/csharp/examples
166 dist_exampledata_DATA =\
167 docs/examples/SimpleSearch.cs\
168 docs/examples/SimpleIndex.cs\
169 docs/examples/SimpleExpand.cs
171 docdatadir = $(docdir)/csharp
172 dist_docdata_DATA = docs/index.html
174 if DOCUMENTATION_RULES
175 BUILT_SOURCES += docs/index.html
178 -case "$@" in */*) d=`echo "$@"|sed 's,/[^/]*$$,,'`; $(MKDIR_P) "$$d" ;; esac
179 $(RST2HTML) --exit-status=warning $< $@