;############################ -*- Mode: Makefile -*- ###########################
;## $Basename: Jmakefile $
;## $Revision: 1.10 $
;## Author : Ulrich Pfeifer
;## Created On : Fri Feb 25 13:30:41 1994
;## Last Modified By: Ulrich Pfeifer
;## Last Modified On: Wed May 7 16:35:33 1997
;## Language : Makefile
;## Update Count : 142
;## Status : Unknown, Use with caution!
;##
;## (C) Copyright 1997, Ulrich Pfeifer, all rights reserved.
;##
;###############################################################################
Initialize(WAISSEARCH_ARGS,$waissearch_args)
Initialize(PTEST,$proximitytest)
Initialize(STEST,$stringtest)
DIFF = cmp
WAISINDEX = ../indexer/waisindex
WAISQ = ../ui/waisq
WAISSEARCH = ../ui/waissearch
SWAIS = ../ui/swais
SRCG = TEST TEST.german
SRC = TEST
RESFILES = \
test.cat \
test.doc \
test.doc \
test.fn \
test.hl \
test.inv \
test.src \
test.dct \
test_field_au.inv \
test_field_ck.inv \
test_field_jt.inv \
test_field_names.inv \
test_field_py.inv \
test_field_ti.inv \
test_field_au.dct \
test_field_ck.dct \
test_field_py.dct \
test_field_ti.dct \
test_field_jt.dct \
test_field_ed.dct \
test_field_ed.inv \
testg_field_ed.dct \
testg_field_ed.inv \
testg.cat \
testg.doc \
testg.doc \
testg.fn \
testg.hl \
testg.inv \
testg.src \
testg.dct \
testg_field_au.inv \
testg_field_ck.inv \
testg_field_jt.inv \
testg_field_names.inv \
testg_field_py.inv \
testg_field_ti.inv \
testg_field_au.dct \
testg_field_ck.dct \
testg_field_py.dct \
testg_field_ti.dct \
testg_field_jt.dct
HELPFILES = \
test.index.lock \
test.query.lock \
test.update.lock \
testg.index.lock \
testg.query.lock \
testg.update.lock
all::
test:: $(WAISINDEX) $(WAISSEARCH) testg.doc test.doc
test.doc: $(SRC) $(WAISINDEX)
$(WAISINDEX) -t fields -d test $(SRC)
testg.doc: $(SRCG) $(WAISINDEX)
$(WAISINDEX) -t fields -d testg $(SRCG)
local_clean::
$(RM) $(HELPFILES)
local_realclean:: clean
$(RM) $(RESFILES)
itest:
$(SWAIS) -S . -s test.src
$(WAISSEARCH):
cd $(TOP)/ui; $(MAKE) $(WAISSEARCH)
$(WAISINDEX):
cd $(TOP)/indexer; $(MAKE) $(WAISINDEX)
DependTarget()
#define Concat(A,B) A/**/B
#define TestQuery(testname, words) @!\
test:: testname @@\
@!\
testname: Concat(DATABASE,.doc) @@\
@(echo q;echo q) | \@@\
$(WAISSEARCH) $(WAISSEARCH_ARGS) -d DATABASE words > \@@\
Concat(testname,.is) 2>&1 ; @@\
@-if $(DIFF) Concat(testname,.is) Concat(testname,.should) ; then \@@\
> /dev/null ; then \@@\
echo Test testname is ok; \@@\
else \@@\
echo Test testname failed; \@@\
fi; @@\
@!\
init:: Concat(init-,testname) @@\
@!\
Concat(init-,testname): Concat(DATABASE,.doc) @@\
(echo q;echo q) | \@@\
$(WAISSEARCH) $(WAISSEARCH_ARGS) -d DATABASE words > \@@\
Concat(testname,.should) 2>&1 @@\
@!\
local_clean:: @@\
$(RM) Concat(testname,.is) @@\
#undef BOOLEAN
#undef LITERAL
#define DATABASE test
TestQuery(PLAIN,Probabilistic Indexing)
TestQuery(WEIGHT,'Probabilistic <* 3 Indexing')
TestQuery(BOOLEAN,"au=(pennekamp or fuhr) and processing")
TestQuery(FIELD,au=pfeifer)
TestQuery(NUMERIC,py==1995)
TestQuery(COMPLEX,"py==1995 and (ti=(Retrieval freeWAIS) or au=pfeifer)")
TestQuery(PARTIAL,'Pfeif*')
TestQuery(DATE,'ed>19930101')
#define test $(STEST)
TestQuery(LITERAL,"'Enhanced Retrieval'")
#undef test
#define test $(PTEST)
TestQuery(PROXIMITY,'(Searching w/2 Documents) or (Development pre/3 Linear)')
#undef test
#undef DATABASE
#define DATABASE testg
TestQuery(GERMAN,"au=großjohann")
syntax highlighted by Code2HTML, v. 0.9.1