all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Daniel Colascione" <dancol@dancol.org>
To: 42022@debbugs.gnu.org
Subject: bug#42022: --print-data-base should be unambiguous and more easily machine-read
Date: Tue, 23 Jun 2020 08:43:30 -0700	[thread overview]
Message-ID: <e27325cf2480fe3ac17f58b7369892f4.squirrel@dancol.org> (raw)

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	other threads:[~2020-06-23 15:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23 15:43 Daniel Colascione [this message]
2020-06-24 13:34 ` bug#42022: --print-data-base should be unambiguous and more easily machine-read Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e27325cf2480fe3ac17f58b7369892f4.squirrel@dancol.org \
    --to=dancol@dancol.org \
    --cc=42022@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.