From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Richard Henderson <rth@twiddle.net>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
qemu-devel@nongnu.org,
"Peter Crosthwaite" <crosthwaite.peter@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Cleber Rosa" <crosa@redhat.com>
Subject: [Qemu-devel] [PATCH 2/2] decodetree: Add multiple include guard
Date: Sat, 10 Nov 2018 22:13:13 +0100 [thread overview]
Message-ID: <20181110211313.6922-3-f4bug@amsat.org> (raw)
In-Reply-To: <20181110211313.6922-1-f4bug@amsat.org>
It is necessary when splitting an ISA, or when using multiple ISAs.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
scripts/decodetree.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index 0bc73b5990..5dea15e7a5 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -1030,7 +1030,11 @@ def main():
else:
output_fd = sys.stdout
+ hdr_guard = filename.split(os.path.sep)[-1].upper().replace('.', '_') + "_H"
+
output_autogen()
+ output('#ifndef ' + hdr_guard + '\n')
+ output('#define ' + hdr_guard + '\n')
for n in sorted(arguments.keys()):
f = arguments[n]
f.output_def()
@@ -1066,6 +1070,7 @@ def main():
t.output_code(4, False, 0, 0)
output('}\n')
+ output('#endif /* ' + hdr_guard + ' */\n')
if output_file:
output_fd.close()
--
2.19.1
next prev parent reply other threads:[~2018-11-10 21:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-10 21:13 [Qemu-devel] [PATCH for-4 0/2] decodetree: Support multiple inclusion Philippe Mathieu-Daudé
2018-11-10 21:13 ` [Qemu-devel] [PATCH 1/2] MAINTAINERS: Add scripts/decodetree.py to the TCG section Philippe Mathieu-Daudé
2018-11-11 11:27 ` Richard Henderson
2018-11-10 21:13 ` Philippe Mathieu-Daudé [this message]
2018-11-11 11:26 ` [Qemu-devel] [PATCH 2/2] decodetree: Add multiple include guard Richard Henderson
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=20181110211313.6922-3-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=crosa@redhat.com \
--cc=crosthwaite.peter@gmail.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).