summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2018-09-11 13:48:40 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2018-09-13 14:35:25 +0200
commit10ca2444b953e5bc9f657cda96c67389e0e21568 (patch)
tree7b98c4c8536e98c3fa068fe150c010ebb5c0eb1d /tools
parentfb0d36a883501dc616cde63ddbc8b9aa757d86d5 (diff)
downloadNetworkManager-10ca2444b953e5bc9f657cda96c67389e0e21568.tar.gz
build: support meson builds in create-exports script
(cherry picked from commit 9b4bc0824c1d8925f1ecfa4856757d322f030427)
Diffstat (limited to 'tools')
-rwxr-xr-xtools/create-exports-NetworkManager.sh21
1 files changed, 15 insertions, 6 deletions
diff --git a/tools/create-exports-NetworkManager.sh b/tools/create-exports-NetworkManager.sh
index 3c2494e1dc..7d359005b7 100755
--- a/tools/create-exports-NetworkManager.sh
+++ b/tools/create-exports-NetworkManager.sh
@@ -35,7 +35,7 @@ call_nm() {
}
get_symbols_nm () {
- call_nm ./src/.libs/libNetworkManager.a |
+ call_nm ./src/${libs}libNetworkManager.a |
sed -n 's/^[tTDGRBS] //p' |
_sort
}
@@ -47,9 +47,9 @@ EOF
}
get_symbols_missing() {
- (for f in $(find ./src/settings/plugins/*/.libs/ \
- ./src/devices/*/.libs/ \
- ./src/ppp/.libs/ -name '*.so'); do
+ (for f in $(find ./src/settings/plugins/*/${libs} \
+ ./src/devices/*/${libs} \
+ ./src/ppp/${libs} -name '*.so'); do
call_nm "$f" |
sed -n 's/^\([U]\) \(\(nm_\|nmp_\|_nm\|NM\|_NM\|c_siphash_\).*\)$/\2/p'
done) |
@@ -90,16 +90,25 @@ local:
EOF
}
-test -f ./src/.libs/libNetworkManager.a || die "must be called from NetworkManager \$(top_builddir) after building the tree"
+if [ -f "build.ninja" ]; then
+ from_meson=1
+ libs=
+else
+ libs=.libs/
+fi
+
+test -f ./src/${libs}libNetworkManager.a || die "must be called from NetworkManager top build dir after building the tree"
case "$1" in
rebuild)
+ [ -n "$from_meson" ] && die "can't do a build when called from meson"
do_rebuild
;;
build)
+ [ -n "$from_meson" ] && die "can't do a build when called from meson"
do_build
;;
- '--called-from-make')
+ --called-from-build)
if test -z "${NM_BUILD_NO_CREATE_EXPORTS+x}"; then
do_update
else