2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-22 09:57:41 +00:00

[#3731] Uppercase program names with no _exe in meson.build

This commit is contained in:
Andrei Pavel 2025-02-24 12:01:19 +02:00
parent f79d96a65d
commit a0d00963c5
No known key found for this signature in database
GPG Key ID: D4E804481939CB21
13 changed files with 58 additions and 74 deletions

View File

@ -1,4 +1,4 @@
if not doxygen_exe.found()
if not DOXYGEN.found()
subdir_done()
endif

View File

@ -1,4 +1,4 @@
if not python_exe.found()
if not PYTHON.found()
subdir_done()
endif
@ -76,21 +76,21 @@ make_conf_data.set('builddir', meson.current_build_dir())
make_conf_data.set('srcdir', meson.current_source_dir())
make_conf_data.set('sphinxbuilddir', sphinxbuilddir)
make_conf_data.set('abs_sphinxbuilddir', abs_sphinxbuilddir)
make_conf_data.set('PYTHON', python_exe.full_path())
make_conf_data.set('PYTHON', PYTHON.full_path())
make_conf_data.set('TOP_SOURCE_DIR', TOP_SOURCE_DIR)
if pdflatex_exe.found()
if PDFLATEX.found()
make_conf_data.set('HAVE_PDFLATEX', 'yes')
pdflatex = pdflatex_exe.full_path()
pdflatex = PDFLATEX.full_path()
else
make_conf_data.set('HAVE_PDFLATEX', 'no')
pdflatex = 'false'
endif
make_conf_data.set('PDFLATEX_AND_OPTS', pdflatex + ' -interaction nonstopmode')
make_conf_data.set('SPHINXBUILD', sphinx_exe.full_path())
make_conf_data.set('SPHINXBUILD', SPHINX.full_path())
make_conf_data.set('sphinxopts', ' '.join(sphinxopts))
if plantuml_exe.found()
if PLANTUML.found()
make_conf_data.set('HAVE_PLANTUML', 'yes')
plantuml = plantuml_exe.full_path()
plantuml = PLANTUML.full_path()
else
make_conf_data.set('HAVE_PLANTUML', 'no')
plantuml = 'false'
@ -98,7 +98,7 @@ endif
make_conf_data.set('PLANTUML', plantuml)
make_conf_data.set('umls', ' '.join(umls))
make_conf_data.set('svgs', ' '.join(svgs))
if xmllint_exe.found()
if XMLLINT.found()
make_conf_data.set('HAVE_XMLLINT', 'yes')
else
make_conf_data.set('HAVE_XMLLINT', 'no')
@ -106,7 +106,7 @@ endif
tumls = ['uml/tkey.uml', 'uml/update.uml']
make_conf_data.set('tumls', ' '.join(tumls))
make_conf_data.set('txts', ' '.join(txts))
if pip_compile_exe.found()
if PIP_COMPILE.found()
make_conf_data.set('HAVE_PIP_COMPILE', 'yes')
else
make_conf_data.set('HAVE_PIP_COMPILE', 'no')
@ -115,12 +115,12 @@ make_conf_data.set('man8s', ' '.join(man8s))
make_conf_data.set('PREFIX', PREFIX)
docdir = f'@PREFIX@/@DATADIR@/kea'
make_conf_data.set('docdir', docdir)
make_conf_data.set('INSTALL', install_exe.full_path())
make_conf_data.set('INSTALL', INSTALL.full_path())
mandir = get_option('mandir')
mandir8 = f'@PREFIX@/@mandir@/man8/'
make_conf_data.set('mandir8', mandir8)
if sphinx_exe.found()
if SPHINX.found()
make_doc = configure_file(
input: 'make-doc.sh.in',
output: 'make-doc.sh',

View File

@ -1,11 +1,5 @@
# Require meson >= 0.64.0 for preserve_path arg in install_data.
project(
'kea',
'cpp',
version: '2.7.7-git',
meson_version: '>=0.64.0',
default_options: ['default_library=shared'],
)
project('kea', 'cpp', version: '2.7.7-git', meson_version: '>=0.64.0')
cpp = meson.get_compiler('cpp')
project_version = meson.project_version()
@ -155,33 +149,23 @@ message(f'Detected system "@SYSTEM@".')
#### Programs
python_exe = find_program('python3', 'python', required: false)
flex_exe = find_program('flex', version: '>=2.6.4', required: false)
bison_exe = find_program('bison', version: '>=3.3.0', required: false)
awk_exe = find_program('gawk', 'awk', required: false)
doxygen_exe = find_program('doxygen', required: false)
sphinx_exe = find_program('sphinx-build', 'sphinx-build-3', required: false)
pdflatex_exe = find_program('pdflatex', required: false)
plantuml_exe = find_program('plantuml', required: false)
xmllint_exe = find_program('xmllint', required: false)
pip_compile_exe = find_program('pip-compile', required: false)
install_exe = find_program('install', required: true)
valgrind_exe = find_program('valgrind', required: false)
cppcheck_exe = find_program('cppcheck', required: false)
cppcheck_htmlreport_exe = find_program('cppcheck-htmlreport', required: false)
# External programs used only in this file.
cppcheck = find_program('cppcheck', required: false)
cppcheck_htmlreport = find_program('cppcheck-htmlreport', required: false)
valgrind = find_program('valgrind', required: false)
AWK = find_program('gawk', 'awk', required: false)
BISON = find_program('bison', version: '>=3.3.0', required: false)
DOXYGEN = find_program('doxygen', required: false)
FLEX = find_program('flex', version: '>=2.6.4', required: false)
INSTALL = find_program('install', required: true)
PDFLATEX = find_program('pdflatex', required: false)
PIP_COMPILE = find_program('pip-compile', required: false)
PLANTUML = find_program('plantuml', required: false)
PYTHON = find_program('python3', 'python', required: false)
SPHINX = find_program('sphinx-build', 'sphinx-build-3', required: false)
XMLLINT = find_program('xmllint', required: false)
if python_exe.found()
PYTHON = python_exe.full_path()
endif
if flex_exe.found()
FLEX = flex_exe.full_path()
endif
if bison_exe.found()
BISON = bison_exe.full_path()
endif
if awk_exe.found()
AWK = awk_exe.full_path()
endif
CD_AND_RUN = find_program(f'@TOP_SOURCE_DIR@/cd-and-run.sh')
KEA_MSG_COMPILER = disabler()
@ -489,11 +473,11 @@ endif
report_conf_data.set('CXX_ARGS', ' '.join(compile_args))
report_conf_data.set('LD_ID', cpp.get_linker_id())
report_conf_data.set('LD_ARGS', ' '.join(link_args))
if python_exe.found()
if PYTHON.found()
report_conf_data.set('HAVE_PYTHON', 'yes')
report_conf_data.set('PYTHON_PATH', PYTHON)
report_conf_data.set('PYTHON_PATH', PYTHON.full_path())
result = run_command(
python_exe,
PYTHON,
'-c',
'import sysconfig; print(sysconfig.get_paths()[\'purelib\'])',
check: false,
@ -575,13 +559,13 @@ if result.returncode() == 0
else
report_conf_data.set('LOG4CPLUS_VERSION', log4cplus.version())
endif
if flex_exe.found()
report_conf_data.set('FLEX', FLEX)
if FLEX.found()
report_conf_data.set('FLEX', FLEX.full_path())
else
report_conf_data.set('FLEX', 'unknown')
endif
if bison_exe.found()
report_conf_data.set('BISON', BISON)
if BISON.found()
report_conf_data.set('BISON', BISON.full_path())
else
report_conf_data.set('BISON', 'unknown')
endif
@ -658,11 +642,11 @@ run_target(
)
# todo: remove redirections
if cppcheck_exe.found()
if cppcheck.found()
run_target(
'cppcheck',
command: [
cppcheck_exe,
cppcheck,
'-I.',
'-I./src/lib',
'-I./src/bin',
@ -682,11 +666,11 @@ if cppcheck_exe.found()
)
endif
if cppcheck_htmlreport_exe.found()
if cppcheck_htmlreport.found()
run_target(
'cppcheck-report',
command: [
cppcheck_htmlreport_exe,
cppcheck_htmlreport,
'--file',
'./cppcheck-result.xml',
'--report-dir',
@ -697,11 +681,11 @@ if cppcheck_htmlreport_exe.found()
)
endif
if valgrind_exe.found()
if valgrind.found()
add_test_setup(
'valgrind',
exe_wrapper: [
valgrind_exe,
valgrind,
'--child-silent-after-fork=yes',
'--fullpath-after=',
'--leak-check=full',

View File

@ -39,7 +39,7 @@ if KEA_MSG_COMPILER.found()
TARGETS_GEN_MESSAGES += [target_gen_messages]
endif
if flex_exe.found() and bison_exe.found()
if FLEX.found() and BISON.found()
target_parser = run_target(
'src-bin-agent-parser',
command: [

View File

@ -29,7 +29,7 @@ executable(
)
subdir('tests')
if flex_exe.found() and bison_exe.found()
if FLEX.found() and BISON.found()
current_source_dir = meson.current_source_dir()
target_parser = run_target(
'src-bin-d2-parser',

View File

@ -38,7 +38,7 @@ if KEA_MSG_COMPILER.found()
TARGETS_GEN_MESSAGES += [target_gen_messages]
endif
if flex_exe.found() and bison_exe.found()
if FLEX.found() and BISON.found()
target_parser = run_target(
'src-bin-dhcp4-parser',
command: [

View File

@ -39,7 +39,7 @@ if KEA_MSG_COMPILER.found()
TARGETS_GEN_MESSAGES += [target_gen_messages]
endif
if flex_exe.found() and bison_exe.found()
if FLEX.found() and BISON.found()
target_parser = run_target(
'src-bin-dhcp6-parser',
command: [

View File

@ -52,7 +52,7 @@ if KEA_MSG_COMPILER.found()
TARGETS_GEN_MESSAGES += [target_gen_messages]
endif
if flex_exe.found() and bison_exe.found()
if FLEX.found() and BISON.found()
target_parser = run_target(
'src-bin-netconf-parser',
command: [

View File

@ -1,14 +1,14 @@
if not python_exe.found()
if not PYTHON.found()
subdir_done()
endif
kea_shell_conf_data = configuration_data()
kea_shell_conf_data.set('PYTHON', PYTHON)
kea_shell_conf_data.set('PYTHON', PYTHON.full_path())
kea_shell_conf_data.set('PACKAGE_VERSION', project_version)
kea_shell_conf_data.set('EXTENDED_VERSION', project_version + ' (tarball)')
r = run_command(
python_exe,
PYTHON,
'-c',
'import sysconfig; print(sysconfig.get_paths()[\'purelib\'])',
check: true,

View File

@ -3,7 +3,7 @@ if not gtest.found()
endif
shell_tests_conf_data = configuration_data()
shell_tests_conf_data.set('PYTHON', PYTHON)
shell_tests_conf_data.set('PYTHON', PYTHON.full_path())
shell_tests_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
shell_tests_conf_data.set('abs_top_srcdir', TOP_SOURCE_DIR)
shell_unittest = configure_file(

View File

@ -41,7 +41,7 @@ if KEA_MSG_COMPILER.found()
TARGETS_GEN_MESSAGES += [target_gen_messages]
endif
if flex_exe.found() and bison_exe.found()
if FLEX.found() and BISON.found()
target_parser = run_target(
'src-lib-eval-parser',
command: [

View File

@ -1,10 +1,10 @@
if not python_exe.found()
if not PYTHON.found()
subdir_done()
endif
configure_file(input: 'const2hdr.py', output: 'const2hdr.py', copy: true)
util_python_conf_data = configuration_data()
util_python_conf_data.set('PYTHON', PYTHON)
util_python_conf_data.set('PYTHON', PYTHON.full_path())
configure_file(
input: 'gen_wiredata.py.in',
output: 'gen_wiredata.py',

View File

@ -5,13 +5,13 @@ tools_conf_data.set('localstatedir', '${prefix}/' + get_option('localstatedir'))
tools_conf_data.set('exec_prefix', '${prefix}')
tools_conf_data.set('libdir', '${exec_prefix}/' + get_option('libdir'))
tools_conf_data.set('SEP', '+')
if bison_exe.found()
tools_conf_data.set('YACC', BISON)
if BISON.found()
tools_conf_data.set('YACC', BISON.full_path())
else
tools_conf_data.set('YACC', 'bison')
endif
if awk_exe.found()
tools_conf_data.set('AWK', AWK)
if AWK.found()
tools_conf_data.set('AWK', AWK.full_path())
else
tools_conf_data.set('AWK', 'awk')
endif