Honestly, I want to control, when is this sub-make rebuilt. To my largest surprise, any time if I use an include generated.sub.Makefile, it also tries to rebuild-it and then re-read my whole Makefile structure.
I do not want it. I know what is in generated.sub.Makefile, and I do not want it to be rebuilt, except if I say so. I do not want it to be rebuilt only because I included it.
The goal is, generated.sub.Makefile should be rebuilt always if I want to, and never if I explicitly did not command it.
Can I somehow do that?
generated.sub.Makefilerecipe doesn’t allow Make to determine whether it needs to be updated; could you edit your question to show that?$(error Please run a make something)to handle the case that it does not exist yet. It also gets the solution with it.somethingbecame a.PHONYtarget, creating alsogenerated.sub.Makefile, but there is no moregenerated.sub.Makefile:target. It can not be built. Ifmakewould really complain, then I would create a recipe for him from a singletouchcommand.makealone in itself was simply not the right tool. Been there a couple of times – generating figures for TeX documents, preparing data archives for compilation, packaging things for Python, doing different things depending on which version of Boost is installed on a system – and every single time I did things in Makefiles, I ended up discarding my complicated Makefiles and going for a specialized tool for the job.make's usefulness and should go back to using it as a build tool, not as a configure tool. It's simply not its job nor scope. Plus, the more advanced your usage, the less stable it is. (seriously, every GNU make release breaks smth).