I am working on linux binutils-2.29.
In the parent directory there is not Makefile.am
, but in all the sub directories there is Makefile.am
.
In the parent directory these are the Makefiles present:
Makefile Makefile.def Makefile.in Makefile.tpl
In side Makefile.tpl
there is a comment which says Makefile
is generated from Makefile.tpl
by autogen Makefile.def
but inside subdirectories there is not Makefile.def
, when I run autoreconf && automake
it generates Makefile
from Makefile.am
What exactly is the difference between Makefile.def
and Makefile.am
?
Let's look at GCC, large project which is using
binutils
as well. Quoting Regenerating GCC Configuration:So the difference is really about how and where you want to store parts of the input files that
autogen
will work on. In case of GCC, itMakefile.tpl
stores a template (for generating the output Makefile, whereasMakefile.def
stores definitions, which will be used by autogen.For example, inside
Makefile.tpl
you will find this template for fillingHOST_LIB_PATH
variable (note it useshost_modules
variable):And inside
Makefile.def
there is a definition forhost_modules
: