On 2019-10-15 08:59, Robert P. J. Day wrote:
i'm not sure what to make of this since there is only one Makefile in play in this directory, and the docker container has its working directory set to this directory, and all of the targets being invoked are defined in the same Makefile.
It allows the containing file to re-invoke itself regardless of its name. Even if it is the only makefile in the directory, this would be required if its name isn't "dir.mk". It's also required if it does happen to be invoked from somewhere else. Basically this is using copy-and-paste boilerplate for "calculate my own name" to try to be strictly correct.
so, while adding "-f $(THIS_FILE)" to those make commands doesn't hurt, i can't see what value that adds.
The value is that it's "future-proof". Suppose things change so that the build system doesn't chdir into that directory to run that makefile. If that file tries to re-invoke itself as just $(MAKE), it will likely succeed by running the the wrong Makefile. Someone will have a lot of fun debugging that. _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make