Preface
This article is based on the translation of the first chapter of Autotools-a Practioner's Guide to GNU Autoconf, Automake, and Libtool, omitting some of the statements.
Body
As the preface says, the GNU Autotools is designed to make life easier for end users, not defenders. Even so, in the long run, using Autotools as a project manager will make your j
Most of the time, we are using ide to build our own small projects. Using IDE is sufficient for learning.
However, I gradually found that I could not satisfy myself by using IDE and found myself in a dilemma. Why?
First, the main starting point is to build a project by yourself.
Secondly, do you want to learn how to write makefile?
Third, are there any other options?
Learning makefile is fundamentally a good choice to learn how to organize and build a project. Is it really good?
When
Author:istoneE-mail:liul.stone@gmail.comdate:2015-09-19 15:16:38 One use Autotools toolset 1.1 what is Autotools
We all know the power of Make project manager. But writing makefile is not an easy thing to do, especially for a larger project. So, is there an easy way to generate makefile while at the same time allowing users to enjoy make the advantages of it. This autot
Transferred from: http://www.cnblogs.com/lcw/p/3159461.htmlPreface makefile can help make complete its mission, but admittedly, writing makefile is really not an easy task, especially for a larger project. So, is there an easy way to generate makefile and at the same time allow us to enjoy making the advantages? Autotools series of tools is precisely for this purpose, it just user input simple target file, dependent files, file directory, etc. can eas
generate makefile and at the same time allow us to enjoy making the advantages? This experiment to talk about Autotools series tools is designed for this, it just user input simple target file, dependent files, file directory, etc. can easily generate makefile, this is undoubtedly the vast number of users hope. In addition, these tools can also complete the collection of system configuration information, so as to easily handle a variety of portabilit
Writing makefile by hand is a very interesting thing, and for larger projects, it is a good thing if there are tools to do it. In the Linux system development environment, the GNU Autotools undoubtedly played this important role. (In a Windows system development environment, IDE tools, such as visual Studio, are also handy for managing projects.) )This article takes a simple project as an example to illustrate the use of a list of the GNU
In general, for small projects or toy programs, you can manually write Makefile. But for large projects, manually writing maintenance Makefile becomes a tedious and laborious task.This article describes the Autotools toolset that automatically generates Makefile files that conform to the Linux specification.If the reader does not have the Autotools toolset installed, the installation commands are as follows
About the use of Autotools
We know that under Linux if you compile a larger project, we can do it in a makefile way.
But, we have the egg ache, makefile has the complex grammatical structure, even lets the person be difficult to comprehend, when our project is very big, the maintenance makefile will become a very troublesome matter. So we have the Autotools tool, which is designed to generate makefile, w
Question: For more information about autotools-general Linux technology-Linux technology and application, see the following. I used autotools to generate the makefile file. In the/root/chap-2/autotools folder, there are two files: 2.7.main.c and 2.7.avg.c.
2.7.main.c:
/* Optional /*----------------------------------------------------------------------------------
In all the previous essays in my series, the software was installed and uninstalled using the Linux distribution's own package management tools (such as apt-get, yum, etc.), and never showed you how to use the source code to build the software yourself. But children's shoes, which have long been in the Unix/linux world, know that compiling and installing software from source code is not so difficult, generally three steps:Configure Make Make InstallThe ability to manage the source code is so s
Autotools is a series of tools, consisting mainly of autoconf, Automake, Perl locales, and M4, and contains 5 commands:
The following diagram is the flowchart used by Autotools:
installation of Autotools: apt-get Install autoconf automake autotools-dev M4
Autotools Use
Autotools is a series of tools that first confirm that your Ubuntu system has the following tools installed (can be viewed through the which command):
AclocalAutoScanAutoconfAutoheaderAutomake
Installation method:root@ubuntu:~# sudo apt-get install autoconf
Shown below:Reading Package List ... CompleteAnalyzing Dependency tree for PackageReading status information ... CompleteE: Unable to find package AutoScanThe following addit
C/C ++ makefile Automatic Generation Tool (comake2, autotools, linux), hoping to make a small contribution to open source !, Comake2autotoolsMakefile is essential for C or C ++ project development in linux, but it is very troublesome to write. Baidu has a comake2 tool used to automatically generate Makefile. I wanted to find a similar tool outside, but it was difficult to do so. I only found a similar intelligent generation tool,
GNU autotools will be considered as the ideal tool to manage Fortran project after creating a basic program structure by using Eclipse IDE. eclipse IDE is quite convenient for developing a simple project, however, only one target binary can be generated, I. e. A single binary executable or library. therefore, it is still not good enough to manage a large or a collaborated project in which a couple of binaries shoshould be generated with varous types,
Reprinted from http://blog.csdn.net/scucj/article/details/6079052
Collection
Writing makefile by hand is a very interesting thing, and for a relatively large project, if there is a tool to do it, it is a good thing. In the Linux system development environment, the GNU Autotools has undoubtedly played an important role. (in the development environment of Windows systems, IDE tools, such as visual Studio, are also handy for managing projects.) )
This a
Composition of Autotools Tools1, AutoScanAutoScan is used to scan the source code directory to generate Configure.san files, Configure.san contains the basic system configuration options, there are some macro definitions, we need to change its name to Configure.in2, AclocalAclocal is a Perl scripting program. Aclocal automatically generates ACLOCAL.M4 files based on the contents of the Configure.in file, and the resulting ACLOCAL.M4 file is a macro ex
Autotools is a series of tools. It mainly consists of Autoconf, automake, Perl language environment, and M4. It contains five commands:
(1) aclocal
(2) autoscan
(3) Autoconf
(4) autoheader
(5) automake
I. Prepare source code
This project has three source files: score. cpp, Sum. cpp, and average. cpp.
The content is as follows:
Score. cpp:
#include
Sum. cpp:
float Sum(float var[], int num){float sum = 0.0;for(int i=0; i
Average. cpp:
float Avera
Orderunder Linux C or C + + project development, Makefile is the necessary strength, but found handwriting is very troublesome. Baidu has a comake2 tool, used to automatically generate makefile tools, and in the outside of this wanted to find a similar tool, but found it difficult to do, only found a similar intelligent generation tool Autotools, but the operation is more troublesome, Ben " one person to learn, we share "principle, Manually wrote a to
Android system development (4) -- AutotoolsComposition 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.
2017.04.05GNU Autotools InstallationSeveral files are required to install AutotoolsAutomake,autoconf,m4The order of installation is M4-> autoconf-> automake (important)
To install the required commands:Tar zxvf * *./configureMakeMake install
Under Mac:Brew Install autoconfBrew Install Automake(not installed M4 also normal use)
Autotools UseThe source directory is as follows
Main.cpp
inc/test.h
src/test.cpp
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.