Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] sim: common: modernize gennltvals.sh
Date: Mon, 18 Jan 2021 12:13:00 -0500	[thread overview]
Message-ID: <YAXBnNbe2d26CB1J@vapier> (raw)
In-Reply-To: <f526105a-cd7b-93fe-b9e1-db71d658f4d3@polymtl.ca>

On 18 Jan 2021 09:04, Simon Marchi wrote:
> On 2021-01-17 5:10 a.m., Mike Frysinger via Gdb-patches wrote:
> > It's not 1996 anymore, so stop writing shell code like it is, and
> > rewrite it with modern POSIX shell standards.  This makes it much
> > more user friendly.
> > 
> > Then regenerate the file with latest newlib sources to verify.
> > 
> > 	* Makefile.in (headers): Change args to gennltvals.sh.
> > 	* gennltvals.sh: Rewrite from scratch.
> > 	* gentvals.sh: Delete.
> > 	* nltvals.def: Regen.
> 
> I suggest running shellcheck on the file an fixing what it complains about.

i had run shellcheck and the only warnings (about unquoted expansion)
i didn't think we worth fixing because of the limited scope of the
script.  the variable in question isn't accepting user input, it's
operating on fixed inputs, and if we restrict ourselves to POSIX
shell (which i think we do), then our options are limited, and imo
the alternatives make it harder to read/understand.

i debated writing this in python3, but that seems even less uncommon
in the tree as a build tool.
-mike

  reply	other threads:[~2021-01-18 17:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-17 10:10 Mike Frysinger via Gdb-patches
2021-01-17 10:36 ` [PATCH] sim: common: delete configure & Makefile Mike Frysinger via Gdb-patches
2021-01-18 10:01   ` Andrew Burgess
2021-01-18 10:00 ` [PATCH] sim: common: modernize gennltvals.sh Andrew Burgess
2021-01-18 17:09   ` Mike Frysinger via Gdb-patches
2021-01-18 14:04 ` Simon Marchi via Gdb-patches
2021-01-18 17:13   ` Mike Frysinger via Gdb-patches [this message]
2021-01-18 17:19     ` Simon Marchi via Gdb-patches
2021-01-18 17:52       ` Mike Frysinger via Gdb-patches
2021-01-18 18:08         ` Simon Marchi via Gdb-patches
2021-01-18 21:15           ` Mike Frysinger via Gdb-patches
2021-01-18 21:27             ` Simon Marchi via Gdb-patches
2021-01-20 19:51             ` Tom Tromey
2021-01-18 17:20 ` [PATCH v2] " Mike Frysinger via Gdb-patches

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=YAXBnNbe2d26CB1J@vapier \
    --to=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    --cc=vapier@gentoo.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox