aclocal.m4 and BUILDTOP

Kevin Glynn glynn at info.ucl.ac.be
Wed May 12 11:33:24 CEST 2004



It is impossible to build mozart in a build directory which is a
subdirectory of the mozart source, as follows:

cd /..../mozart
mkdir build
cd build
../configure .....

This sets the BUILDTOP variable to /..../mozart, rather than
/..../mozart/build. 

Here is the offending part of aclocal.m4:

   dnl ------------------------------------------------------------------
   dnl OZ_PATH_BUILDTOP
   dnl
   dnl sets BUILDTOP by looking upward from the current directory
   dnl for a directory containing either contrib or config.cache. We
   dnl look for config.cache last because some people may want to run
   dnl configure only in a subdirectory of the source tree.
   dnl ------------------------------------------------------------------
   
   AC_DEFUN(OZ_PATH_BUILDTOP,[
     AC_CACHE_CHECK([for BUILDTOP],oz_cv_path_BUILDTOP,[
       OZ_PATH_UPWARD(oz_cv_path_BUILDTOP,.,[contrib config.cache])
       if test -z "$oz_cv_path_BUILDTOP"; then
         AC_MSG_ERROR([cannot find BUILDTOP])
       fi])
     BUILDTOP=$oz_cv_path_BUILDTOP
     AC_SUBST(BUILDTOP)])
   
The comment seems to address this exact problem, but the code finds
the contrib directory in the mozart source directory first. Why don't
we look for config.cache first? In fact, why do we search for contrib
at all?

thanks for enlightenment,
k



-- 
------------- you're invited to: -------------------------
The Second International Mozart/Oz Conference (MOZ 2004)
Charleroi, Belgium, Oct. 7-8, 2004
http://www.cetic.be/moz2004
----------------------------------------------------------



More information about the mozart-hackers mailing list