Skip to content

Commit 24eba50

Browse files
committed
[#3731] Address review
1 parent c8c645c commit 24eba50

15 files changed

+44
-40
lines changed

config-report.sh.in

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ C++ Compiler:
3232
3333
END
3434

35-
if test "@HAVE_PYTHON@" != "no" ; then
35+
if test '@HAVE_PYTHON@' != 'no'; then
3636
cat >> @TOP_BUILD_DIR@/config.report << END
3737
Python:
3838
PYTHON: @PYTHON_PATH@
@@ -63,7 +63,7 @@ Flex/bison:
6363
6464
END
6565

66-
if test "@HAVE_MYSQL@" != "no" ; then
66+
if test '@HAVE_MYSQL@' != 'no'; then
6767
cat >> @TOP_BUILD_DIR@/config.report << END
6868
MySQL:
6969
MYSQL_VERSION: @MYSQL_VERSION@
@@ -79,7 +79,7 @@ MySQL:
7979
END
8080
fi
8181

82-
if test "@HAVE_PGSQL@" != "no" ; then
82+
if test '@HAVE_PGSQL@' != 'no'; then
8383
cat >> @TOP_BUILD_DIR@/config.report << END
8484
PostgreSQL:
8585
PGSQL_VERSION: @PGSQL_VERSION@
@@ -101,7 +101,7 @@ NETCONF:
101101
102102
END
103103

104-
if test "@HAVE_GTEST@" != "no" ; then
104+
if test '@HAVE_GTEST@' != 'no'; then
105105
cat >> @TOP_BUILD_DIR@/config.report << END
106106
Google Test:
107107
GTEST_VERSION: @GTEST_VERSION@

doc/devel/meson.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ current_build_dir = meson.current_build_dir()
66
current_source_dir = meson.current_source_dir()
77
make_devel_conf_data = configuration_data()
88
make_devel_conf_data.set('builddir', current_build_dir)
9-
make_devel_conf_data.set('PACKAGE_VERSION', project_version)
9+
make_devel_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
1010
configure_file(
1111
input: 'make-devel.sh.in',
1212
output: 'make-devel.sh',

doc/make-grammar.sh.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
set -euv
77

8-
cd @TOP_SOURCE_DIR@
8+
cd '@TOP_SOURCE_DIR@'
99

1010
extract_bnf="@TOP_BUILD_DIR@/tools/extract_bnf.sh"
1111

doc/sphinx/make-doc.sh.in

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
set -euv
44

5-
cd @builddir@
5+
cd '@builddir@'
66

77
# api.rst is always generated via sphinx's conf.py
88
@PYTHON@ @srcdir@/api2doc.py -o @srcdir@/api.rst
99

10-
rm -f @srcdir@/arm/platforms.rst
11-
cp @TOP_SOURCE_DIR@/platforms.rst @srcdir@/arm/platforms.rst
10+
rm -f '@srcdir@/arm/platforms.rst'
11+
cp '@TOP_SOURCE_DIR@/platforms.rst' '@srcdir@/arm/platforms.rst'
1212

1313
# pdf
14-
if test "@HAVE_PDFLATEX@" != "no" ; then
14+
if test '@HAVE_PDFLATEX@' != 'no'; then
1515
@SPHINXBUILD@ -M latex @srcdir@ @sphinxbuilddir@ @sphinxopts@
16-
cd @abs_sphinxbuilddir@/latex
16+
cd '@abs_sphinxbuilddir@/latex'
1717
@PDFLATEX_AND_OPTS@ kea-arm.tex
1818
makeindex -s python.ist kea-arm.idx
1919
@PDFLATEX_AND_OPTS@ kea-arm.tex
@@ -22,7 +22,7 @@ if test "@HAVE_PDFLATEX@" != "no" ; then
2222
@PDFLATEX_AND_OPTS@ kea-messages.tex
2323
fi
2424

25-
cd @builddir@
25+
cd '@builddir@'
2626

2727
# html
2828
@SPHINXBUILD@ -M html @srcdir@ @sphinxbuilddir@ @sphinxopts@

doc/sphinx/make-install.sh.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
set -euv
44

55
mkdir -p @docdir@
6-
if test -d "@abs_sphinxbuilddir@/html" ; then
6+
if test -d '@abs_sphinxbuilddir@/html'; then
77
cp -r @abs_sphinxbuilddir@/html @docdir@
8-
if test "@HAVE_PDFLATEX@" != "no" ; then
8+
if test '@HAVE_PDFLATEX@' != 'no'; then
99
@INSTALL@ -c -m 644 @abs_sphinxbuilddir@/latex/kea-arm.pdf @docdir@
1010
@INSTALL@ -c -m 644 @abs_sphinxbuilddir@/latex/kea-messages.pdf @docdir@
1111
fi

doc/sphinx/make-mes-doc.sh.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -euv
44

5-
cd @TOP_SOURCE_DIR@
5+
cd '@TOP_SOURCE_DIR@'
66

77
# api-files.txt
88
find src/share/api -type f -name '[a-z]*.json' | sort -V > "@srcdir@/api-files.txt"
@@ -14,5 +14,5 @@ find . -type f -name '*.mes' | sort -V | sed 's#^./##g' > "@srcdir@/mes-files.tx
1414
@PYTHON@ ./tools/check-messages.py --generate-debug-messages-page
1515

1616
# kea-messages.rst
17-
cd @srcdir@
17+
cd '@srcdir@'
1818
@PYTHON@ ./mes2doc.py -o kea-messages.rst

doc/sphinx/make-uml.sh.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
set -euv
44

5-
cd @srcdir@
5+
cd '@srcdir@'
66

7-
if test "@HAVE_PLANTUML@" = "no" ; then
7+
if test '@HAVE_PLANTUML@' = 'no'; then
88
exit 0
99
fi
1010

@@ -15,7 +15,7 @@ for uml in @umls@; do @PLANTUML@ -tpng "$uml"; done
1515
# shellcheck disable=SC2043
1616
for uml in @umls@; do @PLANTUML@ -tsvg "$uml"; done
1717
# format-svgs
18-
if test "@HAVE_XMLLINT" != "no" ; then
18+
if test '@HAVE_XMLLINT' != 'no'; then
1919
# shellcheck disable=SC2043
2020
for svg in @svgs@; do xmllint --format "$svg" > tmp; mv tmp "$svg"; done
2121
else

doc/sphinx/make-update-python-dependencies.sh.in

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
set -euv
44

5-
if test "@HAVE_PIP_COMPILE@" = "no" ; then
5+
if test '@HAVE_PIP_COMPILE@' = 'no'; then
66
exit 0
77
fi
88

9-
cd @srcdir@
10-
rm -f ./src/requirements.txt
11-
pip-compile -r ./src/requirements.in
9+
cd '@srcdir@'
10+
@PIP_COMPILE@ --no-strip-extras --rebuild --upgrade ./src/requirements.in

doc/sphinx/meson.build

+2
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ make_conf_data.set('tumls', ' '.join(tumls))
111111
make_conf_data.set('txts', ' '.join(txts))
112112
if PIP_COMPILE.found()
113113
make_conf_data.set('HAVE_PIP_COMPILE', 'yes')
114+
make_conf_data.set('PIP_COMPILE', PIP_COMPILE.full_path())
114115
else
115116
make_conf_data.set('HAVE_PIP_COMPILE', 'no')
117+
make_conf_data.set('PIP_COMPILE', 'pip-compile')
116118
endif
117119
make_conf_data.set('man8s', ' '.join(man8s))
118120
make_conf_data.set('PREFIX', PREFIX)

meson.build

+12-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
project('kea', 'cpp', version: '2.7.7-git', meson_version: '>=0.64.0')
33

44
cpp = meson.get_compiler('cpp')
5-
project_version = meson.project_version()
5+
PROJECT_VERSION = meson.project_version()
66

77
#### Imports
88

@@ -99,17 +99,17 @@ conf_data = configuration_data(
9999
# 'PACKAGE': 'kea',
100100
# 'PACKAGE_BUGREPORT': '[email protected]',
101101
'PACKAGE_NAME': 'kea',
102-
# 'PACKAGE_STRING': f'kea "@project_version@"',
102+
# 'PACKAGE_STRING': f'kea "@PROJECT_VERSION@"',
103103
# 'PACKAGE_TARNAME': 'kea',
104104
# 'PACKAGE_URL': '',
105-
'PACKAGE_VERSION': meson.project_version(),
105+
'PACKAGE_VERSION': PROJECT_VERSION,
106106
'PACKAGE_VERSION_TYPE': '"development"',
107107
# 'PREMIUM': false,
108108
# 'PREMIUM_EXTENDED_VERSION': '"no"',
109109
# 'STDC_HEADERS': false,
110110
# 'TOP_BUILDDIR': false,
111111
# 'USE_STATIC_LINK': false,
112-
'VERSION': f'"@project_version@"',
112+
'VERSION': f'"@PROJECT_VERSION@"',
113113
# 'WITH_HEIMDAL': false,
114114
# 'YYTEXT_POINTER': false,
115115
# 'SIZE_T': 'size_t',
@@ -400,22 +400,25 @@ conf_data.set('HAVE_STREAM_TRUNCATED_ERROR', result.returncode() == 0)
400400

401401
compile_args = []
402402
link_args = []
403+
404+
# $ORIGIN documented at https://www.man7.org/linux/man-pages/man8/ld.so.8.html
405+
rpath = '$ORIGIN/../lib'
403406
if SYSTEM == 'darwin'
404407
compile_args += ['-D__APPLE_USE_RFC_3542']
405408
add_project_arguments('-D__APPLE_USE_RFC_3542', language: 'cpp')
406-
link_arg = '-Wl,-rpath,$ORIGIN/../lib'
409+
link_arg = f'-Wl,-rpath,@rpath@'
407410
link_args += [link_arg]
408411
add_project_link_arguments(link_arg, language: 'cpp')
409412
else
410-
link_arg = '-Wl,-rpath=$ORIGIN/../lib'
413+
link_arg = f'-Wl,-rpath=@rpath@'
411414
link_args += [link_arg]
412415
add_project_link_arguments(link_arg, language: 'cpp')
413416
endif
414417

415418
have_premium = fs.is_dir('premium')
416419
if have_premium
417420
conf_data.set('PREMIUM', 'yes')
418-
conf_data.set('PREMIUM_EXTENDED_VERSION', f'"@project_version@"')
421+
conf_data.set('PREMIUM_EXTENDED_VERSION', f'"@PROJECT_VERSION@"')
419422
else
420423
conf_data.set('PREMIUM', 'no')
421424
conf_data.set('PREMIUM_EXTENDED_VERSION', '"no"')
@@ -435,8 +438,8 @@ INCLUDES = [
435438
report_conf_data = configuration_data()
436439
report_conf_data.set('TOP_BUILD_DIR', TOP_BUILD_DIR)
437440
report_conf_data.set('PACKAGE_NAME', 'kea')
438-
report_conf_data.set('PACKAGE_VERSION', project_version)
439-
report_conf_data.set('EXTENDED_VERSION', project_version + ' (tarball)')
441+
report_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
442+
report_conf_data.set('EXTENDED_VERSION', PROJECT_VERSION + ' (tarball)')
440443
report_conf_data.set('PACKAGE_VERSION_TYPE', 'development')
441444
report_conf_data.set('OS_TYPE', OS_TYPE)
442445
report_conf_data.set('PREFIX', PREFIX)

src/bin/admin/meson.build

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ datadir = get_option('datadir')
55
kea_admin_conf_data.set('datarootdir', '${prefix}/' + datadir)
66
kea_admin_conf_data.set('PACKAGE', 'kea')
77
kea_admin_conf_data.set('PACKAGE_NAME', 'kea')
8-
kea_admin_conf_data.set('PACKAGE_VERSION', project_version)
9-
kea_admin_conf_data.set('EXTENDED_VERSION', project_version + ' (tarball)')
8+
kea_admin_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
9+
kea_admin_conf_data.set('EXTENDED_VERSION', PROJECT_VERSION + ' (tarball)')
1010
kea_admin_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
1111
kea_admin_conf_data.set('abs_top_srcdir', TOP_SOURCE_DIR)
1212
kea_admin_conf_data.set('sbindir', '${prefix}/' + get_option('sbindir'))

src/bin/keactrl/meson.build

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ if NETCONF_DEPS_FOUND
99
else
1010
keactrl_conf_data.set('HAVE_NETCONF', 'no')
1111
endif
12-
keactrl_conf_data.set('EXTENDED_VERSION', project_version + ' (tarball)')
13-
keactrl_conf_data.set('PACKAGE_VERSION', project_version)
12+
keactrl_conf_data.set('EXTENDED_VERSION', PROJECT_VERSION + ' (tarball)')
13+
keactrl_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
1414
keactrl_conf_data.set('runstatedir', '${prefix}/' + RUN_STATE_DIR + '/run')
1515
keactrl_conf_data.set('localstatedir', '${prefix}/' + RUN_STATE_DIR)
1616
kea_configfiles_destdir = f'@SYSCONFDIR@/kea'

src/bin/keactrl/tests/meson.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if NETCONF_DEPS_FOUND
99
else
1010
keactrl_tests_conf_data.set('HAVE_NETCONF', 'no')
1111
endif
12-
keactrl_tests_conf_data.set('PACKAGE_VERSION', project_version)
12+
keactrl_tests_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
1313
configure_file(
1414
input: 'keactrl_tests.sh.in',
1515
output: 'keactrl_tests.sh',

src/bin/shell/meson.build

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ endif
44

55
kea_shell_conf_data = configuration_data()
66
kea_shell_conf_data.set('PYTHON', PYTHON.full_path())
7-
kea_shell_conf_data.set('PACKAGE_VERSION', project_version)
8-
kea_shell_conf_data.set('EXTENDED_VERSION', project_version + ' (tarball)')
7+
kea_shell_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
8+
kea_shell_conf_data.set('EXTENDED_VERSION', PROJECT_VERSION + ' (tarball)')
99

1010
r = run_command(
1111
PYTHON,

src/lib/testutils/meson.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ kea_testutils_lib = static_library(
1717
dhcp_test_lib_conf_data = configuration_data()
1818
dhcp_test_lib_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
1919
dhcp_test_lib_conf_data.set('prefix', PREFIX)
20-
dhcp_test_lib_conf_data.set('PACKAGE_VERSION', project_version)
20+
dhcp_test_lib_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
2121
dhcp_test_lib_conf_data.set('dotlibs', '')
2222
configure_file(
2323
input: 'dhcp_test_lib.sh.in',

0 commit comments

Comments
 (0)