Skip to content
Snippets Groups Projects
Commit 2f5445ff authored by Thimo Neubauer's avatar Thimo Neubauer
Browse files

- create symlink 'dune' if it is possible: tests can run with consistent

  include-path even when toplevel-directory is not called 'dune'. On
  platforms/filesystems not supporting symlinks the name of the
  current directory is checked and an appropriate include-path is set
- add two test-related Makefiles

[[Imported from SVN: r82]]
parent 65dfb32d
Branches
Tags
No related merge requests found
......@@ -21,9 +21,50 @@ AC_CHECK_PROGS([BIBTEX], [bibtex], [true])
AC_CHECK_PROGS([DVIPDF], [dvipdf], [true])
AC_CHECK_PROGS([DVIPS], [dvips], [true])
# create symlink for consistent paths even when $(top_srcdir) is not
# called dune/ (if filesystem/OS supports symlinks)
AC_PROG_LN_S
if test x"$LN_S" == x"ln -s" ; then
# Symlinks possible!
# does a file already exist?
if test -e dune ; then
# exists: is a symlink?
if test -L dune ; then
if test -e dune/grid/common/grid.hh ; then
# suppose that the link is ok and use it
AM_CPPFLAGS='-I$(top_srcdir)';
else
AC_MSG_ERROR([Symlink 'dune' exists but appears to be wrong! Please remove it manually])
fi
fi
else
echo Creating dune-symlink...
# set symlink
ln -s . dune ;
# set proper include-path
AM_CPPFLAGS='-I$(top_srcdir)';
fi
else
# no symlinks possible... check name of directory
# does dune-dir above exist and is it this directory?
if test -d ../dune && test `pwd` == `( cd ../dune && pwd)` ; then
DIR=`(cd .. && pwd)`;
# use directory above current dir in include-path
AM_CPPFLAGS="-I$DIR";
else
AC_MSG_ERROR([No symlinks supported! You have to rename the current directory to the name 'dune'])
fi
fi
# preset variable to path such that #include <dune/...> works
AC_SUBST(AM_CPPFLAGS)
# write output
AC_CONFIG_FILES([Makefile
common/Makefile
common/test/Makefile
fem/Makefile
fem/common/Makefile
fem/discfuncarray/Makefile
......@@ -37,6 +78,7 @@ AC_CONFIG_FILES([Makefile
istl/doc/Makefile
istl/tutorial/Makefile
lib/Makefile
lib/test/Makefile
operator/Makefile
quadrature/Makefile
quadrature/common/Makefile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment