[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 040/142] meson: convert authz directory to Meson
From: |
Paolo Bonzini |
Subject: |
[PATCH 040/142] meson: convert authz directory to Meson |
Date: |
Tue, 28 Jan 2020 18:52:00 +0100 |
From: Marc-André Lureau <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
Makefile | 1 -
Makefile.objs | 8 +++-----
Makefile.target | 2 +-
authz/Makefile.objs | 7 -------
authz/meson.build | 18 ++++++++++++++++++
meson.build | 5 +++++
6 files changed, 27 insertions(+), 14 deletions(-)
delete mode 100644 authz/Makefile.objs
create mode 100644 authz/meson.build
diff --git a/Makefile b/Makefile
index 80894601dc..64c7430951 100644
--- a/Makefile
+++ b/Makefile
@@ -220,7 +220,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 18caccdba8..bbeb87ec82 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -2,11 +2,6 @@
# chardev-obj-y is code used by both qemu system emulation and some tests
chardev-obj-y = chardev/
-#######################################################################
-# authz-obj-y is code used by both qemu system emulation and qemu-img
-
-authz-obj-y = authz/
-
#######################################################################
# block-obj-y is code used by both qemu system emulation and qemu-img
@@ -26,6 +21,9 @@ crypto-obj-y = crypto/
#######################################################################
# libraries built entirely from meson
+authz-obj-y = authz/libauthz.fa
+authz/libauthz.fa-libs = $(if $(CONFIG_AUTH_PAM),-lpam)
+
qom-obj-y = qom/libqom.fa
#######################################################################
diff --git a/Makefile.target b/Makefile.target
index 40ab105568..a9f5cac98a 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -179,9 +179,9 @@ all-obj-y := $(obj-y)
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..f485b8076a
--- /dev/null
+++ b/authz/meson.build
@@ -0,0 +1,18 @@
+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(),
+ dependencies: [authz_ss.dependencies()],
+ name_suffix: 'fa',
+ build_by_default: false)
+
+authz = declare_dependency(link_whole: libauthz)
diff --git a/meson.build b/meson.build
index 0c4e5e5823..218c495063 100644
--- a/meson.build
+++ b/meson.build
@@ -66,6 +66,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 = declare_dependency()
+if 'CONFIG_AUTH_PAM' in config_host
+ pam = cc.find_library('pam')
+endif
libattr = declare_dependency()
if 'CONFIG_ATTR' in config_host
libattr = declare_dependency(link_args: config_host['LIBATTR_LIBS'].split())
@@ -288,6 +292,7 @@ qemuutil = declare_dependency(link_with: libqemuutil,
sources: version_res)
subdir('qom')
+subdir('authz')
subdir('fsdev')
# Other build targets
--
2.21.0
- [PATCH 028/142] meson: add qemu-bridge-helper, (continued)
- [PATCH 028/142] meson: add qemu-bridge-helper, Paolo Bonzini, 2020/01/28
- [PATCH 029/142] meson: add qemu-keymap, Paolo Bonzini, 2020/01/28
- [PATCH 030/142] meson: add qemu-edid, Paolo Bonzini, 2020/01/28
- [PATCH 031/142] meson: add virtfs-proxy-helper, Paolo Bonzini, 2020/01/28
- [PATCH 032/142] meson: keymap-gen, Paolo Bonzini, 2020/01/28
- [PATCH 033/142] meson: generate qemu-version.h, Paolo Bonzini, 2020/01/28
- [PATCH 034/142] meson: generate shader headers, Paolo Bonzini, 2020/01/28
- [PATCH 035/142] meson: generate hxtool files, Paolo Bonzini, 2020/01/28
- [PATCH 036/142] meson: configure 50-qemu-gpu.json, Paolo Bonzini, 2020/01/28
- [PATCH 038/142] build-sys hack: link with whole .fa archives, Paolo Bonzini, 2020/01/28
- [PATCH 040/142] meson: convert authz directory to Meson,
Paolo Bonzini <=
- [PATCH 039/142] meson: convert qom directory to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 041/142] meson: convert crypto directory to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 037/142] meson: uncompress edk2 bios, Paolo Bonzini, 2020/01/28
- [PATCH 042/142] meson: convert io directory to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 043/142] meson: convert target/s390x/gen-features.h, Paolo Bonzini, 2020/01/28
- [PATCH 045/142] meson: add macos dependencies, Paolo Bonzini, 2020/01/28
- [PATCH 044/142] meson: infrastructure for building emulators, Paolo Bonzini, 2020/01/28
- [PATCH 046/142] meson: add modules infrastructure, Paolo Bonzini, 2020/01/28
- [PATCH 047/142] meson: convert chardev directory to Meson (tools part), Paolo Bonzini, 2020/01/28
- [PATCH 048/142] meson: convert block, Paolo Bonzini, 2020/01/28