Skip to content

Commit 175d498

Browse files
committed
Initial support for meson build system
Signed-off-by: Reagan Bohan <[email protected]>
1 parent 6be2cb1 commit 175d498

22 files changed

+92
-1064
lines changed

Makefile

Lines changed: 0 additions & 86 deletions
This file was deleted.

docs/Makefile

Lines changed: 0 additions & 58 deletions
This file was deleted.

docs/meson.build

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
mans = ['efi_append_variable.3', 'efi_del_variable.3', 'efidp_make_generic.3', 'efi_get_next_variable_name.3', 'efi_get_variable.3', 'efi_get_variable_attributes.3', 'efi_get_variable_size.3', 'efi_guid_to_id_guid.3', 'efi_guid_to_name.3', 'efi_guid_to_str.3', 'efi_guid_to_symbol.3', 'efi_id_guid_to_guid.3', 'efi_name_to_guid.3', 'efi_set_variable.3', 'efi_str_to_guid.3', 'efi_symbol_to_guid.3', 'efivar.1', 'efi_variable_alloc.3', 'efi_variable_export.3', 'efi_variable_free.3', 'efi_variable_get_attributes.3', 'efi_variable_get_data.3', 'efi_variable_get_guid.3', 'efi_variable_get_name.3', 'efi_variable_import.3', 'efi_variable_realize.3', 'efi_variable_set_attributes.3', 'efi_variable_set_data.3', 'efi_variable_set_guid.3', 'efi_variable_set_name.3', 'efi_variables_supported.3', 'efi_variable_t.3']
2+
3+
mdocs = ['efisecdb.1.mdoc']
4+
5+
foreach man : mans
6+
install_man(man)
7+
endforeach
8+
9+
mandoc = find_program('mandoc', required : get_option('convert_mandocs'))
10+
11+
foreach mdoc : mdocs
12+
if mandoc.found()
13+
# Unfortunately install_man won't take target or generator output: meson bug #1550
14+
man = custom_target(mdoc.substring(0, -5),
15+
input : mdoc,
16+
output : mdoc.substring(0, -5),
17+
command : [mandoc, '-mdoc', '-Tman',
18+
'-Ios=Linux', '@INPUT@'],
19+
capture : true,
20+
install : true,
21+
install_dir : join_paths(get_option('mandir'), 'man' + mdoc[-6]))
22+
else
23+
# configure_file is used to remove .mdoc extension
24+
man = configure_file(input : mdoc,
25+
output : mdoc.substring(0, -5),
26+
copy : true)
27+
install_man(man)
28+
endif
29+
endforeach

meson.build

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
project('efivar', 'c', license: 'LGPL-2.1-only', version: '38')
2+
3+
so_ver = '1.@0@'.format(meson.project_version())
4+
add_project_arguments('-DLIBEFIVAR_VERSION=@0@'.format(meson.project_version()), language : 'c')
5+
6+
subdir('src')
7+
subdir('docs')

meson_options.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
option('convert_mandocs', type : 'feature', value : 'auto', description : 'Convert man pages in mdoc format to man format.')

src/Makefile

Lines changed: 0 additions & 166 deletions
This file was deleted.

src/compiler.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,6 @@
5353
#define PRINTF(...) __attribute__((__format__(printf, __VA_ARGS__)))
5454
#define FLATTEN __attribute__((__flatten__))
5555
#define PACKED __attribute__((__packed__))
56-
#if defined(__clang__)
57-
# define VERSION(sym, ver)
58-
#else
59-
# if GNUC_PREREQ(10,0)
60-
# define VERSION(sym, ver) __attribute__ ((symver (# ver)))
61-
# else
62-
# define VERSION(sym, ver) __asm__(".symver " # sym "," # ver);
63-
# endif
64-
#endif
6556
#define NORETURN __attribute__((__noreturn__))
6657
#define ALIGNED(n) __attribute__((__aligned__(n)))
6758
#define CLEANUP_FUNC(x) __attribute__((__cleanup__(x)))

0 commit comments

Comments
 (0)