I am trying to decompose a make build system of a very large code base however I am unable to see every command the make invokes because it calls various make files in numerous directories outside of the current directory. I followed this answer and various other ones Making make print commands before executing when NOT using CMake
Though the above yielded some advancement and was quite illuminating it was not the home run I need. It offers solutions to see the commands that make invokes. Which is better than great. However, the issue is the various sub make commands that are invoked thereafter. I only see those commands as printed with no additional information of what is occurring sub make. I tried to alias make such that
alias make='make SHELL='\''/bin/bash -x'\'''
# or
alias make='make -n'
However the above fail to replace the invoked make commands with the alias. Is there another way I can dissect a large code base make build system out there?
> make
rmdir --ignore-fail-on-non-empty /somefolder* 2> /dev/null; true
cd /someotherfolder/; make cur-dir=somefolder dirs-to-build=somemorefolders/ env_variable another_variable someMakeRule # no output from this make
make TARGET=someTarget env_variable gdbinit source_dir someMakeRule; # no output from this make
# ...
# output from first top makefile
# ...
make[1]: Nothing to be done for 'someMakeRule'.