Skip to content

Commit

Permalink
Use meson to build
Browse files Browse the repository at this point in the history
  • Loading branch information
falconindy committed Jun 8, 2019
1 parent 8d6429b commit 6be7fe1
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 126 deletions.
85 changes: 0 additions & 85 deletions .ycm_extra_conf.py

This file was deleted.

40 changes: 0 additions & 40 deletions Makefile

This file was deleted.

45 changes: 45 additions & 0 deletions meson.build
@@ -0,0 +1,45 @@
project('expac', 'c',
version : '9',
license : 'MIT',
default_options : [
'c_std=c11',
'prefix=/usr',
])

conf = configuration_data()
conf.set('_GNU_SOURCE', true)
conf.set_quoted('PACKAGE_NAME', meson.project_name())
conf.set_quoted('PACKAGE_VERSION', meson.project_version())

configure_file(
output : 'config.h',
configuration : conf)
add_project_arguments('-include', 'config.h', language : 'c')

executable(
'expac',
files('''
src/expac.c
src/conf.c src/conf.h
src/util.h
'''.split()),
dependencies : [
dependency('libalpm')
],
install : true)

pod2man = find_program('pod2man')
man = custom_target(
'man',
output : 'expac.1',
input : 'README.pod',
command : [
pod2man,
'--section=1',
'--center=expac Manual',
'--name=EXPAC',
'--release=expac @0@'.format(meson.project_version()),
'@INPUT@', '@OUTPUT@'
],
install : true,
install_dir : join_paths(get_option('mandir'), 'man1'))
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion expac.c → src/expac.c
Expand Up @@ -135,7 +135,7 @@ static const char *alpm_dep_get_name(alpm_depend_t *dep)
static void usage(void)
{
fprintf(stderr, "expac %s\n"
"Usage: expac [options] <format> target...\n\n", VERSION);
"Usage: expac [options] <format> target...\n\n", PACKAGE_VERSION);
fprintf(stderr,
" Options:\n"
" -Q, --query search local DB (default)\n"
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 6be7fe1

Please sign in to comment.