summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-04-23 11:33:47 +0200
committerThomas Haller <thaller@redhat.com>2019-04-23 11:45:06 +0200
commit17adf58d5dc5d8253f2322e92b96bd176476b6f3 (patch)
tree137c68910082155c6c76b20db8291e06b31f4ee8
parenta9b4362fc52886c0d68a9af0956e8f21d8ddd25a (diff)
downloadNetworkManager-17adf58d5dc5d8253f2322e92b96bd176476b6f3.tar.gz
tools: fix out-of-tree build test "tools/check-docs.sh" for duplicate generated sources
When we do an in-tree-build with autotools and an out-of-tree build with meson (all in the same source directory), then we have the following files: libnm-core/nm-core-enum-types.h libnm/nm-enum-types.h build/libnm-core/nm-core-enum-types.h build/libnm/nm-enum-types.h This caused "tools/check-docs.sh" for `ninja -C build test` to fail, because the files are detected twice: --- command --- /data/src/NetworkManager/tools/check-docs.sh /data/src/NetworkManager /data/src/NetworkManager/build --- stderr --- 8a9 > nm-core-enum-types 38a40 > nm-enum-types *** Error: libnm classes not included in docs/libnm/libnm-docs.xml *** -------
-rwxr-xr-xtools/check-docs.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/check-docs.sh b/tools/check-docs.sh
index 04f03e76d3..e0ed78376a 100755
--- a/tools/check-docs.sh
+++ b/tools/check-docs.sh
@@ -23,7 +23,13 @@ same_lines() {
libnm_headers() {
(
- ls -1 "$1/libnm"/*.h "$1/libnm-core"/*.h
+ ls -1 "$1/libnm"/*.h "$1/libnm-core"/*.h | \
+ if [ -n "$2" ]; then
+ grep -v -F "$1/libnm-core/nm-core-enum-types.h" | \
+ grep -v -F "$1/libnm/nm-enum-types.h"
+ else
+ cat
+ fi
if [ -n "$2" ]; then
ls -1 "$2/libnm"/*.h "$2/libnm-core"/*.h
fi