Make TradWeight a simple subclass and deprecate
[xapian.git] / xapian-letor / Makefile.am
blob9e9cf83f72af4dc83cfecea9d3f860cbe3ff0ecd
1 ## Process this file with automake to produce Makefile.in
3 AUTOMAKE_OPTIONS = subdir-objects
5 if MAINTAINER_MODE
6 # Export these so that we run the locally installed autotools when building
7 # from a bootstrapped git tree.
8 export ACLOCAL AUTOCONF AUTOHEADER AUTOM4TE AUTOMAKE
9 endif
11 AM_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/include
12 if VPATH_BUILD
13 # Needed for the generated files
14 # include/xapian-letor/letor_{error,errordispatch}.h
15 AM_CPPFLAGS += -I'$(top_builddir)/include'
16 endif
18 AM_CXXFLAGS += $(WERROR)
20 AM_CXXFLAGS += $(XAPIAN_CXXFLAGS)
22 # Order is relevant: when building, tests must be after ".".
23 SUBDIRS = . docs tests
25 noinst_HEADERS =
26 BUILT_SOURCES =
27 noinst_LTLIBRARIES =
28 CLEANFILES =
29 DISTCLEANFILES =
30 MAINTAINERCLEANFILES =
31 bin_PROGRAMS =
32 EXTRA_PROGRAMS =
34 .PHONY: coverage-reconfigure coverage-reconfigure-maintainer-mode coverage-check
36 # This relies on GNU make (for the pattern rule) but it's just a convenience
37 # as you can run these check-* targets with any make using:
39 #   cd tests ; make check-FOO
41 # So the pain of maintaining a huge list of target forwarding rules here isn't
42 # worth it.
44 # Note: We use @PERCENT@ here instead of a literal % to suppress an automake
45 # portability warning.
46 check-@PERCENT@:
47         cd tests && $(MAKE) $(AM_MAKEFLAGS) $@
49 ## -O0 - optimisation can result in confusing coverage reports.
50 ## --coverage - inserts code to generate coverage data
51 ## VALGRIND= - generating coverage data is slow enough by itself.
52 COVERAGE_CONFIGURE = \
53     $(srcdir)/configure CXXFLAGS='-O0 --coverage' VALGRIND= \
54         $(COVERAGE_CONFIGURE_ARGS)
56 coverage-reconfigure: distclean
57         $(COVERAGE_CONFIGURE)
59 coverage-reconfigure-maintainer-mode: distclean
60         $(COVERAGE_CONFIGURE) --enable-maintainer-mode
62 coverage-check:
63         ## GNU find specific.
64         find . -name '*.gcda' -delete
65         ## Don't run under valgrind even if configure was run by hand.
66         $(MAKE) $(AM_MAKEFLAGS) check VALGRIND=
67         rm -f xapian-letor.lcov
68         lcov --capture -d . --quiet --rc 'lcov_branch_coverage=1' --no-external -o xapian-letor.lcov
69         rm -rf lcov
70         genhtml --demangle-cpp --branch-coverage $(GENHTML_ARGS) -q -p '$(abs_builddir)' -t "Test Coverage for xapian-letor `git log -n1 --abbrev-commit --format=%h`" -o lcov xapian-letor.lcov
72 # We want to clean out build tree paths from the copy of xapianletor-config we
73 # install, mostly in the interests of facilitating reproducible builds.
74 bin_SCRIPTS = installable/xapianletor-config
76 # Create the installable version in a subdirectory.  It's not made executable
77 # until install time, which hopefully should avoid people trying to use it when
78 # building against an uninstalled xapian-letor.
79 installable/xapianletor-config: xapianletor-config
80         $(MKDIR_P) installable
81         $(SED) '/##UNINSTONLYBEGIN/,/##UNINSTONLYEND/d' xapianletor-config > installable/xapianletor-config.tmp
82         mv installable/xapianletor-config.tmp installable/xapianletor-config
84 CLEANFILES += installable/xapianletor-config
86 noinst_SCRIPTS = xapianletor-config
88 DISTCLEANFILES += xapianletor-config
90 EXTRA_DIST = ChangeLog include/xapian-letor/letor_error.h \
91  include/xapian-letor/letor_errordispatch.h generate-exceptions exception_data.pm
93 cmakedir = $(libdir)/cmake/xapian-letor
94 cmake_DATA = cmake/xapianletor-config.cmake cmake/xapianletor-config-version.cmake
96 # Install the m4 file containing the XO_LIB_XAPIANLETOR autoconf macro.
97 m4datadir = $(datadir)/aclocal
98 dist_m4data_DATA = m4-macros/xapianletor.m4
100 lib_LTLIBRARIES = libxapianletor.la
101 libxapianletor_la_SOURCES = $(lib_src)
102 libxapianletor_la_LDFLAGS = \
103         $(XAPIANLETOR_LDFLAGS) $(NO_UNDEFINED) -version-info $(LIBRARY_VERSION_INFO)
105 libxapianletor_la_LIBADD = $(XAPIAN_LIBS) libcommon_str.la
107 lib_src =
109 if !MAINTAINER_NO_DOCS
110 dist_man_MANS =
111 endif
113 include api/Makefile.mk
114 include bin/Makefile.mk
115 include include/Makefile.mk
116 include feature/Makefile.mk
117 include ranker/Makefile.mk
118 include scorer/Makefile.mk
120 noinst_LTLIBRARIES += libcommon_str.la libgetopt.la
121 libcommon_str_la_SOURCES = common/str.cc
122 libgetopt_la_SOURCES = common/getopt.cc
124 xapianletorinclude_HEADERS += include/xapian-letor/letor_error.h
126 if MAINTAINER_MODE
127 BUILT_SOURCES += include/xapian-letor/letor_error.h include/xapian-letor/letor_errordispatch.h
129 include/xapian-letor/letor_error.h include/xapian-letor/letor_errordispatch.h: generate-exceptions exception_data.pm
130         $(PERL) -w -I"$(srcdir)" "$(srcdir)/generate-exceptions"
131 endif
133 MAINTAINERCLEANFILES += $(BUILT_SOURCES)
135 noinst_HEADERS +=\
136         common/alignment_cast.h\
137         common/append_filename_arg.h\
138         common/debuglog.h\
139         common/errno_to_string.h\
140         common/filetests.h\
141         common/fileutils.h\
142         common/gnu_getopt.h\
143         common/negate_unsigned.h\
144         common/omassert.h\
145         common/output.h\
146         common/overflow.h\
147         common/parseint.h\
148         common/realtime.h\
149         common/safedirent.h\
150         common/safefcntl.h\
151         common/safesysexits.h\
152         common/safesyssocket.h\
153         common/safesysstat.h\
154         common/safeunistd.h\
155         common/safewindows.h\
156         common/str.h\
157         common/stringutils.h\
158         common/wordaccess.h
160 DISTCHECK_CONFIGURE_FLAGS = "XAPIAN_CONFIG=$(XAPIAN_CONFIG)"