GNU make manual 翻译(八十二)

简介:

继续翻译

复制代码
4.4 Using Wildcard Characters in File Names                        
===========================================                        
                        
A single file name can specify many files using "wildcard characters". The wildcard characters in `make' are `*', `?' and `[...]', the same as in the Bourne shell.  For example, `*.c' specifies a list of all the files (in the working directory) whose names end in `.c'.                        
                        
   The character `~' at the beginning of a file name also has special significance.  If alone, or followed by a slash, it represents your home directory.  For example `~/bin' expands to `/home/you/bin'.  If the `~' is followed by a word, the string represents the home directory of the user named by that word.  For example `~john/bin' expands to `/home/john/bin'.  On systems which don't have a home directory for each user (such as MS-DOS or MS-Windows), this functionality can be simulated by setting the environment variable HOME.                        
复制代码

4.4 在文件名中使用通配符
===========================================
通过使用通配符可以让一个文件名包含很多文件。在makefile中,通配符是 *, ?, [...],和 Bourne shell 一样。例如,*.c 表示 在工作目录中所有扩展名字为 c 的文件。

开始于文件名的符号 ~ 也有特殊的含义。如果单独出现或后面跟一个斜线,它代表你的home 目录。

例如 ~/bin 代表 /home/you/bin 。 

如果 ~ 跟在一个单词后面,此单词代表了home 目录下的用户名。例如 ~john/bin 会扩展为 /home/john/bin。

在没有给每个用户分配 home 目录的系统(例如 MS-DOS 或者 MS-Windows),这个功能通过设置环境变量 HOME 来模拟。

 

后文待续



本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/09/19/2693103.html,如需转载请自行联系原作者

目录
相关文章
|
Linux C语言
make: gcc:命令未找到
make: gcc:命令未找到
make: gcc:命令未找到
|
C语言 C++ Perl
如何处理错误消息Please install the gcc make perl packages
如何处理错误消息Please install the gcc make perl packages
145 0