This article is a mirror article of machine translation, please click here to jump to the original article.

View: 11079|Reply: 0

[linux] Linux config/configure/Configure, make, make test/make check, sudo make in...

[Copy link]
Posted on 1/22/2016 4:39:42 PM | | |
These are typical installation steps for programs generated using GNU's AUTOCONF and AUTOMAKE
config/configure/Configure
This is used to detect the target characteristics of your mounting platform. For example, it will detect whether you have CC or GCC, not CC or GCC, it is a shell script
This step is generally used to generate a Makefile to prepare for the next compilation, and you can control the installation by adding parameters after configuring, such as:
./configure --prefix=/usr
The above means install the software under /usr
The executable is installed in /usr/bin (instead of the default /usr/local/bin)
The resource file will be installed in /usr/share (instead of the default /usr/local/share)
At the same time, you can configure the configuration files of some software by specifying the --sys-config= parameter
There are also parameters such as --with、--enable、--without、--disable, etc., which you can see in detail at ./configure --help
make
This step is used to compile, which reads instructions from the Makefile and then compiles
This step is compilation, and most source code packages are compiled through this step
Of course, some software written in Perl or Python requires calls to Perl or Python to compile
If an error occurs during the make process, you need to write down the error code (note that it's not just the last line), and then you can submit a bugreport to the developer (usually with a commit address in INSTALL), or your system has fewer dependencies, etc., which require you to carefully study the error code yourself
make test / make check
As the name suggests, this step is to check the previous step of make, to ensure that there are no errors in make, that is, all test and check in this step must be OK, and the error is 0
sudo make install
This step is used to install, which also reads instructions from the Makefile and installs it to the specified location
This command generally requires root privileges (because you want to write files to the system), so sudo is used in the front

AUTOMAKE and AUTOCONF are very useful things to use to publish C programs. If you also write programs and want to use AUTOMAKE and AUTOCONF, you can refer to the related articles on the CNGNU.ORG





Previous:12 lines of html web page code will make your computer crash and your phone restart in minutes
Next:SC Create creates a Windows system service
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com