zoukankan      html  css  js  c++  java
  • Makefile 知识点

    $@

    $@ is the name of the target.

    $?

    The $? macro stores the list of dependents more recent than the target (i.e., those that have changed since the last time make was invoked for the given target).

    $^

    $^ gives you all dependencies, regardless of whether they are more recent than the target. Duplicate names, however, will be removed. This might be useful if you produce transient output (such as displaying a result to the screen rather than saving it to a file).

    $+

    $+ is like $^, but it keeps duplicates and gives you the entire list of dependencies in the order they appear.

    $<

    If you only need the first dependency, then $< is for you. Using $< can be safer than relying on $^ when you have only a single dependency that needs to appear in the commands executed by the target. If you start by using $^ when you have a single dependency, if you then add a second, it may be problematic, whereas if you had used $< from the beginning, it will continue to work. (Of course, you may want to have all dependencies show up. Consider your needs carefully.)

    如果你想得到第二个依赖:

    echo $(word 2,$^)

    一般情况下,把第一个依赖过滤掉:

    echo $(filter-out $<,$^)
  • 相关阅读:
    Oracle 12C 在 Oracle Linux 6.5 64Bit 安装手册
    OWI之db file sequential read
    OWI之db file scattered read
    Linux监控脚本
    Java中的空值判断
    Java中的java.math.BigInteger
    Java中用正则表达式找出数字
    Java中的StringBuffer
    JAVA String.format 方法使用介绍
    Java中对整数格式化
  • 原文地址:https://www.cnblogs.com/welhzh/p/3798984.html
Copyright © 2011-2022 走看看