diff options
author | Lee Duncan <lduncan@suse.com> | 2022-09-21 09:33:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-21 09:33:56 -0700 |
commit | 531039d15c3fe34fcd373d0923e0c7a34786c58c (patch) | |
tree | 0948146a9f7ae95fbcf081550504a8d0d8aa55f5 /libopeniscsiusr | |
parent | 7726ecc89015edb49057473a605c63ac9354f5cb (diff) | |
download | open-iscsi-531039d15c3fe34fcd373d0923e0c7a34786c58c.tar.gz |
Use meson as the main build system (#365)
* Build: Add an iscsiuio 'build_date.sh' script
This is currently unused, but will be used by meson to
build the "build_date.[ch]" files used by iscsiuio.
* Build: have git ignore file '.setup'
I commonly use this file for shell aliases/functions.
* Add framework to support building using meson.
This adds the ability to use meson/ninja to build open-iscsi
and iscsiuio, rather than the current system that uses 'autoconf'
for iscsiuio and uses 'make' for everything else.
The old make/autoconf system is left in place, for now, but
deprecated, including a warning about that when running 'make all'
or 'make user' from the top-level.
* utils/build: enhance iscsi-iname to generate prefix
Added new "-g/--generate-iname-prefix" argument to generate the
InitiatorName= prefix. Also, updated iscsi-iname to use getopts.
Also, use the new option from meson.
* git/meson: remove 'builddir' from ignored files
The build directory can be called anything.
Suggested by: Eli Schwartz
* iscsiuio build: fix new build_date.sh script
Fixed several issues:
- fix option handling for "-S"
- fix epoch date handling from env (noticed by Eli Schwartz)
- remove debug statements
* iscsiuio meson: warn when not creating a symlink for iscsiuio
* meson: install man pages more efficiently
We don't need to specify path or subdirectory
* iscsiuio meson: remove unused source date epoch option
This option was never used, since we pass this info
from the environment.
* meson: no need to set libdir: default is fine
* iscsiuio meson: no need to add c_args: already there
* Don't generate initiatorname when cross-building (#367)
Let it be generated by the iscsi-init service.
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
* Set ISCSI_CONFIG_ROOT by meson
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
* Set LOCK_DIR from home_dir to lock_dir
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
* Install iface.example to db_root/ifaces
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
Co-authored-by: TIAN Yuanhao <78596099+tianyuanhao@users.noreply.github.com>
Co-authored-by: TIAN Yuanhao <tianyuanhao3@163.com>
Diffstat (limited to 'libopeniscsiusr')
-rw-r--r-- | libopeniscsiusr/docs/meson.build | 6 | ||||
-rw-r--r-- | libopeniscsiusr/libopeniscsiusr/meson.build | 9 | ||||
-rw-r--r-- | libopeniscsiusr/meson.build | 16 | ||||
-rw-r--r-- | libopeniscsiusr/tests/meson.build | 16 |
4 files changed, 47 insertions, 0 deletions
diff --git a/libopeniscsiusr/docs/meson.build b/libopeniscsiusr/docs/meson.build new file mode 100644 index 0000000..cb80749 --- /dev/null +++ b/libopeniscsiusr/docs/meson.build @@ -0,0 +1,6 @@ +# statid man page +libiscsi_usr_docs = files(['libopeniscsiusr.h.3']) + +# commands needed for man page generation +list_pages_cmd = find_program('list-man-pages.sh') +kernel_doc_cmd = find_program('kernel-doc') diff --git a/libopeniscsiusr/libopeniscsiusr/meson.build b/libopeniscsiusr/libopeniscsiusr/meson.build new file mode 100644 index 0000000..fa2116e --- /dev/null +++ b/libopeniscsiusr/libopeniscsiusr/meson.build @@ -0,0 +1,9 @@ +# for the man pages we generate +libiscsi_usr_doc_headers = files([ + 'libopeniscsiusr.h', + 'libopeniscsiusr_iface.h', + 'libopeniscsiusr_node.h', + 'libopeniscsiusr_session.h']) + +libiscsi_usr_headers = files([ + 'libopeniscsiusr_common.h']) diff --git a/libopeniscsiusr/meson.build b/libopeniscsiusr/meson.build new file mode 100644 index 0000000..d5d2b2e --- /dev/null +++ b/libopeniscsiusr/meson.build @@ -0,0 +1,16 @@ +libiscsi_usr_srcs = files([ + 'context.c', + 'misc.c', + 'session.c', + 'sysfs.c', + 'iface.c', + 'idbm.c', + 'node.c', + 'default.c']) + +libiscsi_usr_public_includes = include_directories('libopeniscsiusr') +libiscsi_usr_private_includes = include_directories('.') + +subdir('libopeniscsiusr') +subdir('tests') +subdir('docs') diff --git a/libopeniscsiusr/tests/meson.build b/libopeniscsiusr/tests/meson.build new file mode 100644 index 0000000..d958c5c --- /dev/null +++ b/libopeniscsiusr/tests/meson.build @@ -0,0 +1,16 @@ +# tests for libopeniscsiusr + +# create an assocaitive array, where the +# thing being tested is the "key", and the +# source file for it is the "value + +test_subjects = [ + 'context', + 'iface', + 'node', + 'session'] + +test_arr = {} +foreach s: test_subjects + test_arr += {s: files('test_' + s + '.c')} +endforeach |