I have a following problem. Basically I have a really long Makefile which calls many complex commands. It uses environment variables, methods included from other Makefiles, really hard to read bash magic. So for example I have a command (cannot put the real one here, sorry) like this:
foo ${bar} (sort ...) [...]
I am analysing this Makefile and I want to know what exactly gets executed when I run it. The thing I want to achieve is this command in a text representation, so all the stuff gets evaluated and I can actually see what exactly is being executed like gcc something -Isomethingmore
(so the command foo ${bar} (sort ...) [...]
actually means gcc something -Isomethingmore
) etc. Is there a way to do that? So I can for example echo it and see what am I dealing with?