searchfiles.m4

来自「LAPACK++ (Linear Algebra PACKage in C++)」· M4 代码 · 共 42 行

M4
42
字号
# $Id: searchfiles.m4,v 1.2 2004/04/29 08:36:16 cstim Exp $# (c) 2002 Martin Preuss<martin@libchipcard.de># These functions search for filesAC_DEFUN([AQ_SEARCH_FOR_PATH],[dnl searches for a file in a pathdnl $1 = file to searchdnl $2 = paths to search indnl returns the directory where the file is found (found_dir)found_dir=""ls=$1ld="$2"for li in $ld; do    if test -r "$li/$ls"; then        found_dir="$li"        break    fidone])AC_DEFUN([AQ_SEARCH_FILES],[dnl searches a dir for some filesdnl $1 = path where to searchdnl $2 = files to finddnl returns the name of the file found (found_file)found_file=""ls="$1"ld="$2"lf=""for li in $ld; do    lf2=`find "$ls" -maxdepth 1 -name "$li" 2>/dev/null`    lf="$lf $lf2"donefor li in $lf; do    if test -r "$li"; then	found_file=`basename "$li"`	break    fidone])

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?