Automatic program assembly tools

Are there any tools for automatically building programs, or do you have to write such scripts manually? For example, I have a project in C / C++, and here I would like to organize an assembly for it on, say, different virtual machines (for Windows and Unix platforms), preferably also with different compilers. Is there anything like this to satisfy my wishes?

Author: Alexshev92, 2018-10-14

3 answers

For Linux systems, the traditional set of such tools is called " autotools "(https://ru.wikipedia.org/wiki/Autotools). This set includes three main components:

  • make - a system for building groups of programs, managed by the Makefile
  • Autoconf - Configurator for the program assembly system
  • Automake - a utility for automatically creating files Makefile.in

Utility make automatically determines which parts of a large program should be recompiled, linked, and assembled, and performs all the necessary actions.

The Autoconf utility is designed to facilitate the description of the system configuration: the host machine on which the program is being built and the target machine on which the assembled program will be executed.

Automake is a utility for automatically creating files Makefile.in from files Makefile.am. Each file Makefile.am is actually a set of macros for the make program (sometimes with multiple rules). The files obtained in this way Makefile.in comply with the GNU Makefile standards.

This "holy trinity" is the de facto standard. Almost 100% of the programs intended for users to build, I have as part of the distribution Makefile. And the absence of it causes it... let's just say - perplexity.

Writing a Makefile to build a simple program is trivial.Unfortunately, despite all efforts, it was not possible to facilitate this process for no matter how complex programs consisting of many modules, libraries, etc.

Therefore, in recent years, the cmake program assembly system has become increasingly popular. It has quite a decent language for describing the build process and is available for mastering even by novice developers. There is, however, one subtlety - the result of cmake is still the same Makefile :-) But you no longer need to write it manually.

So if you are really going to make a product for Linux, I strongly recommend that you use cmake. There is a very good book in Russian:

"CMake project building system". Denis Vladimirovich Dubrov.

The work is devoted to the CMake tool, which is It is a modern system for describing software projects and has rich features. The tutorial contains enough material to create a using CMake projects with a complex structure that use external libraries or auxiliary developer tools.

 4
Author: Sergey, 2018-10-15 02:33:08

Of course, for example https://travis-ci.org/ or https://about.gitlab.com/. In general, it does not depend much on the language.

 1
Author: carl, 2018-10-14 16:20:36

Are there any tools for automatically building programs, or do you have to write such scripts manually?

Something exists, but some scripts will almost certainly have to be written (although they may be primitive, at the level of ./configere && make && make install). And also most likely you will have to [partially] create an environment for the build yourself. A good starting point for finding a particular software is probably the list in wikipedia, or just succumb to the influence of the name on the rumor and use travis ci, if there is no trust in the service, then you can run it locally.

Is there anything like this to satisfy my wishes?

All the wishes of any software at once is unlikely to satisfy, you will have to do something yourself, learn how to work with the software, but at least any software from the list should serve as a layer between the VCS and the build system, as well as help organize the build goals.

 1
Author: Fat-Zer, 2018-10-15 20:23:27