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(-)

diff --git a/common-rules.mk b/common-rules.mk
index 2c5609f..03e01e6 100644
--- a/common-rules.mk
+++ b/common-rules.mk
@@ -30,50 +30,6 @@
 # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 
-plugins = \
-       curl \
-       data \
-       example1 \
-       example2 \
-       example3 \
-       example4 \
-       ext2 \
-       file \
-       guestfs \
-       gzip \
-       libvirt \
-       lua \
-       memory \
-       nbd \
-       null \
-       ocaml \
-       pattern \
-       perl \
-       python \
-       random \
-       ruby \
-       sh \
-       split \
-       streaming \
-       tar \
-       tcl \
-       vddk \
-       xz \
-       zero
-
-filters = \
-       blocksize \
-       cache \
-       cow \
-       delay \
-       error \
-       fua \
-       log \
-       nozero \
-       offset \
-       partition \
-       truncate
-
 plugindir = $(libdir)/nbdkit/plugins
 filterdir = $(libdir)/nbdkit/filters
 
diff --git a/configure.ac b/configure.ac
index 4d340d4..3a02c66 100644
--- a/configure.ac
+++ 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 \
+       example3 \
+       example4 \
+       ext2 \
+       file \
+       guestfs \
+       gzip \
+       libvirt \
+       memory \
+       nbd \
+       null \
+       pattern \
+       random \
+       split \
+       streaming \
+       tar \
+       vddk \
+       xz \
+       zero \
+        "
+plugins="$(echo $lang_plugins $non_lang_plugins | xargs -n1 | sort -u | xargs)"
+filters="\
+       blocksize \
+       cache \
+       cow \
+       delay \
+       error \
+       fua \
+       log \
+       nozero \
+       offset \
+       partition \
+       truncate \
+        "
+AC_SUBST([plugins])
+AC_SUBST([lang_plugins])
+AC_SUBST([non_lang_plugins])
+AC_SUBST([filters])
+
 dnl Produce output files.
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([nbdkit],
-- 
2.19.0.rc0

_______________________________________________
Libguestfs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to