[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#42022: --print-data-base should be unambiguous and more easily machi
From: |
Daniel Colascione |
Subject: |
bug#42022: --print-data-base should be unambiguous and more easily machine-read |
Date: |
Tue, 23 Jun 2020 08:43:30 -0700 |
User-agent: |
SquirrelMail/1.4.23 [SVN] |
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.
- bug#42022: --print-data-base should be unambiguous and more easily machine-read,
Daniel Colascione <=