For building a program from C-language source how are the rules and
rule's recipes in makefile specified if latter one is generated by
autotools in standard way?
The Autotools are designed to implement the GNU coding standards as they apply to build systems, as described, with links, in the Automake manual. There is separate documentation for the coding standards, including the standard user-facing targets that Makefiles are expected to provide. Automake provides these.
Additionally, Automake documents some targets intended for use as extension points by developers. Automake variously either provides these or uses them if the developer provides them.
Also, Automake provides a rule for each target you specify to it explicitly in your Makefile.am
. You can use these freely in a non-recursive build system, but YMMV if your build system is recursive.
Of course, Autotools makefiles contain many more targets than those, but their names should be considered implementation details. All of the rule recipes are implementation details, too, though you can predict a lot about some of them from the documentation of the various Automake variables and how they work. If you're curious, then how about looking at a generated Makefile.in
or Makefile
?
Are these two separate rules one for compiling another one for
linkage?
From the fact that building a project with an Autotools-based build system generates not just the ultimate target but also an object file for each source file, we can determine that, at least in current versions of the Autotools, indeed there are both rules for compiling sources to object files and rules for linking objects together into executables and / or libraries. Again, you could also just look at a generated Makefile
[.in
].
Recipes of what form exactly do autotools apply?
The specifics are not documented, and may, in principle, vary somewhat between versions of Automake. But again, you can infer a lot from the variables, and you can always generate an example to study.
I haven't found these specifications in automake manual. However
rule-target pairs for some other programing languages are pretty well
specified in that manual.
The main place in which the AutoMake manual discusses specific provisions for particular languages is in chapter 8, Building Programs and Libraries. The first several sections describe how things work in general and for C, the Autotools' standard target language, and then there are several sections describing provisions for other supported languages. The manual actually does specify the form of the build rules used for Fortran 77 and Fortran 95 sources, but it's not clear why. In any case, those are exceptions. Similar is not provided for other languages.
In other words where is specified how makefiles generated by autotools
build programs from C-sources, under assumptions as pointed out above?
The specific form of the build rules for C sources is not documented, but in a more general sense, this is the subject of chapters 2 - 4 and much of chapter 8 of the manual.