Changeset 730 for trunk


Ignore:
Timestamp:
Dec 15, 2008, 2:14:14 PM (13 years ago)
Author:
Peter Johansson
Message:

Check if we HAVE_SVN_WC by looking for .svn directory rather
than relying on svnversion output.

Check if we HAVE_TEST_REPO by looking for test/repo. This variable is
used to activate test that need the test repo, i.e., they are
activated also in svn export mode.

refs #362 and #355

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r729 r730  
    3030
    3131AC_PREREQ(2.60)
    32 
    3332
    3433m4_include([build_support/version.m4])
     
    152151
    153152# checking if we build in a subversion WC
    154 AC_MSG_CHECKING([if we build from subversion wc])
    155 wc_found="no";
    156 if (test "$SVNVERSION" != "no" &&
    157   test `$SVNVERSION -n $srcdir` != "exported");
    158 then
    159   wc_found="yes";
    160 fi
    161 AC_MSG_RESULT([$wc_found])
    162 AC_CHECK_FILE("$srcdir/lib/subversion_info.cc",info_found="yes",info_found="no")
    163 
    164 
    165 # devel version should have svn WC and SVNVERSION installed
    166 AM_CONDITIONAL(HAVE_SVN_WC, test "$wc_found" = "yes" )
     153AC_CHECK_FILE([$srcdir/.svn], [wc_found="yes"], [wc_found="no"])
     154AM_CONDITIONAL([HAVE_SVN_WC], [test "$wc_found" = "yes"])
     155
     156# checking if we have test repo
     157test_repo_filename=$srcdir/test/repo;
     158AC_CHECK_FILE([$test_repo_filename], [test_repo_found="yes"],
     159              [test_repo_found="no"])
     160AM_CONDITIONAL([HAVE_TEST_REPO], [test "$test_repo_found" = "yes"])
     161if (test "$test_repo_found" = "yes"); then
     162   dnl test repo is not distributed
     163   AC_CONFIG_FILES([test/test_repo.sh], [chmod +x test/test_repo.sh])
     164   AC_CONFIG_FILES([test/check_repo_status.sh],
     165                   [chmod +x test/check_repo_status.sh])   
     166fi
    167167
    168168
     
    181181all_reqs_ok="true"
    182182
    183 if (test "$wc_found" != "yes") ; then
    184 if (test "$info_found" = "no") ; then
    185    AC_MSG_WARN([Cannot find sources (lib/subversion_info.cc).])
    186    if (test "$svnversion" = "no") ; then
    187      AC_MSG_WARN([If you grabbed the source from the subversion repository,
    188      the file will be generated automatically. However, svnversion cannot
    189      be found and therefore the file cannot be generated. Please install
    190      svnversion and make sure it is in your search path.])
    191    else
    192      AC_MSG_WARN([If you grabbed the source from the subversion repository,
    193      the file will be generated automatically. However, the output from
    194      svnversion was incorrect. Either your installation of svnversion is
    195      is not healthy or there is something wrong with the repository.])
    196    fi
    197    all_reqs_ok="false"
    198 fi
    199 else
    200   dnl test repo is not distributed
    201   AC_CONFIG_FILES([test/test_repo.sh], [chmod +x test/test_repo.sh])
    202   AC_CONFIG_FILES([test/check_repo_status.sh], [chmod +x test/check_repo_status.sh])   
     183if (test "$wc_found" = "yes"); then
     184   # svnversion is required when building from svn wc
     185   if (test "$svnversion" = "no"); then
     186      all_reqs_ok="false";
     187      AC_MSG_WARN([dnl
     188Cannot find svnversion, which is required when building from a
     189subversion working copy. Please install svnversion and make sure it is
     190in your search path.]);
     191   fi
     192   if (test "$test_repo_found" = "no"); then
     193      all_reqs_ok="false";
     194      AC_MSG_WARN([dnl
     195Cannot find test repository (test_repo_filename), which should be
     196available when building from a subversion working copy. Try svn
     197update in top directory.]);
     198   fi
    203199fi
    204200
  • trunk/test/Makefile.am

    r697 r730  
    2424
    2525# these tests are only for developers since we do not distribute test repository
    26 if HAVE_SVN_WC
     26if HAVE_TEST_REPO
    2727check_PROGRAMS += copyright_test stats_test
    2828endif
     
    3030TESTS = $(check_PROGRAMS)
    3131# these tests are only for developers since we do not distribute test repository
    32 if HAVE_SVN_WC
     32if HAVE_TEST_REPO
    3333TESTS += test_repo.sh check_repo_status.sh
    3434endif
Note: See TracChangeset for help on using the changeset viewer.