I set the variable in makefile as follows:
SOMEVAR = foo
This makefile includes another makefile in which the actual creation of the programs takes place:
include generic/Makefile.common
Thus, no assembly targets are defined in the first makefile , they only set variables, which are then used by a common common makefile to actually build the package.
Now I know that I have to be careful when using foo , so to remind myself of this, I want to print a warning message whenever this makefile is used to configure the make process. The problem is that I cannot just insert the echo command after the variable is defined, because we have not built anything there yet.
Is there a solution (more elegant than adding a fake target where the message is printed, which will break the separation of installation and building variables)?
warnings makefile
fuenfundachtzig
source share