Follow-up Comment #11, bug#64571 (group make): Tim Murphy had a proposal and even a patch to generate JSON, posted to bug-make a few weeks ago: https://lists.gnu.org/archive/html/bug-make/2023-12/msg00027.html
Overall I like JSON but I'm not convinced it will be as helpful for this situation. The problem with JSON is that (a) it requires special tools to parse it, you can't do it with traditional POSIX tools like sed or sh, (b) these tools (like jq for example) are not part of most standard systems and so can't be relied on to exist everywhere, and (c) jq, at least, is somewhat tricky to use correctly especially if you want to do matching etc. The last point is not that bad since someone who is proficient with jq will presumably create some bash completion script one time then everyone will use it, but the first two are problematic: it would not be popular to force systems to install jq if they wanted GNU Make command completion for example. Regarding how -p manages remaking makefiles, this is not an issue because -p already doesn't inhibit builds (that is when you add -p make will still do all its normal builds). That's why people often use -np (the -n inhibits normal builds). So if you ask what -n does regarding remaking makefiles, it will normally rebuild them; the -n option doesn't prevent ALL commands from running: it will for example run any command that is prefixed with "+" or contains the string "$(MAKE)" (or "${MAKE}") so that even when you run with -n you still invoke sub-makes to see what they would have built. So, unfortunately I don't think we can look to either -p or -n for help in deciding how to handle this situation. Regarding a putative --format option, I don't think it needs to do every single thing immediately but it should at least be clear how it might be extended to support new facilities in the future. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64571> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/