Subject:  checks misreported as absent when unpacked under /*/src/*

 * scripts/common/check/check_add.sh: accept the relative source directory
 * src/build-system/Makefile.meta.in: supply it to check_add.sh

Author: Aaron M. Ucko <ucko@debian.org>
Last-Update: 2011-05-23
--- a/c++/scripts/common/check/check_add.sh	2011-05-23 18:49:10.000000000 -0400
+++ b/c++/scripts/common/check/check_add.sh	2011-05-23 18:50:40.000000000 -0400
@@ -28,14 +28,12 @@
 x_srcdir=`(cd "$1"; pwd)`
 x_test=$2
 x_signature=$3
+x_srcdir_rel=$4
 x_use_ignore_list=${CHECK_USE_IGNORE_LIST-Y}
 x_delim=" ____ "
 # Default timeout for check (in seconds)
 x_timeout_default=200
 
-# Convert source dir to relative path
-x_srcdir_rel=`echo "$x_srcdir" | perl -ne 's|^.*?/src/||; print'`
-
 # Check to necessity make test for this application
 if test ! -f "$x_srcdir/Makefile.$x_test.app";  then
    echo "Warning: File \"$x_srcdir/Makefile.$x_test.app\" not found."
@@ -46,7 +44,7 @@
 x_app=`grep '^ *APP[ =]' "$x_srcdir/Makefile.$x_test.app"`
 x_app=`echo "$x_app" | sed -e 's/^.*=//' -e 's/^ *//'`
 
-x_tpath=`echo "$x_srcdir/$x_test" | perl -ne 's|^.*?/src/||; print'`
+x_tpath=$x_srcdir_rel/$x_test
 if grep -c '^ *CHECK_CMD' $x_srcdir/Makefile.$x_test.app > /dev/null ; then 
    # Check ignore list
    x_use_ignore_list=`echo $x_use_ignore_list | tr '[a-z]' '[A-Z]' | sed -e 's/^\(.\).*/\1/g'`
--- a/c++/src/build-system/Makefile.meta.in	2011-05-23 18:48:59.000000000 -0400
+++ b/c++/src/build-system/Makefile.meta.in	2011-05-23 18:49:20.000000000 -0400
@@ -188,7 +188,7 @@
    expendable=false ; \
    for i in $$x_project ; do \
       if test "x$$i" = "x-" ; then expendable=true ; continue ; fi ; \
-      $(check_add) $(abs_srcdir) $$i @signature@ @exe_ext@
+      $(check_add) $(abs_srcdir) $$i @signature@ $(subdir)
 CHECK_ADD_KET = ||  exit 5 ; \
    done ; \
 fi
