ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
GNU build system - Wikipedia, the free encyclopedia

GNU build system

From Wikipedia, the free encyclopedia

Flow diagram of autoconf and automake, two tools in the GNU build system
Flow diagram of autoconf and automake, two tools in the GNU build system

The GNU build system, also known as the Autotools, is a suite of programming tools produced by the GNU project. These tools are designed to assist in making various source code packages portable to many Unix-like systems. The GNU build system is part of the GNU toolchain and is widely used in many free software and open source packages. While the tools comprising the GNU build system themselves are GPL-ed free software, there are no restrictions in using them in making non-free software portable.

Contents

[edit] Tools included in the GNU build system

The GNU build system comprises the GNU utility programs Autoconf, Automake, and Libtool. Other related tools frequently used with the GNU build system are GNU’s make program, GNU gettext, pkg-config, and the GNU Compiler Collection, also called GCC.

[edit] GNU Autoconf

Autoconf processes files (configure.in or configure.ac, though configure.ac is generally preferred[1]) to generate a configure script.

When running the generated configure script, other template files, customarily ending in ".in", such as Makefile.in, are processed to create their final output, in this case a Makefile.

Autoconf is used to attempt to work around the quirks found in various Unix-like operating systems. For example, some Unix-like systems may have certain facilities that are known to be broken or missing entirely. Autoconf creates a shell script which can detect these, and the program can work around them. The final output of the Autoconf utility is the configure script.

Autoconf comes with several auxiliary programs designed to ease the creation of configure.ac, such as the Autoheader tool, which is used to help manage C header files, autoscan, which can create an initial input file for Autoconf and ifnames, which can list C pre-processor identifiers used in the program.

[edit] GNU Automake

Automake helps to create portable Makefiles, which are in turn processed with the make utility. It takes its input as Makefile.am, and turns it into Makefile.in, which is used by the configure script to generate the file Makefile output.

[edit] GNU Libtool

Libtool helps manage the creation of static and dynamic libraries on various Unix-like operating systems. Libtool accomplishes this by abstracting the library creation process, hiding differences between various systems (e.g., GNU/Linux systems vs. Solaris).

[edit] Gnulib

Gnulib simplifies the process of making software that uses Autoconf and Automake portable to a wide range of systems.

[edit] Advantages of the GNU build system

The GNU build system provides an environment to a computer programmer which allows them to write cross-platform software (at least running on multiple Unix-like operating systems). It also makes the build process easier on the user, allowing the user to usually just run a small set of commands to build the program from its source code and install it.

The utilities used by the GNU build system are only required to be on the developer’s workstation, as well. Users do not need to have Autoconf, Automake, or Libtool in order to build or install software which was developed using them. This makes the GNU build system self-contained, requiring only standard Unix-like tools to build. This is accomplished by using shell scripts which help to configure the software for a given person’s operating system.

The utilities used in the GNU build system can also be used alone or together—a software project can use Autoconf, for example, without using Automake as well. However, the GNU build system’s components can interact with each other.

[edit] Limitations of the GNU build system

The GNU build system uses Bourne-compatible shell scripts to assist the user in the configuration and build process. However, some operating systems (such as the Microsoft Windows family of systems) cannot run Bourne shell scripts on their own. This makes building such software on the Windows operating system a bit harder than on a Unix-like system which provides the Bourne shell as a standard component. One can install the Cygwin or MSYS system on top of Windows to provide a Unix-like compatibility layer, though, allowing configure scripts to run. Cygwin also provides the GNU Compiler Collection, GNU make, and other software that provides a nearly complete Unix-like system within Windows; MSYS also provides GNU make and other tools designed to work with the MinGW version of GCC. Increasingly, cross-compiling software to run on a Windows host from a GNU/Linux or other Unix-like build system is also possible, using MinGW.

Projects which use the GNU build system may or may not provide a configure script within their Software Configuration Management systems (such as CVS or Subversion). If a project that uses the GNU build system does not have a generated ./configure file available for the user, the user must generate it. One possible way this can be done is to execute a series of commands at a shell prompt:

$ aclocal
$ autoconf
$ autoheader
$ automake

Not all of the commands may be necessary depending on how a given project uses the GNU build system, or more commands may be necessary. Another common convention is to provide a script, often named autogen.sh, that runs all the needed pre-build tools. In some cases, one can also use:

$ autoreconf

which automatically invokes the above commands as needed.

[edit] See also

[edit] References

[edit] Further reading

[edit] External links


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -