第 25 章 Build tool

简介:

25.1. make - GNU make utility to maintain groups of programs

Makefile

$ sudo apt-get install make
		

使用make命令测试

25.1.1. autoconf - Generate configuration scripts

autoconf

$ sudo apt-get install autoconf
			

automake

$ sudo apt-get install automake
			

example

过程 25.1. autoconf and automake step by step

  1. create directory

    % mkdir devel
    % cd devel
    % mkdir hello
    % cd hello
    					

    create a file

    vim hello.c
    
      #include
      int main(int argc, char** argv)
      {
      printf(``Hello, GNU!\n'');
      return 0;
      }
    					
  2. autoscan

    neo@debian:~/workspace/devel/hello$ autoscan
    neo@debian:~/workspace/devel/hello$ ls
    autoscan.log  configure.scan  hello.c
    					
  3. configure.in

    cp configure.scan configure.in
    
    neo@debian:~/workspace/devel/hello$ aclocal
    neo@debian:~/workspace/devel/hello$ autoconf
    neo@debian:~/workspace/devel/hello$ ls
    autom4te.cache  autoscan.log  configure  configure.in  configure.scan  hello.c
    					
  4. Makefile.am

    neo@debian:~/workspace/devel/hello$ vim Makefile.am
    neo@debian:~/workspace/devel/hello$ cat Makefile.am
    AUTOMAKE_OPTIONS= foreign
    bin_PROGRAMS= hello
    hello_SOURCES= hello.c
    neo@debian:~/workspace/devel/hello$
    					

    $ automake --add-missing
    configure.in: no proper invocation of AM_INIT_AUTOMAKE was found.
    configure.in: You should verify that configure.in invokes AM_INIT_AUTOMAKE,
    configure.in: that aclocal.m4 is present in the top-level directory,
    configure.in: and that aclocal.m4 was recently regenerated (using aclocal).
    automake: no `Makefile.am' found for any configure output
    automake: Did you forget AC_CONFIG_FILES([Makefile]) in configure.in?
    			



原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
3月前
|
缓存 iOS开发
Flutter run出现No Provisioning Profile was found for your project‘s Bundle Identifier or your device
Flutter run出现No Provisioning Profile was found for your project‘s Bundle Identifier or your device
44 2
|
Android开发 开发工具 IDE
Android gradle问题解决: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat
1. 问题描述: Android Studio在运行模拟器某些机型或者真机某些机型的时候发生闪退。 错误如下: Java.lang.RuntimeException: Unable to start activity ComponentInfo{com.
2363 0
|
6月前
target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target S
target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target S
98 0
|
6月前
解决运行qmake:Project ERROR: Cannot run compiler ‘cl‘. Output:
解决运行qmake:Project ERROR: Cannot run compiler ‘cl‘. Output:
673 0
|
开发工具
Failed to find Build Tools revision 25.0.2
Failed to find Build Tools revision 25.0.2
126 0
|
Android开发
Migrate Project to Gradle? This project does not use the Gradle build system
Migrate Project to Gradle? This project does not use the Gradle build system
102 0
|
开发工具 Android开发
Failed to find Build Tools revision 28.0.3
Failed to find Build Tools revision 28.0.3
307 0
Failed to find Build Tools revision 28.0.3
|
API 开发工具 Android开发
Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
951 0
Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
|
Java API Kotlin
Gradle Writing Build Scripts
The Gradle build language Gradle 构建语言 Gradle 提供了一种领域特定语言(DSL)来描述构建,这种构建语言在 Groovy 和 Kotlin 都可以使用。 Groovy 构建脚本可以包含任何 Groovy 语言元素。 Kotlin 构建脚本可以包含任何 Kotlin 语言元素。 Gradle 假设每个构建脚本都使用 UTF-8进行编码。
134 0
dpkg-checkbuilddeps: error: Unmet build dependencies: build-essential:native
dpkg-checkbuilddeps: error: Unmet build dependencies: build-essential:native
739 0