bug#42022: --print-data-base should be unambiguous and more easily machine-read

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#42022: --print-data-base should be unambiguous and more easily machine-read

Daniel Colascione-5
It's occasionally useful to parse the output of make --print-data-base,
e.g., for tab completion. Unfortunately, the current (well, 4.2, but I
don't see that it's changed in 4.3) output format prints newlines in
variable definitions verbatim, making it possible for variable contents to
appear (from the point of view of a --print-data-base output parser) to be
makefile directive. For example:

# Begin spoof.mk
define nl


endef
spoof:=$(nl)$(nl)\# Files$(nl)$(nl)foo: bar$(nl)
# End spoof.mk

Make should emit variable variables in a form that cannot be confused with
makefile directives.




Reply | Threaded
Open this post in threaded view
|

bug#42022: --print-data-base should be unambiguous and more easily machine-read

Noam Postavsky
"Daniel Colascione" <[hidden email]> writes:

> It's occasionally useful to parse the output of make
> --print-data-base, e.g., for tab completion.  Unfortunately, the
> current (well, 4.2, but I don't see that it's changed in 4.3) output

I guess this report is intended for GNU Make, you can create it at
https://savannah.gnu.org/bugs/?func=additem&group=make