Android system development (4) -- Autotools

Source: Internet
Author: User
Tags perl script automake

Android system development (4) -- Autotools
Composition of Autotools

1. autoscan

Autoscan is used to scan the source code directory to generate the configure. san file. configure. san contains the basic options for system configuration, which are macro definitions. We need to change its name to configure. in.

2. aclocal

Aclocal is a perl script program. Aclocal automatically generates the aclocal. m4 file based on the content of the configure. in file. The generated aclocal. m4 file is a macro extension file.

3. autoconf

Autoconf is used to generate the configure file, configure. the in file contains some macros. These macros are processed by autoconf and become shell scripts that check system features, environment variables, and required software parameters.

4. autohead

Automatically generate config. h. in

5. automake

Use automake-add-missing to generate Makefile. in.

Document address: https://www.gnu.org/software/autoconf/manual/autoconf.html

Files used in preparing a software package for distribution, when using just Autoconf:

     your source files --> [autoscan*] --> [configure.scan] --> configure.ac          configure.ac --.                    |   .------> autoconf* -----> configure     [aclocal.m4] --+---+                    |   `-----> [autoheader*] --> [config.h.in]     [acsite.m4] ---'          Makefile.in

Additionally, if you use Automake, the following additional productions come into play:

     [acinclude.m4] --.                      |     [local macros] --+--> aclocal* --> aclocal.m4                      |     configure.ac ----'          configure.ac --.                    +--> automake* --> Makefile.in     Makefile.am ---'

Files used in processing a software package:

                            .-------------> [config.cache]     configure* ------------+-------------> config.log                            |     [config.h.in] -.       v            .-> [config.h] -.                    +--> config.status* -+               +--> make*     Makefile.in ---'                    `-> Makefile ---'
Autotools process demonstration 1. autoscan
Modify the configure. san file name to configure. ac or configure. in. Open the configuration and generate the makefile.
2. aclocal
Run the autoconf command to generate the configure executable file and create a new Makefile. am to edit the content.
bin_PROGRAMS = hellohello_SOURCES = hello.c
Install software
Run the make command and sudo make install
Go to/usr/local/bin and execute our Executable File hello
Generate a compressed package

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.