Changeset 497


Ignore:
Timestamp:
Aug 9, 2007 8:49:09 PM (13 years ago)
Author:
andreasw
Message:

improved macros for COIN_LINK_FROM_FILELIST (and COPY)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/BSP/trunk/coin.m4

    r446 r497  
    21002100AC_BEFORE([AC_COIN_PROG_CC],[$0])
    21012101AC_BEFORE([AC_COIN_PROG_F77],[$0])
    2102 AC_BEFORE([$0],[AC_COIN_FINISH])
     2102AC_BEFORE([$0],[AC_COIN_FINALIZE])
    21032103
    21042104coin_has_zlib=no
     
    21322132AC_BEFORE([AC_COIN_PROG_CC],[$0])
    21332133AC_BEFORE([AC_COIN_PROG_F77],[$0])
    2134 AC_BEFORE([$0],[AC_COIN_FINISH])
     2134AC_BEFORE([$0],[AC_COIN_FINALIZE])
    21352135
    21362136coin_has_bzlib=no
     
    21652165AC_BEFORE([AC_COIN_PROG_CC],[$0])
    21662166AC_BEFORE([AC_COIN_PROG_F77],[$0])
    2167 AC_BEFORE([$0],[AC_COIN_FINISH])
     2167AC_BEFORE([$0],[AC_COIN_FINALIZE])
    21682168
    21692169coin_has_readline=no
     
    22372237fi
    22382238]) # AC_COIN_HAS_DATA
     2239
     2240###########################################################################
     2241#                       COIN_LINK_FROM_FILELIST                           #
     2242###########################################################################
     2243
     2244# This macro creates links (or copies, if necessary) to files listed
     2245# as content in a text file (second argument) into a target directory
     2246# (first argument), which is created if it doesn't exist yet.  If s link
     2247# already exists, nothing happens.
     2248
     2249AC_DEFUN([AC_COIN_LINKCOPY_FROM_FILELIST],
     2250[cmd="$3"
     2251if test -e $srcdir/$2 ; then
     2252  my_target_dir="$1"
     2253  my_link_files=`cat $srcdir/$2`
     2254  my_dirname=`AS_DIRNAME($2)`
     2255#  if test -e $my_target_dir; then : ; else
     2256#    AS_MKDIR_P($my_target_dir)
     2257#  fi
     2258  for i in $my_link_files; do
     2259    #rm -rf $my_target_dir/$i
     2260    if test -e $my_target_dir/$i; then : ; else
     2261      dirn2=`AS_DIRNAME($my_target_dir/$i)`
     2262      if test -e $dirn2; then : ; else
     2263        AS_MKDIR_P($dirn2)
     2264      fi
     2265      $cmd $abs_source_dir/$my_dirname/$i $my_target_dir/$i
     2266    fi
     2267  done
     2268else
     2269  AC_MSG_WARN([File list file $2 missing!])
     2270fi
     2271])
     2272
     2273AC_DEFUN([AC_COIN_LINK_FROM_FILELIST],
     2274[
     2275AC_REQUIRE([AC_COIN_LINK_INPUT_CMD])
     2276echo Creating links in $1 ...
     2277AC_COIN_LINKCOPY_FROM_FILELIST($1, $2, $coin_link_input_cmd)
     2278])
     2279
     2280###########################################################################
     2281#                       COIN_COPY_FROM_FILELIST                           #
     2282###########################################################################
     2283
     2284# Like COIN_LINK_FROM_FILELIST, but copies the files.
     2285
     2286AC_DEFUN([AC_COIN_COPY_FROM_FILELIST],
     2287[
     2288echo Creating copies in $1 ...
     2289AC_COIN_LINKCOPY_FROM_FILELIST($1, $2, [cp])
     2290])
    22392291
    22402292###########################################################################
Note: See TracChangeset for help on using the changeset viewer.