As the number of UNIX variants increased, it became harder to write programs which could run on all variants. Developers frequently did not have access to every system, and the characteristics of some systems changed from version to version. The GNU configure and build system simplifies the building of programs distributed as source code. All programs are built using a simple, standardised, two step process. The program builder need not install any special tools in order to build the program.
The configure shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a Makefile in each directory of the package.
The simplest way to compile a package is:
- cd to the directory containing the package's source code.
- Type ./configure to configure the package for your system.
- Type make to compile the package.
- Optionally, type make check to run any self-tests that come with the package.
- Type make install to install the programs and any data files and documentation.
- Optionally, type make clean to remove the program binaries and object files from the source code directory
The configure utility supports a wide variety of options. You can usually use the --help option to get a list of interesting options for a particular configure script.
The only generic options you are likely to use are the --prefix and --exec-prefix options. These options are used to specify the installation directories.
The directory named by the --prefix option will hold machine independent files such as documentation, data and configuration files.
The directory named by the --exec-prefix option, (which is normally a subdirectory of the --prefix directory), will hold machine dependent files such as executables.
随着 UNIX 变种系统的增加,跨平台编程变得困难。GNU 构建系统简化了源码包的构建流程,通过标准化的配置和构建步骤,使得开发者能够轻松地为不同系统编译软件。该系统包括一个 shell 脚本 configure,用于猜测编译时所需的系统依赖变量,并创建 Makefile。用户只需简单几步即可完成安装。
1万+

被折叠的 条评论
为什么被折叠?



