summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-09-15 01:04:32 +0200
committerMichael Biebl <biebl@debian.org>2018-09-15 01:04:32 +0200
commitc240974325c552cad177c457d6ff04e381fd77a3 (patch)
tree2fe5561359b767db15292c84447be8075a75388a /tools
parent8f7a3cbbdd0c0a48277c341dd3a8ec8743ae9735 (diff)
New upstream version 1.14.0 upstream/1.14.0
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 3c2494e1..7d359005 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