zoukankan      html  css  js  c++  java
  • 标准make变量 MAKE_VERSION, CURDIR

    在 Makefile 中经常会用到一些内置的标准变量。下面说明:

    1. MAKE_VERSION
    make 命令的版本号,也就是执行 make -v 时看到的版本号。

    2. CURDIR
    当前的工作目录,一般的就是 Makefile 所在的目录。确切的说,应该是 make 执行时此进程所在目录。

    如果在 make 中使用 --directory 或 -C 参数指定目录,那么 make 就会切换到所指定的目录去寻找 Makefile 文件。比如在当前 Makefile 所在的目录下还有一个 include 的子目录,里面有一 Makefile 文件,我们用 --directory 或 -C 参数来执行这个 Makefile 文件:

    [root@centos Makefile]# pwd
    /root/Makefile
    [root@centos Makefile]# ls
    include  Makefile
    [root@centos Makefile]# ls include/
    Makefile
    [root@centos Makefile]# cat include/Makefile

    all:
            @echo "Hi, I am hear"
    [root@centos Makefile]# make -C include
    make: Entering directory `/root/Makefile/include'
    Hi, I am hear
    make: Leaving directory `/root/Makefile/include'

    原文:http://www.groad.net/bbs/thread-3098-1-1.html

  • 相关阅读:
    position笔记
    IFE-33笔记
    IFE-31 笔记
    selectedIndex
    iFE-30 笔记
    基于select的python聊天室程序
    python select网络编程详细介绍
    (转载)centos yum源的配置和使用
    python 多进程使用总结
    python迭代器实现斐波拉契求值
  • 原文地址:https://www.cnblogs.com/qiangupc/p/3736471.html
Copyright © 2011-2022 走看看