【问题标题】:What does this ($<) do in makefiles?这个 ($<) 在 makefile 中有什么作用?
【发布时间】:2015-07-12 15:45:23
【问题描述】:

你好,这个命令是做什么的?

 $<

我无法通过阅读 GNUmakefile 手册来理解它。因此我请你帮忙。提前谢谢!

【问题讨论】:

标签: makefile


【解决方案1】:

$

例如:

如果您正在尝试编译文件 abc.cpp:

abc.o: abc.cpp abc.h
    g++ -c $< -o abc.o

$

http://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html#Automatic-Variables

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-16
    • 1970-01-01
    • 1970-01-01
    • 2011-09-29
    相关资源
    最近更新 更多