ax_dirname.m4

来自「A C++ class library for scientific compu」· M4 代码 · 共 23 行

M4
23
字号
dnl @* AX_DIRNAME(PATHNAME)dnldnl Parts of the implementation have been taken from AS_DIRNAME from thednl main autoconf package in generation 2.5x. However, we do only use dnl "sed" to cut out the dirname, and we do additionally clean up some dnl dir/.. parts in the resulting pattern.dnldnl this macro may be used in autoconf 2.13 scripts as well.dnldnl @$Id: ax_dirname.m4,v 1.1 2004/04/17 10:15:43 patricg Exp $AC_DEFUN([AX_DIRNAME],[echo X[]$1 |    sed ['s/\/[^\/:][^\/:]*\/..\//\//g          s/\/[^\/:][^\/:]*\/..\//\//g          s/\/[^\/:][^\/:]*\/..\//\//g          s/\/[^\/:][^\/:]*\/..\//\//g          /^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }          /^X\(\/\/\)[^/].*/{ s//\1/; q; }          /^X\(\/\/\)$/{ s//\1/; q; }          /^X\(\/\).*/{ s//\1/; q; }          s/.*/./; q']])

⌨️ 快捷键说明

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