build: pass both filenames to "tools/check-compare-generated.sh" script
It just feels nicer to be explicit about the filenames and not rely on a specific naming. Also, in meson we can directly pass the target as argument, which expands to the filename but also adds a dependency.
This commit is contained in:
@@ -2001,7 +2001,7 @@ if BUILD_DOCS
|
|||||||
src/nmcli/generate-docs-nm-settings-nmcli.xml: src/nmcli/generate-docs-nm-settings-nmcli
|
src/nmcli/generate-docs-nm-settings-nmcli.xml: src/nmcli/generate-docs-nm-settings-nmcli
|
||||||
$(AM_V_GEN) src/nmcli/generate-docs-nm-settings-nmcli > "$@"
|
$(AM_V_GEN) src/nmcli/generate-docs-nm-settings-nmcli > "$@"
|
||||||
check-local-generate-docs-nm-settings-nmcli: src/nmcli/generate-docs-nm-settings-nmcli.xml
|
check-local-generate-docs-nm-settings-nmcli: src/nmcli/generate-docs-nm-settings-nmcli.xml
|
||||||
$(srcdir)/tools/check-compare-generated.sh "$(srcdir)" "$(builddir)" "$<"
|
$(srcdir)/tools/check-compare-generated.sh "$(srcdir)/src/nmcli/generate-docs-nm-settings-nmcli.xml.in" "$(builddir)/src/nmcli/generate-docs-nm-settings-nmcli.xml"
|
||||||
check_local += check-local-generate-docs-nm-settings-nmcli
|
check_local += check-local-generate-docs-nm-settings-nmcli
|
||||||
DISTCLEANFILES += src/nmcli/generate-docs-nm-settings-nmcli.xml
|
DISTCLEANFILES += src/nmcli/generate-docs-nm-settings-nmcli.xml
|
||||||
else
|
else
|
||||||
@@ -4832,7 +4832,7 @@ $(libnmc_setting_settings_doc_h): src/libnmc-setting/settings-docs-input.xml src
|
|||||||
$(AM_V_GEN) "$(PYTHON)" $(srcdir)/tools/generate-docs-settings-docs.py --output $@ --xml $<
|
$(AM_V_GEN) "$(PYTHON)" $(srcdir)/tools/generate-docs-settings-docs.py --output $@ --xml $<
|
||||||
DISTCLEANFILES += $(libnmc_setting_settings_doc_h)
|
DISTCLEANFILES += $(libnmc_setting_settings_doc_h)
|
||||||
check-local-settings-docs: $(libnmc_setting_settings_doc_h)
|
check-local-settings-docs: $(libnmc_setting_settings_doc_h)
|
||||||
$(srcdir)/tools/check-compare-generated.sh "$(srcdir)" "$(builddir)" "$(libnmc_setting_settings_doc_h)"
|
$(srcdir)/tools/check-compare-generated.sh "$(srcdir)/$(libnmc_setting_settings_doc_h).in" "$(builddir)/$(libnmc_setting_settings_doc_h)"
|
||||||
check_local += check-local-settings-docs
|
check_local += check-local-settings-docs
|
||||||
else
|
else
|
||||||
$(libnmc_setting_settings_doc_h): $(libnmc_setting_settings_doc_h).in src/libnmc-setting/.dirstamp
|
$(libnmc_setting_settings_doc_h): $(libnmc_setting_settings_doc_h).in src/libnmc-setting/.dirstamp
|
||||||
|
@@ -31,9 +31,8 @@ if enable_docs
|
|||||||
'check-settings-docs',
|
'check-settings-docs',
|
||||||
find_program(join_paths(source_root, 'tools', 'check-compare-generated.sh')),
|
find_program(join_paths(source_root, 'tools', 'check-compare-generated.sh')),
|
||||||
args: [
|
args: [
|
||||||
source_root,
|
source_root + '/src/libnmc-setting/settings-docs.h.in',
|
||||||
build_root,
|
settings_docs_source,
|
||||||
'src/libnmc-setting/settings-docs.h',
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
|
@@ -81,9 +81,8 @@ if enable_docs
|
|||||||
'check-local-generate-docs-nm-settings-nmcli',
|
'check-local-generate-docs-nm-settings-nmcli',
|
||||||
find_program(join_paths(source_root, 'tools', 'check-compare-generated.sh')),
|
find_program(join_paths(source_root, 'tools', 'check-compare-generated.sh')),
|
||||||
args: [
|
args: [
|
||||||
source_root,
|
source_root + '/src/nmcli/generate-docs-nm-settings-nmcli.xml.in',
|
||||||
build_root,
|
generate_docs_nm_settings_nmcli_xml,
|
||||||
'src/nmcli/generate-docs-nm-settings-nmcli.xml',
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
|
@@ -2,17 +2,16 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
srcdir="$1"
|
f_commited="$1"
|
||||||
builddir="$2"
|
f_generated="$2"
|
||||||
doc_h="$3"
|
|
||||||
|
|
||||||
[ -n "$NMTST_NO_CHECK_SETTINGS_DOCS" ] && exit 0
|
[ -n "$NMTST_NO_CHECK_SETTINGS_DOCS" ] && exit 0
|
||||||
|
|
||||||
cmp -s "${srcdir}/${doc_h}.in" "${builddir}/${doc_h}" && exit 0
|
cmp -s "$f_commited" "$f_generated" && exit 0
|
||||||
|
|
||||||
if [ "$NM_TEST_REGENERATE" = 1 ] ; then
|
if [ "$NM_TEST_REGENERATE" = 1 ] ; then
|
||||||
cp -f "${builddir}/${doc_h}" "${srcdir}/${doc_h}.in"
|
cp -f "$f_generated" "$f_commited"
|
||||||
else
|
else
|
||||||
echo "*** Error: the generated file '${builddir}/${doc_h}' differs from the source file '${srcdir}/${doc_h}.in'. You probably should copy the generated file over to the source file. You can skip this test by setting NMTST_NO_CHECK_SETTINGS_DOCS=yes. You can also automatically copy the file by rerunning the test with NM_TEST_REGENERATE=1"
|
echo "*** Error: the generated file '$f_generated' differs from the source file '$f_commited'. You probably should copy the generated file over to the source file. You can skip this test by setting NMTST_NO_CHECK_SETTINGS_DOCS=yes. You can also automatically copy the file by rerunning the test with NM_TEST_REGENERATE=1"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user