linux: make & autoconf & automake & autoreconf & aclocal

文章目录

  • 参考
  • make
    • 首先需要写一个makefile
      • Makefile
      • 包含的内容
    • target variable
    • 两步走
    • 语法
    • \
    • 规则定义
      • 操作
      • 隐式规则
    • 先决条件
      • order-only
      • force
      • FORCE
    • 变量
      • 变量的高级功能
      • 陷阱
      • 建议使用变量时,加括号/大括号
      • 变量的替换
      • $
      • $@
      • $<
        • 示例
      • vpath
      • 隐式变量
      • 全局变量
        • VPATH
    • 指令
      • 条件指令
      • ifeq
    • phony targets
    • default goal
    • 编译条件
    • 编译/制作步骤
    • 启动shell
      • 所以要使用oneshell 描述符
      • shell 选项设置
      • 传递$
      • 是由/bin/sh来完成
    • 内置函数
      • notdir
      • wildcard
      • patsubst
    • 并行编译
    • 不要隐式规则
    • 警告实例
      • warning: indentation may be non-portable
  • autoconf
    • M4sh
  • automake
  • configure

参考

http://savannah.gnu.org/projects/make/
https://blog.bazel.build/2017/03/21/design-of-skylark.html // Makefile 的确定

make

make及周边的工具可用自动根据时间条件(或者其他对应的条件)重新编译需要编译的单元,目标文件。
This manual describes GNU make, which was implemented by Richard Stallman and Roland McGrath. Development since Version 3.76 has been handled by Paul D. Smith.
GNU make符合IEEE1003.2-1992 (POSIX.2)标准的6.2章节。
make不只是可用用于c程序的编译,也可以对其他任何可用shell下运行的编译器,使用make工具。

make 实现的作用其实有一个潜在的功用,就是在于将一个项目源代码分成的所有模块,进行同步编译,就是一方有变,其他依赖方都需要做相应的重新编译。为实现软件分片编译提供方便。软件分模块,分片的原因是,软件规模变大之后,将所有的内容统统塞到编译器,需要分治。

Alfred的编译器-原理,技术࿰

你可能感兴趣的:(gcc,linux,build)