Namazu-devel-ja(旧)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (VPATH) nmz/i18n.h:8: libintl.h: No such file or directory



>                                            千葉市中央区長洲
>                                                    藤原  誠
竹迫さん> この藤原さんのパッチですが、CVS の stable-2-0 にパッチを当てて、

竹迫さん> となりますが、make install を行わないで make check をすると、
竹迫さん> =====================
竹迫さん> 28 of 40 tests failed
竹迫さん> =====================

ということでしたので、修正して見ました。あちこちいじり回して
しまいました。でも同じようなこと、つまり 
「make install する前に make check を通すようにする工夫」
が既にあり、単にそれらが VPATH 対応になっていないだけ
の部分を直しただけです。
もっとも、それらの「工夫」も何とかしたいということだとは思います。

(vpath, in-place) x ( --with-included-gettext) の四通りについて
確認しているつもりです。

竹迫さん> 個人的には bug fix リリースを優先して、make check に
竹迫さん> ついては、もう少し時間をかけて整備したいと思っています。

その通りだと思います。

別のメールになりますが、
安部さん> 安部です。

安部さん> 特に問題がなければ、今日中にもNamazu 2.0.7をrelease
安部さん> したいと思うのですが、いかがでしょうか?

僕はいいと思います。
(一応質問なのですが)、
gettext-0.10.3[89] でなくて gettext-0.10.35 を使っている理由
を簡単に書けるなら教えて下さい。

## namazu/tests/ja-namazu-cgi-1	2001/09/12 01:07:53
## の変更は不要のような気がします。
---
(藤原)
Index: namazu/scripts/gcnmz.in
===================================================================
RCS file: /automount/nazuha/cvs/namazu/scripts/gcnmz.in,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 gcnmz.in
--- namazu/scripts/gcnmz.in	2001/09/11 12:00:34	1.1.1.1
+++ namazu/scripts/gcnmz.in	2001/09/12 01:27:04
@@ -6,7 +6,10 @@
 # gcnmz.pl - by furukawa@xxxxxxxxxxxx
 #
 
-push(@INC, '../pl');
+my $pldir = '';
+if ( $ENV{'srcdir'} ) {
+    $pldir = $ENV{'srcdir'}.'/' }; #  VPATH for make check
+push(@INC, $pldir."../pl");
 push(@INC, '@PERLLIBDIR@');
 require 'nmzidx.pl';
 
Index: namazu/scripts/mknmz.in
===================================================================
RCS file: /automount/nazuha/cvs/namazu/scripts/mknmz.in,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz.in
--- namazu/scripts/mknmz.in	2001/09/11 12:00:34	1.1.1.1
+++ namazu/scripts/mknmz.in	2001/09/11 23:55:35
@@ -334,13 +334,21 @@
     };
 
     # For executing mknmz in scripts directory
