`
dirkxu
  • 浏览: 6146 次
  • 性别: Icon_minigender_1
  • 来自: 南京
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

[cheat sheet] Make

阅读更多

1.

#comments

 

2.

#variable assignments

var1=val1

 

3.

#variable reference

$(var1)

 

#dereference a variable

$$(var1)

 

4.

#rules

target : dependency1 denpendency2 ... dependencyN

 

5.

<tab> command

 

Normally, when make encounters a command that returns a nonzero status code to the shell, it will stop execution and display an error message—but if you use a leading dash, it will just
ignore the error and continue.

 

<tab> -command

 

A command prefixed with an at sign tells make not to perform its normal behavior of printing the command to the stdout device as it executes it.

<tab> @command

 

6. 

make executes each command in a separate shell, so we need run many commands in the same shell via a trailing backslash, be sure that there are no spaces or other invisible characters after it.

foo: bar.c

    sources=bar.c; \
    gcc -o foo $${sources}

 

7.  

Variables referenced in commands are bound to their value when make start a shell for execution.

 

...
mytarget=foo
$(mytarget): $(mytarget).c
    gcc -o $(mytarget) $(mytarget).c
    
mytarget=bar
...

 

equals

 

...
foo: foo.c
    gcc -o bar bar.c
...

  

8.

automatic variables

$@ - the full target name of the current target

 

9.

implicit rule

 

10.

phony target is a target which is  not file. E.g., all, clean.

 

分享到:
评论

相关推荐

    Windows10常用快捷键 cheat sheet

    A list of Windows 10 keyboard shortcuts to make your life easier. Though the mouse is an essential tool, sometimes keyboard shortcuts make life much easier, allowing you to immediately access what you...

    Machine Learning Performance Improvement Cheat Sheet

    This cheat sheet contains my best advice distilled from years of my own application and studying top machine learning practitioners and competition winners. With this guide, you will not only get ...

    ACM-CheatSheet:ACM-ICPC模板

    设定自行配置xelatex编译环境CheatSheet.sty :修改latex的相关CheatSheet.sty CheatSheet.tex :修改Title或Owner Information部分的信息settings.py :请在此文件中添加其他代码语言运行make build执照演示版

    Data Wrangling with JavaScript

    With a growing ecosystem of tools and libraries available, and the flexibility to run on many...Appendix A JavaScript cheat sheet Appendix B Data-Forge cheat sheet Appendix C Getting started with Vagrant

    cmdliner-cheatsheet:备忘单,用于使用cmdliner将命令行选项添加到OCaml程序

    $ make $ make test $ ./bin/cmdliner-demo-arg --help $ ./bin/cmdliner-demo-arg # try with some options $ ./bin/cmdliner-demo-subcmd $ ./bin/cmdliner-demo-subcmd subcmd1 # try with some options 特定...

    git-cheat-sheet:Git工作表中包含最需要的东西。

    Git表表Git Sheet包含最需要的东西的表...Gitlab导游GitLab:Versionskontrolle中的Einstieg(Webinar vom 16. Mai 2018) 快速行动吉特没有.git文件夹的初始化仓库git init命令行备忘单“下游”和“上游”的定义In ...

    QGIS-cheat-sheet:PyQgis备忘单

    QGIS 3 此存储库已作为正式的新部分集成。 新的片段将被添加到官方存储库中。 欢迎捐款!...Make your changes. Commit your changes to the new branch. Send a pull request. [:copyright:All4gis 2018]

    search engine optimization for dummies

    Complete with a tear-out cheat sheet and information about Web sites you may want to hit for even more information, Search Engine Optimization For Dummies will help you make the Web site hit list.

    Intro to vi.pdf

    sheet" method, this tutorial aims to make you a proficient vi user without requiring a huge time commitment. You'll quickly learn how to move around, edit text, use insert mode, copy and paste text, ...

    掌控习惯图书中的习惯养成模板.rar

    The Habits Cheat Sheet Media: Images and Figures Key Questions and Answers Endnotes Templates Habits Scorecard Template Implementation Intentions Template Habit Stacking Template Habit Tracker...

    Emoty-crx插件

    语言:日本語 Chrome的emoji-cheet-纸张。 单击EMOJI,它将被复制到您的剪贴板。 更改日志 v 2.0.0.... 提高性能 原件:http://www.emoji-cheat-sheet.com/ repo:https://github.com/hrysd/emoty. 作者:@hrysd

    R Packages

    sometimes be a bit cryptic, so I provide a comprehensive cheat sheet to help you convert warnings to actionable insight. Chapter 15, Releasing a Package The life cycle of a package culminates with ...

    radium:radium是一个平台(客户端和可选服务器),用于查看参考文章,备忘单,摘要等

    只需在源目录中运行make命令即可将二进制文件构建并安装到$GOPATH/bin目录中。 如果您只想构建二进制文件,请运行make build跑步您可以运行radium --help来查看可用命令的列表。从命令行查询radium query " append ...

    visual-scala-reference:Visual Scala参考

    Visual Scala参考 出色的可视化指南,介绍了一些最常见的Scala功能。 发展历程 本指南使用作为渲染引擎。 要在本地计算机上启动服务器,只需启动以下命令: ...$ make 它将.tex文件转换为.svg图像。

    stat-cookbook:概率和统计食谱

    包含概率论和统计中各种主题的简洁表示。 它提供了简化到其本质的全面数学参考,而不是旨在... make 这首先通过 R 生成分布图,然后编译 LaTeX 源。 您可能需要通过 CRAN 安装一些缺少的软件包。 执照 这项工作是根据。

    jQuery 1.5 API 中文版

    jQuery 1.5 API Cheat Sheet来源 Selectors Basics #id element .class, .class.class * selector1, selector2 Hierarchy ancestor descendant parent &gt; child prev + next prev ~ siblings Basic Filters :first :...

Global site tag (gtag.js) - Google Analytics