[libvirt PATCH 024/351] meson: add include directory

Pavel Hrdina phrdina at redhat.com
Thu Jul 16 09:54:20 UTC 2020


Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 Makefile.am                 |  2 +-
 configure.ac                |  3 +--
 include/libvirt/Makefile.am | 26 --------------------------
 include/libvirt/meson.build | 36 ++++++++++++++++++++++++++++++++++++
 include/meson.build         |  3 +++
 meson.build                 |  2 ++
 6 files changed, 43 insertions(+), 29 deletions(-)
 delete mode 100644 include/libvirt/Makefile.am
 create mode 100644 include/libvirt/meson.build
 create mode 100644 include/meson.build

diff --git a/Makefile.am b/Makefile.am
index 82ccbac6f91..6df2176364a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,7 +20,7 @@
 # so force it explicitly
 DISTCHECK_CONFIGURE_FLAGS = --enable-werror
 
-SUBDIRS = . include/libvirt src tools docs \
+SUBDIRS = . src tools docs \
   tests po examples
 
 XZ_OPT ?= -v -T0
diff --git a/configure.ac b/configure.ac
index cb1aed73828..07b86d8b944 100644
--- a/configure.ac
+++ b/configure.ac
@@ -689,7 +689,7 @@ m4_if(m4_version_compare([2.61a.100],
 AC_CONFIG_FILES([run],
                 [chmod +x,-w run])
 AC_CONFIG_FILES([\
-        Makefile src/Makefile include/libvirt/Makefile docs/Makefile \
+        Makefile src/Makefile docs/Makefile \
         .color_coded \
         .ycm_extra_conf.py \
         libvirt.pc \
@@ -701,7 +701,6 @@ AC_CONFIG_FILES([\
         src/libvirt-lxc.pc \
         libvirt.spec mingw-libvirt.spec \
         po/Makefile \
-        include/libvirt/libvirt-common.h \
         examples/Makefile \
         tests/Makefile \
         tools/Makefile])
diff --git a/include/libvirt/Makefile.am b/include/libvirt/Makefile.am
deleted file mode 100644
index e447a5d37da..00000000000
--- a/include/libvirt/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-## Copyright (C) 2005-2011, 2013-2016 Red Hat, Inc.
-##
-## This library is free software; you can redistribute it and/or
-## modify it under the terms of the GNU Lesser General Public
-## License as published by the Free Software Foundation; either
-## version 2.1 of the License, or (at your option) any later version.
-##
-## This library is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## Lesser General Public License for more details.
-##
-## You should have received a copy of the GNU Lesser General Public
-## License along with this library.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-virincdir = $(includedir)/libvirt
-
-allheaders = $(wildcard $(srcdir)/*.h)
-virinc_HEADERS = $(filter-out $(srcdir)/libvirt-common.h, $(allheaders))
-nodist_virinc_HEADERS = libvirt-common.h
-
-install-exec-hook:
-	$(mkinstalldirs) $(DESTDIR)$(virincdir)
diff --git a/include/libvirt/meson.build b/include/libvirt/meson.build
new file mode 100644
index 00000000000..4b77a222f03
--- /dev/null
+++ b/include/libvirt/meson.build
@@ -0,0 +1,36 @@
+libvirt_common_h_in = files('libvirt-common.h.in')
+
+libvirt_include = files(
+  'libvirt-admin.h',
+  'libvirt-domain-checkpoint.h',
+  'libvirt-domain.h',
+  'libvirt-domain-snapshot.h',
+  'libvirt-event.h',
+  'libvirt.h',
+  'libvirt-host.h',
+  'libvirt-interface.h',
+  'libvirt-lxc.h',
+  'libvirt-network.h',
+  'libvirt-nodedev.h',
+  'libvirt-nwfilter.h',
+  'libvirt-qemu.h',
+  'libvirt-secret.h',
+  'libvirt-storage.h',
+  'libvirt-stream.h',
+  'virterror.h',
+)
+
+include_conf = configuration_data()
+include_conf.merge_from(conf)
+
+libvirt_common_h = configure_file(
+  input: libvirt_common_h_in,
+  output: 'libvirt-common.h',
+  configuration: include_conf,
+)
+
+install_headers(
+  libvirt_include,
+  libvirt_common_h,
+  install_dir: includedir / 'libvirt',
+)
diff --git a/include/meson.build b/include/meson.build
new file mode 100644
index 00000000000..06658ede6a7
--- /dev/null
+++ b/include/meson.build
@@ -0,0 +1,3 @@
+libvirt_inc = include_directories('.')
+
+subdir('libvirt')
diff --git a/meson.build b/meson.build
index 8c6db66a07f..b5430012a79 100644
--- a/meson.build
+++ b/meson.build
@@ -626,6 +626,8 @@ top_inc_dir = include_directories('.')
 
 subdir('scripts')
 
+subdir('include')
+
 
 # generate meson-config.h file
 configure_file(output: 'meson-config.h', configuration: conf)
-- 
2.26.2




More information about the libvir-list mailing list