AyushP123

xapian-letor/tests/Makefile.mk

Jul 3rd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.83 KB | None | 0 0
  1. ## Process this file with automake to produce Makefile.in
  2.  
  3. AUTOMAKE_OPTIONS = 1.12.2 serial-tests subdir-objects
  4.  
  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
  10.  
  11. AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/common -I$(top_srcdir)/include \
  12.  -I$(top_builddir)/include -I$(srcdir)/harness
  13. AM_CXXFLAGS = $(XAPIAN_CXXFLAGS)
  14.  
  15. CLEANFILES =
  16.  
  17. TESTS_ENVIRONMENT = ./runtest
  18.  
  19. .PHONY: up remove-cached-databases
  20.  
  21. up:
  22.     cd .. && $(MAKE)
  23.  
  24. if BUILD_BACKEND_REMOTE
  25. check-remote: check-remoteprog check-remotetcp
  26.  
  27. check-remoteprog: apitest$(EXEEXT)
  28.     $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remoteprog
  29.  
  30. check-remotetcp: apitest$(EXEEXT)
  31.     $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remotetcp
  32.  
  33. if BUILD_BACKEND_GLASS
  34. check-remoteprog-glass: apitest$(EXEEXT)
  35.     $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remoteprog_glass
  36. check-remotetcp-glass: apitest$(EXEEXT)
  37.     $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remotetcp_glass
  38. endif
  39.  
  40. endif
  41.  
  42. if BUILD_BACKEND_GLASS
  43. check-multi-glass: apitest$(EXEEXT)
  44.     $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b multi_glass
  45. check-glass: apitest$(EXEEXT)
  46.     $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b glass
  47. check-singlefile-glass: apitest$(EXEEXT)
  48.     $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b singlefile_glass
  49. endif
  50.  
  51. ## Test programs to be run
  52. TESTS = apitest$(EXEEXT)
  53.  
  54. ## Programs to build
  55. check_PROGRAMS = \
  56.     apitest
  57.  
  58. # Make sure runtest is up to date before running tests
  59. check_SCRIPTS = runtest
  60.  
  61. ## Sources:
  62.  
  63. noinst_HEADERS = apitest.h
  64.  
  65. collated_apitest_sources = \
  66.  api_generated.cc
  67.  
  68. apitest_SOURCES = apitest.cc $(collated_apitest_sources) \
  69.  api_all.h api_collated.h $(testharness_sources)
  70.  
  71. apitest_LDFLAGS = $(NO_INSTALL) $(XAPIAN_LDFLAGS)
  72. apitest_LDADD = ../libgetopt.la $(XAPIAN_LIBS) ../libxapianletor.la
  73.  
  74. BUILT_SOURCES =
  75.  
  76. if MAINTAINER_MODE
  77. BUILT_SOURCES += api_all.h api_collated.h $(collated_apitest_sources:.cc=.h) \
  78.  api_generated.cc
  79.  
  80. api_all.h api_collated.h $(collated_apitest_sources:.cc=.h): api_collated.stamp
  81. ## Recover from the removal of $@.  A full explanation of these rules is in the
  82. ## automake manual under the heading "Multiple Outputs".
  83.     @if test -f $@; then :; else \
  84.       trap 'rm -rf api_collated.lock api_collated.stamp' 1 2 13 15; \
  85.       if mkdir api_collated.lock 2>/dev/null; then \
  86.         rm -f api_collated.stamp; \
  87.         $(MAKE) $(AM_MAKEFLAGS) api_collated.stamp; \
  88.         rmdir api_collated.lock; \
  89.       else \
  90.         while test -d api_collated.lock; do sleep 1; done; \
  91.         test -f api_collated.stamp; exit $$?; \
  92.       fi; \
  93.     fi
  94. api_collated.stamp: $(collated_apitest_sources) collate-test Makefile.am
  95.     $(PERL) "$(srcdir)/collate-test" "$(srcdir)" api_collated.h api_all.h $(collated_apitest_sources)
  96.     touch $@
  97.  
  98. api_generated.cc: generate-api_generated
  99.     $(PERL) "$(srcdir)/generate-api_generated" > api_generated.ccT
  100.     mv api_generated.ccT api_generated.cc
  101. endif
  102.  
  103. EXTRA_DIST = collate-test generate-api_generated api_all.h api_collated.h \
  104.     $(collated_apitest_sources:.cc=.h)
  105.  
  106. ## Distribute test data:
  107. EXTRA_DIST +=\
  108.     runtest.in \
  109.     valgrind.supp \
  110.     testdata/apitest_rset.txt \
  111.     testdata/apitest_phrase.txt \
  112.     testdata/apitest_allterms4.txt
  113.  
  114. remove-cached-databases:
  115.     rm -rf .letor-db
  116.  
  117. clean-local: remove-cached-databases
  118.  
  119. # Remove the cached databases before "make check" to avoid issues with missing
  120. # bugs in database creation when we reuse databases from a previous test run.
  121. check: remove-cached-databases
  122.  
  123. include harness/Makefile.mk
  124.  
  125. EXTRA_DIST += zlib-vg.c
  126. if USE_ZLIB_VG
  127. check_SCRIPTS += zlib-vg.so
  128. CLEANFILES += zlib-vg.so
  129.  
  130. zlib-vg.so: zlib-vg.c
  131.     $(CC) -fPIC -shared -o zlib-vg.so $(srcdir)/zlib-vg.c -ldl
  132. endif
  133.  
  134. .PHONY: check-syntax
  135.  
  136. check-syntax:
  137.     $(CXXCOMPILE) -fsyntax-only -gstabs+ $(CHK_SOURCES)
Add Comment
Please, Sign In to add comment