All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] allow to build with older sed
Date: Fri, 19 Jan 2018 09:28:08 +0000	[thread overview]
Message-ID: <20180119092808.GC16798@redhat.com> (raw)
In-Reply-To: <5A61B1CB02000078001A0368@prv-mh.provo.novell.com>

On Fri, Jan 19, 2018 at 12:52:27AM -0700, Jan Beulich wrote:
> sed's -E option may not be supported by older distros. As there's no
> point using sed here at all, use just shell mechanisms to establish the
> variable values, starting from the stem instead of the full target.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>

> --- a/Makefile
> +++ b/Makefile
> @@ -242,8 +242,7 @@ GENERATED_FILES += $(KEYCODEMAP_FILES)
>  
>  ui/input-keymap-%.c: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs
>  	$(call quiet-command,\
> -	    src=$$(echo $@ | sed -E -e "s,^ui/input-keymap-(.+)-to-(.+)\.c$$,\1,") && \
> -	    dst=$$(echo $@ | sed -E -e "s,^ui/input-keymap-(.+)-to-(.+)\.c$$,\2,") && \
> +	    stem=$* && src=$${stem%-to-*} dst=$${stem#*-to-} && \
>  	    test -e $(KEYCODEMAP_GEN) && \
>  	    $(PYTHON) $(KEYCODEMAP_GEN) \
>  	          --lang glib2 \

Clever ! I was hoping someone might suggest a cleaner approach one day

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  reply	other threads:[~2018-01-19  9:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19  7:52 [Qemu-devel] [PATCH] allow to build with older sed Jan Beulich
2018-01-19  9:28 ` Daniel P. Berrange [this message]
2018-01-19 12:13   ` Philippe Mathieu-Daudé
2018-01-19 14:37 ` Eric Blake

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=20180119092808.GC16798@redhat.com \
    --to=berrange@redhat.com \
    --cc=JBeulich@suse.com \
    --cc=qemu-devel@nongnu.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 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.