[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v8 058/152] meson: convert authz directory to Meson
From: |
Paolo Bonzini |
Subject: |
[PULL v8 058/152] meson: convert authz directory to Meson |
Date: |
Fri, 21 Aug 2020 06:21:55 -0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile | 1 -
Makefile.objs | 3 ++-
Makefile.target | 2 +-
authz/Makefile.objs | 7 -------
authz/meson.build | 19 +++++++++++++++++++
meson.build | 5 +++++
6 files changed, 27 insertions(+), 10 deletions(-)
delete mode 100644 authz/Makefile.objs
create mode 100644 authz/meson.build
diff --git a/Makefile b/Makefile
index 4b152e3587..d380271765 100644
--- a/Makefile
+++ b/Makefile
@@ -241,7 +241,6 @@ include $(SRC_PATH)/Makefile.objs
endif
dummy := $(call unnest-vars,, \
- authz-obj-y \
chardev-obj-y \
block-obj-y \
block-obj-m \
diff --git a/Makefile.objs b/Makefile.objs
index 84bfa2a61a..0bc361d338 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -9,7 +9,8 @@ ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y)
chardev-obj-y = chardev/
-authz-obj-y = authz/
+authz-obj-y = authz/libauthz.fa
+authz/libauthz.fa-libs = $(if $(CONFIG_AUTH_PAM),-lpam)
block-obj-y = block/ nbd/ scsi/
block-obj-y += block.o blockjob.o job.o
diff --git a/Makefile.target b/Makefile.target
index 1e04551a8e..79b6e02bed 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -192,9 +192,9 @@ common-obj-m :=
include $(SRC_PATH)/Makefile.objs
dummy := $(call fix-paths,../,, \
+ authz-obj-y \
qom-obj-y)
dummy := $(call unnest-vars,.., \
- authz-obj-y \
block-obj-y \
block-obj-m \
chardev-obj-y \
diff --git a/authz/Makefile.objs b/authz/Makefile.objs
deleted file mode 100644
index ed7b273596..0000000000
--- a/authz/Makefile.objs
+++ /dev/null
@@ -1,7 +0,0 @@
-authz-obj-y += base.o
-authz-obj-y += simple.o
-authz-obj-y += list.o
-authz-obj-y += listfile.o
-authz-obj-$(CONFIG_AUTH_PAM) += pamacct.o
-
-pamacct.o-libs = -lpam
diff --git a/authz/meson.build b/authz/meson.build
new file mode 100644
index 0000000000..516d71f2e2
--- /dev/null
+++ b/authz/meson.build
@@ -0,0 +1,19 @@
+authz_ss = ss.source_set()
+authz_ss.add(genh)
+authz_ss.add(files(
+ 'base.c',
+ 'list.c',
+ 'listfile.c',
+ 'simple.c',
+))
+
+authz_ss.add(when: ['CONFIG_AUTH_PAM', pam], if_true: files('pamacct.c'))
+
+authz_ss = authz_ss.apply(config_host, strict: false)
+libauthz = static_library('authz', authz_ss.sources() + genh,
+ dependencies: [authz_ss.dependencies()],
+ name_suffix: 'fa',
+ build_by_default: false)
+
+authz = declare_dependency(link_whole: libauthz,
+ dependencies: qom)
diff --git a/meson.build b/meson.build
index 658d45c4c6..34363bff19 100644
--- a/meson.build
+++ b/meson.build
@@ -103,6 +103,10 @@ if 'CONFIG_GNUTLS' in config_host
endif
pixman = declare_dependency(compile_args: config_host['PIXMAN_CFLAGS'].split(),
link_args: config_host['PIXMAN_LIBS'].split())
+pam = not_found
+if 'CONFIG_AUTH_PAM' in config_host
+ pam = cc.find_library('pam')
+endif
libattr = not_found
if 'CONFIG_ATTR' in config_host
libattr = declare_dependency(link_args: config_host['LIBATTR_LIBS'].split())
@@ -341,6 +345,7 @@ qemuutil = declare_dependency(link_with: libqemuutil,
sources: genh + version_res)
subdir('qom')
+subdir('authz')
subdir('fsdev')
# Other build targets
--
2.26.2
- [PULL v8 059/152] meson: convert crypto directory to Meson, (continued)
- [PULL v8 059/152] meson: convert crypto directory to Meson, Paolo Bonzini, 2020/08/21
- [PULL v8 064/152] meson: convert chardev directory to Meson (tools part), Paolo Bonzini, 2020/08/21
- [PULL v8 053/152] meson: handle edk2 bios and descriptors, Paolo Bonzini, 2020/08/21
- [PULL v8 067/152] meson: qemu-pr-helper, Paolo Bonzini, 2020/08/21
- [PULL v8 060/152] meson: convert io directory to Meson, Paolo Bonzini, 2020/08/21
- [PULL v8 055/152] meson: convert tests/fp and check-softfloat, Paolo Bonzini, 2020/08/21
- [PULL v8 073/152] meson: convert root directory to Meson, Paolo Bonzini, 2020/08/21
- [PULL v8 074/152] meson: convert most of softmmu/, Paolo Bonzini, 2020/08/21
- [PULL v8 075/152] meson: convert trace/, Paolo Bonzini, 2020/08/21
- [PULL v8 065/152] meson: convert block, Paolo Bonzini, 2020/08/21
- [PULL v8 058/152] meson: convert authz directory to Meson,
Paolo Bonzini <=
- [PULL v8 068/152] configure, Makefile; remove TOOLS and HELPERS-y variable, Paolo Bonzini, 2020/08/21
- [PULL v8 062/152] meson: infrastructure for building emulators, Paolo Bonzini, 2020/08/21
- [PULL v8 066/152] meson: qemu-{img,io,nbd}, Paolo Bonzini, 2020/08/21
- [PULL v8 069/152] meson: convert chardev directory to Meson (emulator part), Paolo Bonzini, 2020/08/21
- [PULL v8 076/152] meson: convert dump/, Paolo Bonzini, 2020/08/21
- [PULL v8 071/152] meson: convert audio directory to Meson, Paolo Bonzini, 2020/08/21
- [PULL v8 078/152] meson: convert qemu-storage-daemon, Paolo Bonzini, 2020/08/21
- [PULL v8 079/152] meson: convert replay directory to Meson, Paolo Bonzini, 2020/08/21
- [PULL v8 080/152] meson: convert migration directory to Meson, Paolo Bonzini, 2020/08/21
- [PULL v8 070/152] meson: convert tests/qtest to meson, Paolo Bonzini, 2020/08/21