Hello, Chris Marusich <[email protected]> writes:
> Mathieu Lirzin <[email protected]> writes: > >> info_TEXINFOS = %D%/guix.texi >> >> +%C%_guix_TEXINFOS = \ >> + %D%/contributing.texi \ >> + %D%/fdl-1.3.texi > > Why is the %C% required here? What does it do? I read (automake) > Texinfo, so I understand that this is probably a way to tell Automake > that guix.texi depends on contributing.texi and fdl-1.3.texi, but I > don't understand why %C% is present in the variable name here. Indeed this is can be hard to grasp. A variable like ‘doc_foo_TEXINFOS’ declares the dependencies of ‘doc/foo.texi’ which must be declared in the special ‘info_TEXINFOS’ variable to be built with ‘makeinfo’. The transformation from ‘doc/foo_XXX’ to ‘doc_foo_XXX’ is required because only letters and underscores can be used for Make variables indentifier. This transformation is called canonalization [1]. Guix uses the inclusion of Makefile snippets instead of recursive Makefiles which are evil [2]. %D% and %C% are used to avoid having to be explicit about the current directory where the Makefile snippet is located. - %D% is a shorthand for %reldir% which is substituted with the dirname relative to the top level “Makefile.am”. - %C% is a shorthand for %canon_reldir% which is the canonalization of %reldir% [3]. HTH, [1] https://www.gnu.org/software/automake/manual/html_node/Canonicalization.html [1] https://ator1699.home.xs4all.nl/Work/GBS/Doc_and_download/2_RecursiveMakeConsideredHarmful.pdf [2] https://www.gnu.org/software/automake/manual/html_node/Include.html for -- Mathieu Lirzin GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
