Changeset 3124


Ignore:
Timestamp:
Dec 5, 2013 4:24:19 AM (6 years ago)
Author:
stefan
Message:

add COIN_EXAMPLE_FILES, see #95:6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r3119 r3124  
    259259AC_LANG_POP(C++)
    260260])
     261
     262###########################################################################
     263#                          COIN_EXAMPLE_FILES                             #
     264###########################################################################
     265
     266# This macro determines the names of the example files (using the
     267# argument in an "ls" command) and sets up the variables EXAMPLE_FILES
     268# and EXAMPLE_CLEAN_FILES.  If this is a VPATH configuration, it also
     269# creates soft links to the example files.
     270
     271AC_DEFUN([AC_COIN_EXAMPLE_FILES],
     272[
     273#AC_REQUIRE([AC_COIN_CHECK_VPATH])
     274#AC_REQUIRE([AC_COIN_ENABLE_MSVC])
     275#AC_REQUIRE([AC_PROG_LN_S])
     276
     277files=`cd $srcdir; ls $1`
     278# We need to do the following loop to make sure that there are no newlines
     279# in the variable
     280for file in $files; do
     281  EXAMPLE_FILES="$EXAMPLE_FILES $file"
     282  # using AC_CONFIG_LINKS is much simpler here, but due to a bug
     283  # in autoconf (even latest autoconf), the AC_COIN_EXAMPLE_FILES
     284  # macro can only be called once if the links are made this way
     285  # (otherwise autoconf thinks $file is a duplicate...)
     286  AC_CONFIG_LINKS([$file:$file])
     287done
     288
     289# potentially add some of this back as needed:
     290#if test $coin_vpath_config = yes; then
     291#  lnkcmd=
     292#  if test "$enable_msvc" != no; then
     293#    lnkcmd=cp
     294#  fi
     295#  case "$CC" in
     296#    clang* ) ;;
     297#    cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
     298#      lnkcmd=cp ;;
     299#  esac
     300#  if test "x$lnkcmd" = xcp; then
     301#    AC_MSG_NOTICE([Copying example files ($1)])
     302#  else
     303#    AC_MSG_NOTICE([Creating links to the example files ($1)])
     304#    lnkcmd="$LN_S"
     305#  fi
     306#  for file in $EXAMPLE_FILES; do
     307#    rm -f $file
     308#    $lnkcmd $srcdir/$file $file
     309#  done
     310#  EXAMPLE_CLEAN_FILES="$EXAMPLE_CLEAN_FILES $1"
     311#else
     312#  EXAMPLE_CLEAN_FILES="$EXAMPLE_CLEAN_FILES"
     313#fi
     314#
     315# In case there are compressed files, we create a variable with the
     316# uncompressed names
     317#EXAMPLE_UNCOMPRESSED_FILES=
     318#for file in $EXAMPLE_FILES; do
     319#  case $file in
     320#    *.gz)
     321#      EXAMPLE_UNCOMPRESSED_FILES="$EXAMPLE_UNCOMPRESSED_FILES `echo $file | sed -e s/.gz//`"
     322#      ;;
     323#  esac
     324#done
     325#
     326#AC_SUBST(EXAMPLE_UNCOMPRESSED_FILES)
     327#AC_SUBST(EXAMPLE_FILES)
     328#AC_SUBST(EXAMPLE_CLEAN_FILES)
     329]) #AC_COIN_EXAMPLE_FILES
     330
Note: See TracChangeset for help on using the changeset viewer.