-    $TEMPLATEDIR = "../template" if -f "../template/NMZ.head";
+    my $srcdir = '';
+    if (defined($ENV{'srcdir'})) {      ## for VPATH ;make check
+	$srcdir = $ENV{'srcdir'}.'/';}
+    my $tempdir = $srcdir . "../template";
+    $TEMPLATEDIR = $tempdir if -f $tempdir."/NMZ.head";
 }
 
 sub preload_modules () { 
     unshift @INC, $LIBDIR;
-    unshift @INC, "../pl";	# FIXME: remove the workaround for 
-    unshift @INC, "../filter";	# test suites.
+    my $srcdir;
+    if (defined($ENV{'srcdir'})) {      ## for VPATH ;make check
+	$srcdir = $ENV{'srcdir'} .'/';}
+    unshift @INC,          "../pl";	# FIXME: remove the workaround for 
+    unshift @INC, $srcdir. "../pl";	# FIXME: remove the workaround for   (util.pl)
+    unshift @INC, $srcdir. "../filter";	# test suites.
 
     require "conf.pl" || die "unable to require \"conf.pl\"\n";
     require "util.pl" || die "unable to require \"util.pl\"\n";
@@ -372,9 +380,12 @@
 
     # Check filter modules
     my @filters = ();
-    if (-f "../filter/gfilter.pl") { # to ease developing
-	@filters = (glob("../filter/*.pl"), glob("$FILTERDIR/*.pl"));
-	unshift @INC, "../filter";
+    my $srcfilterdir = '';  # for make check in VPATH environment
+    if (defined($ENV{'srcdir'})) {
+	$srcfilterdir = $ENV{'srcdir'}.'/../filter';}
+    if (-f "$srcfilterdir/gfilter.pl") { # to ease developing
+	@filters = (glob("$srcfilterdir/*.pl"), glob("$FILTERDIR/*.pl"));
+	unshift @INC, "$srcfilterdir/filter";
     } else {
 	@filters = glob "$FILTERDIR/*.pl";
     }
Index: namazu/tests/Makefile.am
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/Makefile.am,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 Makefile.am
--- namazu/tests/Makefile.am	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/Makefile.am	2001/09/11 12:15:05
@@ -2,20 +2,49 @@
 AUTOMAKE_OPTIONS = 1.4 no-dependencies
 SUBDIRS = data
 
-TESTS =	mknmz-1 mknmz-2 mknmz-3 mknmz-4 mknmz-5 \
-	mknmz-6 mknmz-7 mknmz-8 mknmz-9 mknmz-10 \
-	mknmz-11 mknmz-12 mknmz-13 mknmz-14 mknmz-15 \
-	mknmz-16 \
-	gcnmz-1 \
-	idxdiff-1 idxdiff-2 idxdiff-3 \
-	namazu-1 namazu-2 namazu-3 namazu-4 namazu-5 \
-	namazu-6 namazu-7 namazu-8 namazu-9 namazu-10 \
-	namazu-11 \
-	namazu-cgi-1 namazu-cgi-2 namazu-cgi-3 namazu-cgi-4 \
-	namazu-cgi-5 namazu-cgi-6 namazu-cgi-7 \
-	ja-mknmz-1 ja-namazu-cgi-1
+TESTS = \
+	$(srcdir)/mknmz-1 \
+	$(srcdir)/mknmz-2 \
+	$(srcdir)/mknmz-3 \
+	$(srcdir)/mknmz-4 \
+	$(srcdir)/mknmz-5 \
+	$(srcdir)/mknmz-6 \
+	$(srcdir)/mknmz-7 \
+	$(srcdir)/mknmz-8 \
+	$(srcdir)/mknmz-9 \
+	$(srcdir)/mknmz-10 \
+	$(srcdir)/mknmz-11 \
+	$(srcdir)/mknmz-12 \
+	$(srcdir)/mknmz-13 \
+	$(srcdir)/mknmz-14 \
+	$(srcdir)/mknmz-15 \
+	$(srcdir)/mknmz-16 \
+	$(srcdir)/gcnmz-1 \
+	$(srcdir)/idxdiff-1 \
+	$(srcdir)/idxdiff-2 \
+	$(srcdir)/idxdiff-3 \
+	$(srcdir)/namazu-1 \
+	$(srcdir)/namazu-2 \
+	$(srcdir)/namazu-3 \
+	$(srcdir)/namazu-4 \
+	$(srcdir)/namazu-5 \
+	$(srcdir)/namazu-6 \
+	$(srcdir)/namazu-7 \
+	$(srcdir)/namazu-8 \
+	$(srcdir)/namazu-9 \
+	$(srcdir)/namazu-10 \
+	$(srcdir)/namazu-11 \
+	$(srcdir)/namazu-cgi-1 \
+	$(srcdir)/namazu-cgi-2 \
+	$(srcdir)/namazu-cgi-3 \
+	$(srcdir)/namazu-cgi-4 \
+	$(srcdir)/namazu-cgi-5 \
+	$(srcdir)/namazu-cgi-6 \
+	$(srcdir)/namazu-cgi-7 \
+	$(srcdir)/ja-mknmz-1 \
+	$(srcdir)/ja-namazu-cgi-1
 
 clean-local:
 	rm -rf test-log tmp-data tmp.* idx[0-9]* ja-idx[0-9]*
 
-EXTRA_DIST = $(TESTS) select-data
+EXTRA_DIST = $(TESTS) $(top_srcdir)/select-data
Index: namazu/tests/gcnmz-1
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/gcnmz-1,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 gcnmz-1
--- namazu/tests/gcnmz-1	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/gcnmz-1	2001/09/11 12:15:05
@@ -3,7 +3,7 @@
 # Test for gcnmz.
 #
 LOG=`pwd`/test-log
-TARGET=`./select-data`
+TARGET=`$srcdir/select-data`
 TMPDATA=`pwd`/tmp-data
 
 if test ! -d idx5; then
Index: namazu/tests/ja-mknmz-1
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/ja-mknmz-1,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 ja-mknmz-1
--- namazu/tests/ja-mknmz-1	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/ja-mknmz-1	2001/09/11 12:15:05
@@ -3,7 +3,7 @@
 # Test for Japanese encoding
 #
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/ja-spec
+TARGET=$srcdir/data/ja-spec
 IDX=ja-idx1
 
 EXEC=no
@@ -24,6 +24,5 @@
     rm -f $IDX/NMZ.*
 fi
 
-cd ../scripts
-./mknmz -O ../tests/$IDX $TARGET >> $LOG
+../scripts/mknmz -O $IDX $TARGET >> $LOG
 exit $?
Index: namazu/tests/ja-namazu-cgi-1
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/ja-namazu-cgi-1,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 ja-namazu-cgi-1
--- namazu/tests/ja-namazu-cgi-1	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/ja-namazu-cgi-1	2001/09/12 01:07:53
@@ -19,14 +19,15 @@
 
 pwd=`pwd`
 tmprc="$pwd/../src/.namazurc"
-echo "Index $pwd" > $tmprc
+echo "Index     $pwd" > $tmprc
+echo "Template  $srcdir/../template" >>$tmprc
 
 SCRIPT_NAME='namazu.cgi'
 QUERY_STRING='query=海&idxname=ja-idx1'
 export SCRIPT_NAME QUERY_STRING
 
 cd ../src
-RESULT=`./namazu.cgi -h 海 | grep 山 | wc -l`
+RESULT=`./namazu.cgi | grep 山 | wc -l`
 if [ $RESULT -ne 1 ]
 then
 	exit 1
Index: namazu/tests/mknmz-1
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/mknmz-1,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz-1
--- namazu/tests/mknmz-1	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/mknmz-1	2001/09/11 13:03:12
@@ -2,8 +2,12 @@
 #
 # Test for simple indexing.
 #
+
+# echo srcdir=$srcdir
+
+# return data/en or data/ja depending environment
+TARGET=`$srcdir/select-data`
 LOG=`pwd`/test-log
-TARGET=`./select-data`
 
 if test ! -d idx1; then
     mkdir idx1
@@ -12,6 +16,5 @@
 fi
 
 # Simple indexing.
-cd ../scripts 
-./mknmz -O ../tests/idx1 $TARGET >> $LOG
+../scripts/mknmz  -O idx1 $TARGET >> ./test-log
 exit $?
Index: namazu/tests/mknmz-10
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/mknmz-10,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz-10
--- namazu/tests/mknmz-10	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/mknmz-10	2001/09/11 12:15:05
@@ -3,8 +3,8 @@
 # Test for priority of mknmzrc and command line option.
 #
 
-LOG=`pwd`/test-log
-TARGET=`./select-data`
+LOG=test-log
+TARGET=`$srcdir/select-data`
 
 if test ! -d idx12; then
     mkdir idx12
@@ -22,12 +22,12 @@
 tmprc="$HOME/.mknmzrc"
 echo '$conf::ALLOW_FILE=".*\\.txt"' > $tmprc
 
-cd ../scripts
-./mknmz -O ../tests/idx12 $TARGET >> $LOG 2>&1
-./mknmz --allow='.*\.html' -O ../tests/idx13 $TARGET >> $LOG 2>&1
+
+../scripts/mknmz -O                    idx12 $TARGET >> $LOG 2>&1
+../scripts/mknmz --allow='.*\.html' -O idx13 $TARGET >> $LOG 2>&1
 rm $tmprc
-grep -v '\.txt' ../tests/idx12/NMZ.field.uri >> $LOG && exit 1
-grep '\.txt' ../tests/idx12/NMZ.field.uri >> $LOG || exit $?
-grep -v '\.html' ../tests/idx13/NMZ.field.uri >> $LOG && exit 1
-grep '\.html' ../tests/idx13/NMZ.field.uri >> $LOG
+grep -v '\.txt'  idx12/NMZ.field.uri >> $LOG && exit 1
+grep '\.txt'     idx12/NMZ.field.uri >> $LOG || exit $?
+grep -v '\.html' idx13/NMZ.field.uri >> $LOG && exit 1
+grep '\.html'    idx13/NMZ.field.uri >> $LOG
 exit $?
Index: namazu/tests/mknmz-11
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/mknmz-11,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz-11
--- namazu/tests/mknmz-11	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/mknmz-11	2001/09/11 12:15:05
@@ -4,9 +4,14 @@
 #
 
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/symlink
+DATA=`pwd`/data
+TARGET=$DATA/symlink
 IDXDIR=idx14
 
+if test ! -d $DATA; then
+   mkdir $DATA
+fi
+
 if test ! -d $IDXDIR; then
     mkdir $IDXDIR
 else
@@ -14,12 +19,12 @@
 fi
 
 if test ! -h $TARGET; then
-    ln -s `pwd`/data/en $TARGET
+    ln -s ../$srcdir/data/en $TARGET
 fi
-TXTCOUNT=`ls ./data/symlink/*.txt|wc -l`
+TXTCOUNT=`ls $TARGET/*.txt|wc -l`
+
 
-cd ../scripts
-./mknmz --allow='.*.txt' -O ../tests/$IDXDIR $TARGET >> $LOG 2>&1
-RESULTCOUNT=`wc -l < ../tests/$IDXDIR/NMZ.field.uri`
+../scripts/mknmz --allow='.*.txt' -O $IDXDIR $TARGET >> $LOG 2>&1
+RESULTCOUNT=`wc -l < $IDXDIR/NMZ.field.uri`
 test $TXTCOUNT -eq $RESULTCOUNT
-exit $?
+exit $?
Index: namazu/tests/mknmz-12
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/mknmz-12,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz-12
--- namazu/tests/mknmz-12	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/mknmz-12	2001/09/11 12:55:18
@@ -4,10 +4,10 @@
 #
 
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/filter
+TARGET=$srcdir/data/filter/  # from script
 IDXDIR=idx15
-TXTCOUNT=`ls ./data/filter/*.txt|wc -l`
-FDIR=`pwd`/data/filter
+TXTCOUNT=`ls $srcdir/data/filter/*.txt|wc -l`
+FDIR=$srcdir/data/filter
 MKNMZRC=`pwd`/mknmzrc-mknmz12
 export MKNMZRC
 
@@ -17,15 +17,18 @@
     rm -f $IDXDIR/NMZ.*
 fi
 
-cd ../scripts
-echo "package conf; \$FILTERDIR='$FDIR'; 1;" > ../tests/mknmzrc-mknmz12
-RESULTCOUNT=`./mknmz -C|egrep x-test|wc -l`
-rm -f ../tests/mknmzrc-mknmz12
+echo "package conf; \$FILTERDIR='$FDIR'; 1;" > mknmzrc-mknmz12
+RESULTCOUNT=`../scripts/mknmz -C|egrep x-test|wc -l`
+rm -f mknmzrc-mknmz12
 test $RESULTCOUNT -eq 1 || exit $?
 
-echo "package conf; \$FILTERDIR='$FDIR'; 1;" > ../tests/mknmzrc-mknmz12
-./mknmz --allow='.*.txt' -O ../tests/$IDXDIR $TARGET >> $LOG 2>&1
-rm -f ../tests/mknmzrc-mknmz12
-RESULTCOUNT=`wc -l < ../tests/$IDXDIR/NMZ.field.uri`
+echo "package conf; \$FILTERDIR='$FDIR'; 1;" > mknmzrc-mknmz12
+if  test ! -d $IDXDIR; then 
+    mkdir     $IDXDIR
+fi
+
+../scripts/mknmz --allow='.*.txt' -O $IDXDIR $TARGET >> $LOG 2>&1
+rm -f mknmzrc-mknmz12
+RESULTCOUNT=`wc -l < $IDXDIR/NMZ.field.uri`
 test $TXTCOUNT -eq $RESULTCOUNT
 exit $?
Index: namazu/tests/mknmz-14
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/mknmz-14,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz-14
--- namazu/tests/mknmz-14	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/mknmz-14	2001/09/11 12:15:05
@@ -3,7 +3,7 @@
 # Test for emphasized keyword.
 #
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/emphasize
+TARGET=$srcdir/data/emphasize
 IDX=idx17
 
 if test ! -d $IDX; then
@@ -13,6 +13,5 @@
 fi
 
 # Simple indexing.
-cd ../scripts
-./mknmz -O ../tests/$IDX $TARGET >> $LOG
+../scripts/mknmz -O $IDX $TARGET >> $LOG
 exit $?
Index: namazu/tests/mknmz-15
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/mknmz-15,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz-15
--- namazu/tests/mknmz-15	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/mknmz-15	2001/09/11 12:15:05
@@ -3,7 +3,7 @@
 # Test for duplicated field.
 #
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/dup-field
+TARGET=$srcdir/data/dup-field
 IDX=idx18
 CONF=`pwd`/tmp.mknmzrc
 
@@ -17,10 +17,9 @@
 echo '$SEARCH_FIELD = "keywords|message-id|subject|from|date|uri|newsgroups|to|summary|size";' >> $CONF
 echo '$META_TAGS = "keywords|description";' >> $CONF
 
-cd ../scripts
-./mknmz --meta -f $CONF -O ../tests/$IDX $TARGET > $LOG 2>&1
+../scripts/mknmz --meta -f $CONF -O $IDX $TARGET > $LOG 2>&1
 
-COUNT=`egrep 'test' ../tests/$IDX/NMZ.field.keywords|wc -l`
+COUNT=`egrep 'test' $IDX/NMZ.field.keywords|wc -l`
 
 if [ $COUNT -ne 1 ]
 then
Index: namazu/tests/mknmz-16
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/mknmz-16,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz-16
--- namazu/tests/mknmz-16	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/mknmz-16	2001/09/11 12:15:05
@@ -24,7 +24,6 @@
     echo "namazu $i" > $TMPDATA/$i.txt
 done
 
-cd ../scripts
-./mknmz -O ../tests/$IDX $TMPDATA > $LOG 2>&1
+../scripts/mknmz -O $IDX $TMPDATA > $LOG 2>&1
 
 exit 0
Index: namazu/tests/mknmz-2
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/mknmz-2,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz-2
--- namazu/tests/mknmz-2	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/mknmz-2	2001/09/11 23:41:32
@@ -3,7 +3,7 @@
 # Test for incremental indexing.
 #
 LOG=`pwd`/test-log
-TARGET=`./select-data`
+TARGET=`$srcdir/select-data`
 
 if test ! -d idx2; then
     mkdir idx2
@@ -11,11 +11,10 @@
     rm -f idx2/NMZ.*
 fi
 
-cd ../scripts
-targets=`cat ../tests/idx1/NMZ.field.uri`
+targets=`cat idx1/NMZ.field.uri`
 
 for target in $targets; do
-   ./mknmz --no-delete -O ../tests/idx2 $target \
+   ../scripts/mknmz --no-delete -O idx2 $target \
 	>> $LOG
     test "$?" != "0" && exit 1  # error if not success
 done;
Index: namazu/tests/mknmz-3
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/mknmz-3,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz-3
--- namazu/tests/mknmz-3	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/mknmz-3	2001/09/11 12:15:05
@@ -3,7 +3,7 @@
 # Test for indexing with --checkpoint and $ON_MEMORY_MAX is 0.
 #
 LOG=`pwd`/test-log
-TARGET=`./select-data`
+TARGET=`$srcdir/select-data`
 
 if test ! -d idx3; then
     mkdir idx3
@@ -16,8 +16,7 @@
 echo '$conf::ON_MEMORY_MAX=0' > $tmprc
 
 # Simple indexing
-cd ../scripts 
-./mknmz --checkpoint -f $tmprc -O ../tests/idx3 $TARGET >> $LOG
+../scripts/mknmz --checkpoint -f $tmprc -O idx3 $TARGET >> $LOG
 rm -f $tmprc
 
 exit $?
Index: namazu/tests/mknmz-4
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/mknmz-4,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz-4
--- namazu/tests/mknmz-4	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/mknmz-4	2001/09/11 12:15:05
@@ -3,7 +3,7 @@
 # Test for deleting documents in an index.
 #
 LOG=`pwd`/test-log
-TARGET=`./select-data`
+TARGET=`$srcdir/select-data`
 
 if test ! -d idx4; then
     mkdir idx4
@@ -19,11 +19,10 @@
 cp -rp $TARGET tmp-data
 
 # Simple indexing.
-cd ../scripts 
-./mknmz -O ../tests/idx4 $TMPDATA >> $LOG
+../scripts/mknmz -O idx4 $TMPDATA >> $LOG
 test "$?" != "0" && exit 1  # error if not success
 
-prevdocnum=`perl -lne 'print $1 if /^files (\d+)/' ../tests/idx4/NMZ.status`
+prevdocnum=`perl -lne 'print $1 if /^files (\d+)/' idx4/NMZ.status`
 
 # Remove some documents.
 cd $TMPDATA
@@ -31,11 +30,10 @@
 cd ../
 
 # Update the index.
-cd ../scripts 
-./mknmz --update=../tests/idx4 >> $LOG
+../scripts/mknmz --update=idx4 >> $LOG
 test "$?" != "0" && exit 1  # error if not success
 
-postdocnum=`perl -lne 'print $1 if /^files (\d+)/' ../tests/idx4/NMZ.status`
+postdocnum=`perl -lne 'print $1 if /^files (\d+)/' idx4/NMZ.status`
 
 echo "predocnum:" $prevdocnum, "postdocnum:" $postdocnum >> $LOG
 test $prevdocnum -le $postdocnum && exit 1  # error if prev <= post
Index: namazu/tests/mknmz-5
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/mknmz-5,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz-5
--- namazu/tests/mknmz-5	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/mknmz-5	2001/09/11 12:15:05
@@ -3,7 +3,7 @@
 # Test for updating documents in an index.
 #
 LOG=`pwd`/test-log
-TARGET=`./select-data`
+TARGET=`$srcdir/select-data`
 TMPDATA=`pwd`/tmp-data
 
 if test ! -d idx7; then
@@ -19,11 +19,11 @@
 cp -rp $TARGET tmp-data
 
 # Simple indexing.
-cd ../scripts 
-./mknmz -O ../tests/idx7 $TMPDATA >> $LOG
+
+../scripts/mknmz -O idx7 $TMPDATA >> $LOG
 test "$?" != "0" && exit 1  # error if not success
 
-prevdocnum=`perl -lne 'print $1 if /^files (\d+)/' ../tests/idx7/NMZ.status`
+prevdocnum=`perl -lne 'print $1 if /^files (\d+)/' idx7/NMZ.status`
 
 # Update some documents. Add `xyzzy' to each document.
 cd $TMPDATA
@@ -32,11 +32,11 @@
 cd ../
 
 # Update the index.
-cd ../scripts 
-./mknmz --update=../tests/idx7 >> $LOG
+
+../scripts/mknmz --update=idx7 >> $LOG
 test "$?" != "0" && exit 1  # error if not success
 
-postdocnum=`perl -lne 'print $1 if /^files (\d+)/' ../tests/idx7/NMZ.status`
+postdocnum=`perl -lne 'print $1 if /^files (\d+)/' idx7/NMZ.status`
 
 echo "predocnum:" $prevdocnum, "postdocnum:" $postdocnum >> $LOG
 test $prevdocnum != $postdocnum && exit 1  # error if prev != post
Index: namazu/tests/mknmz-6
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/mknmz-6,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz-6
--- namazu/tests/mknmz-6	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/mknmz-6	2001/09/11 12:15:05
@@ -3,7 +3,7 @@
 # Make an index for testing query operations.
 #
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/query
+TARGET=$srcdir/data/query
 
 if test ! -d idx8; then
     mkdir idx8
@@ -12,6 +12,5 @@
 fi
 
 # Simple indexing.
-cd ../scripts 
-./mknmz -O ../tests/idx8 $TARGET >> $LOG
+../scripts/mknmz -O idx8 $TARGET >> $LOG
 exit $?
Index: namazu/tests/mknmz-7
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/mknmz-7,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz-7
--- namazu/tests/mknmz-7	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/mknmz-7	2001/09/11 12:15:05
@@ -3,7 +3,7 @@
 # Test for mknmz's --html-split option.
 #
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/html-split
+TARGET=$srcdir/data/html-split
 
 if test ! -d idx9; then
     mkdir idx9
@@ -12,7 +12,7 @@
 fi
 
 # Indexing with --html-split option.
-cd ../scripts 
-./mknmz --html-split -O ../tests/idx9 $TARGET >> $LOG
+
+../scripts/mknmz --html-split -O idx9 $TARGET >> $LOG
 exit $?
 
Index: namazu/tests/mknmz-8
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/mknmz-8,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz-8
--- namazu/tests/mknmz-8	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/mknmz-8	2001/09/11 12:15:05
@@ -3,7 +3,7 @@
 # Test for mknmz's --html-split option with updating.
 #
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/html-split
+TARGET=$srcdir/data/html-split
 
 if test ! -d idx10; then
     mkdir idx10
@@ -19,40 +19,36 @@
 cp -rp $TARGET tmp-data
 
 # Index with --html-split option.
-cd ../scripts 
-./mknmz --html-split -O ../tests/idx10 $TMPDATA >> $LOG
+../scripts/mknmz --html-split -O idx10 $TMPDATA >> $LOG
 test "$?" != "0" && exit 1  # error if not success
-origdocnum=`./gtnmz ../tests/idx10/NMZ.r`
+origdocnum=`../scripts/gtnmz idx10/NMZ.r`
 
 # Update 1.html.
 perl -i -pe s/xyzzy// $TMPDATA/1.html
 echo amarok >> $TMPDATA/1.html
 
 # Update the index with --html-split option.
-cd ../scripts 
-./mknmz --update=../tests/idx10 >> $LOG
+../scripts/mknmz --update=idx10 >> $LOG
 test "$?" != "0" && exit 1  # error if not success
-docnum=`./gtnmz ../tests/idx10/NMZ.r`
+docnum=`../scripts/gtnmz idx10/NMZ.r`
 test $docnum != $origdocnum && exit 1  # error if not equal
 
 # Remove 2.html.
 rm $TMPDATA/2.html
 
 # Update the index with --html-split option.
-cd ../scripts 
-./mknmz --update=../tests/idx10 >> $LOG
+../scripts//mknmz --update=idx10 >> $LOG
 test "$?" != "0" && exit 1  # error if not success
-docnum=`./gtnmz ../tests/idx10/NMZ.r`
+docnum=`../scripts/gtnmz idx10/NMZ.r`
 docnum2=`expr $docnum + $docnum`
 test $docnum2 != $origdocnum && exit 1  # error if not equal
 
 # Nothing changed.
 
 # Update the index with --html-split option.
-cd ../scripts 
-./mknmz --update=../tests/idx10 >> $LOG
+../scripts/mknmz --update=idx10 >> $LOG
 test "$?" != "0" && exit 1  # error if not success
-docnum=`./gtnmz ../tests/idx10/NMZ.r`
+docnum=`../scripts/gtnmz idx10/NMZ.r`
 docnum2=`expr $docnum + $docnum`
 test $docnum2 != $origdocnum && exit 1  # error if not equal
 
Index: namazu/tests/mknmz-9
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/mknmz-9,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 mknmz-9
--- namazu/tests/mknmz-9	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/mknmz-9	2001/09/11 12:15:05
@@ -4,7 +4,7 @@
 #
 
 LOG=`pwd`/test-log
-TARGET=`./select-data`
+TARGET=`$srcdir/select-data`
 
 if test ! -d idx11; then
     mkdir idx11
@@ -12,18 +12,17 @@
     rm -f idx11/NMZ.*
 fi
 
-cd ../scripts
-./mknmz -O ../tests/idx11 $TARGET >> $LOG 2>&1 &
+../scripts/mknmz -O idx11 $TARGET >> $LOG 2>&1 &
 
 i=20
 while test $i -gt 0
 do {
     i=`expr $i - 1`
-    if test -r ../tests/idx11/NMZ.lock2
+    if test -r idx11/NMZ.lock2
     then {
-        kill -TERM `cat ../tests/idx11/NMZ.lock2`
+        kill -TERM `cat idx11/NMZ.lock2`
         wait
-        grep '^\[Base\]' ../tests/idx11/NMZ.log >> $LOG && exit 0
+        grep '^\[Base\]' idx11/NMZ.log >> $LOG && exit 0
         exit 1
     }
     fi
Index: namazu/tests/namazu-6
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/namazu-6,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 namazu-6
--- namazu/tests/namazu-6	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/namazu-6	2001/09/11 12:15:05
@@ -19,7 +19,7 @@
 M123="$TMP.123"    # 1.txt and 2.txt 3.txt
 
 cat /dev/null > $M0
-head -1 $IDX/NMZ.r > $M1
+head -1  $IDX/NMZ.r > $M1
 head -2  $IDX/NMZ.r | tail -1 > $M2
 head -3  $IDX/NMZ.r | tail -1 > $M3
 
Index: namazu/tests/select-data
===================================================================
RCS file: /automount/nazuha/cvs/namazu/tests/select-data,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 select-data
--- namazu/tests/select-data	2001/09/11 12:00:36	1.1.1.1
+++ namazu/tests/select-data	2001/09/11 12:15:05
@@ -4,6 +4,7 @@
 #
 
 base=`pwd`/data
+base=$srcdir/data
 
 for lang in "$LC_ALL" "$LC_CTYPE" "$LANG"; do
     cand=`echo "$lang" | perl -nle 'print $1 if /^(..)/'`