]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
new Makefile target mesonbuild
authorYann Collet <cyan@fb.com>
Thu, 17 Oct 2024 22:42:02 +0000 (15:42 -0700)
committerYann Collet <cyan@fb.com>
Thu, 17 Oct 2024 22:42:02 +0000 (15:42 -0700)
for easier local testing

.github/workflows/dev-short-tests.yml
Makefile

index 7713a897c803f1be5f8121ebd6015386c88286c9..99aa166c9dd2843cc77c94540d5822c6507a8b90 100644 (file)
@@ -232,10 +232,10 @@ jobs:
             -Dbin_tests=true \
             -Dbin_contrib=true \
             -Ddefault_library=both \
-            build/meson builddir
-          ninja -C builddir/
-          meson test -C builddir/ --print-errorlogs
-          meson install -C builddir --destdir staging/
+            build/meson mesonBuild
+          ninja -C mesonBuild/
+          meson test -C mesonBuild/ --print-errorlogs
+          meson install -C mesonBuild --destdir staging/
 
   meson-mingw-cross-compilation:
     runs-on: ubuntu-latest
index 5598cdd031f8f2a926014986029d6c3352d70b95..95d45afb46dd4e35a308f64cfb1570332c7ae5ea 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -145,7 +145,7 @@ clean:
        $(Q)$(MAKE) -C contrib/largeNbDicts $@ > $(VOID)
        $(Q)$(MAKE) -C contrib/externalSequenceProducer $@ > $(VOID)
        $(Q)$(RM) zstd$(EXT) zstdmt$(EXT) tmp*
-       $(Q)$(RM) -r lz4 cmakebuild install
+       $(Q)$(RM) -r lz4 cmakebuild mesonbuild install
        @echo Cleaning completed
 
 #------------------------------------------------------------------------------
@@ -415,6 +415,24 @@ cmakebuild:
        $(CMAKE) --build cmakebuild --target install -- -j V=1
        cd cmakebuild; ctest -V -L Medium
 
+MESON ?= meson
+NINJA ?= ninja
+
+.PHONY: mesonbuild
+mesonbuild:
+       $(MESON) setup \
+               --buildtype=debugoptimized \
+               -Db_lundef=false \
+               -Dauto_features=enabled \
+               -Dbin_programs=true \
+               -Dbin_tests=true \
+               -Dbin_contrib=true \
+               -Ddefault_library=both \
+               build/meson mesonbuild
+       $(NINJA) -C mesonbuild/
+       $(MESON) test -C mesonbuild/ --print-errorlogs
+       $(MESON) install -C mesonbuild --destdir staging/
+
 .PHONY: c89build gnu90build c99build gnu99build c11build bmix64build bmix32build bmi32build staticAnalyze
 c89build: clean
        $(CC) -v