GNU bug report logs - #42022
--print-data-base should be unambiguous and more easily machine-read

Previous Next

Package: emacs;

Reported by: "Daniel Colascione" <dancol <at> dancol.org>

Date: Tue, 23 Jun 2020 15:44:01 UTC

Severity: normal

Tags: notabug

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Daniel Colascione" <dancol <at> dancol.org>
To: bug-gnu-emacs <at> gnu.org
Subject: --print-data-base should be unambiguous and more easily machine-read
Date: Tue, 23 Jun 2020 08:43:30 -0700
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.





This bug report was last modified 4 years and 227 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.