On Tue, Sep 11, 2018 at 02:13:03PM -0500, Eric Blake wrote:
On 9/11/18 1:47 PM, Richard W.M. Jones wrote:
>It's easier to get it to other places if it starts out in the
>configure script.
>
>Also split the list into language and non-language plugins.
>---
> common-rules.mk | 44 ----------------------------------------
> configure.ac | 53 +++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 53 insertions(+), 44 deletions(-)
>
>+++ b/configure.ac
>@@ -542,6 +542,59 @@ AC_ARG_ENABLE([vddk],[
> [enable_vddk=yes])
> AM_CONDITIONAL([HAVE_VDDK], [test "x$enable_vddk" = "xyes"])
>+dnl List of plugins and filters.
>+lang_plugins="\
>+ lua \
>+ ocaml \
>+ perl \
>+ python \
>+ ruby \
>+ sh \
>+ tcl \
>+ "
>+non_lang_plugins="\
>+ curl \
>+ data \
>+ example1 \
>+ example2 \
Inconsistent spacing (space-vs-tab doesn't matter in this particular
context, but it looks weird to use both)
Ooops. Wasn't visible in emacs, but I can fix that next time.
>+ "
>+plugins="$(echo $lang_plugins $non_lang_plugins | xargs -n1 | sort -u |
xargs)"
Your use of xargs as a reformatter is interesting ;) Could also be spelled:
$(echo $lang_plugins $non_lang_plugins | tr -s ' \t\n' ' ' | sort -u
| tr ' ' '\n')"
but that's longer to type, so your version is fine.
This one actually came from stackoverflow:
https://stackoverflow.com/a/8802788
I wanted something that would work on BSD (although I didn't test it
yet ...)
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html