~mmach/netext73/lz4

« back to all changes in this revision

Viewing changes to contrib/meson/meson/contrib/gen_manual/meson.build

  • Committer: mmach
  • Date: 2022-11-09 18:52:10 UTC
  • Revision ID: netbit73@gmail.com-20221109185210-w358idlhh0phq688
1.9.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# #############################################################################
2
 
# Copyright (c) 2018-present    lzutao <taolzu(at)gmail.com>
 
2
# Copyright (c) 2018-present        lzutao <taolzu(at)gmail.com>
 
3
# Copyright (c) 2022-present        Tristan Partin <tristan(at)partin.io>
3
4
# All rights reserved.
4
5
#
5
6
# This source code is licensed under both the BSD-style license (found in the
7
8
# in the COPYING file in the root directory of this source tree).
8
9
# #############################################################################
9
10
 
10
 
lz4_root_dir = '../../../../..'
 
11
lz4_source_root = '../../../../..'
11
12
 
12
13
add_languages('cpp')
13
 
cxx = meson.get_compiler('cpp')
14
 
 
15
 
gen_manual_includes = include_directories(join_paths(lz4_root_dir, 'contrib/gen_manual'))
16
 
 
17
 
gen_manual_cppflags = cxx.get_supported_arguments(['-Wextra', '-Wcast-qual',
18
 
  '-Wcast-align', '-Wshadow', '-Wstrict-aliasing=1', '-Wswitch-enum',
19
 
  '-Wno-comment'])
20
 
 
21
 
gen_manual = executable('gen_manual',
22
 
  join_paths(lz4_root_dir, 'contrib/gen_manual/gen_manual.cpp'),
23
 
  cpp_args: gen_manual_cppflags,
24
 
  include_directories: gen_manual_includes,
 
14
 
 
15
sources = files(
 
16
  lz4_source_root / 'contrib/gen_manual/gen_manual.cpp'
 
17
)
 
18
 
 
19
gen_manual = executable(
 
20
  'gen_manual',
 
21
  sources,
25
22
  native: true,
26
 
  install: false)
27
 
 
28
 
# Update lz4 manual
29
 
lz4_manual_html = custom_target('lz4_manual.html',
30
 
  output : 'lz4_manual.html',
31
 
  command : [gen_manual,
32
 
    lz4_version,
33
 
    join_paths(meson.current_source_dir(), lz4_root_dir, 'lib/lz4.h'),
34
 
    '@OUTPUT@'],
35
 
  install : false)
36
 
# Update lz4frame manual
37
 
lz4_manual_html = custom_target('lz4frame_manual.html',
38
 
  output : 'lz4frame_manual.html',
39
 
  command : [gen_manual,
40
 
    lz4_version,
41
 
    join_paths(meson.current_source_dir(), lz4_root_dir, 'lib/lz4frame.h'),
42
 
    '@OUTPUT@'],
43
 
  install : false)
 
23
  install: false
 
24
)
 
25
 
 
26
manual_pages = ['lz4', 'lz4frame']
 
27
 
 
28
foreach mp : manual_pages
 
29
  custom_target(
 
30
    '@0@_manual.html'.format(mp),
 
31
    build_by_default: true,
 
32
    input: lz4_source_root / 'lib/@0@.h'.format(mp),
 
33
    output: '@0@_manual.html'.format(mp),
 
34
    command: [
 
35
      gen_manual,
 
36
      lz4_version,
 
37
      '@INPUT@',
 
38
      '@OUTPUT@',
 
39
    ],
 
40
    install: false
 
41
  )
 
42
endforeach