devtools: remove useless files from ABI reference
authorThomas Monjalon <thomas@monjalon.net>
Sun, 24 May 2020 17:43:41 +0000 (19:43 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 3 Jul 2020 08:10:22 +0000 (10:10 +0200)
When building an ABI reference with meson, some static libraries
are built and linked in apps. They are useless and take a lot of space.
Those binaries, and other useless files (examples and doc files)
in the share/ directory, are removed after being installed.

In order to save time when building the ABI reference,
the examples (which are not installed anyway) are not compiled.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
devtools/test-meson-builds.sh

index d96d1af..a87de63 100755 (executable)
@@ -154,10 +154,16 @@ build () # <directory> <target compiler | cross file> <meson options>
                        fi
 
                        rm -rf $abirefdir/build
-                       config $abirefdir/src $abirefdir/build $cross $*
+                       config $abirefdir/src $abirefdir/build $cross \
+                               -Dexamples= $*
                        compile $abirefdir/build
                        install_target $abirefdir/build $abirefdir/$targetdir
                        $srcdir/devtools/gen-abi.sh $abirefdir/$targetdir
+
+                       # save disk space by removing static libs and apps
+                       find $abirefdir/$targetdir/usr/local -name '*.a' -delete
+                       rm -rf $abirefdir/$targetdir/usr/local/bin
+                       rm -rf $abirefdir/$targetdir/usr/local/share
                fi
 
                install_target $builds_dir/$targetdir \