diff --git a/Makefile b/Makefile index 29f8be38ff..4e36192e18 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ include global.mk PREVIOUS_RELEASE=1.5.0 MESON?=meson +PYTHON?=python R2R=radare2-regressions R2R_URL=$(shell doc/repo REGRESSIONS) R2BINS=$(shell cd binr ; echo r*2 r2agent r2pm r2-indent) @@ -405,7 +406,10 @@ meson-config meson-cfg meson-conf: echo TODO meson: build + @echo "[ SDB Build ]" + $(PYTHON) sys/meson_sdb.py cmp plugins.meson.cfg plugins.cfg || $(MAKE) meson-config + @echo "[ Ninja Build ]" ninja -C build meson-install: diff --git a/meson.bat b/meson.bat index eec2399762..4e7997e5bf 100644 --- a/meson.bat +++ b/meson.bat @@ -62,10 +62,11 @@ IF EXIST %BUILDDIR% GOTO BUILD python meson.py --prefix=%CD% %BUILDDIR% %RELEASE% %DEFAULT_LIBRARY% --backend %BACKEND% :BUILD +CALL :SDB_BUILD IF "%BUILD%"=="msbuild" GOTO MSBUILD ECHO [ R2 MESON NINJA BUILD ] ninja -C %BUILDDIR% -exit /b %errorlevel% +EXIT /b %errorlevel% :MSBUILD ECHO [ R2 MESON MSBUILD ] @@ -73,7 +74,7 @@ IF "%XP%"=="1" ( python sys\meson_extra.py ) msbuild %BUILDDIR%\radare2.sln -exit /b %errorlevel% +EXIT /b %errorlevel% :BUILDPROJECT ECHO [ R2 MESON BUILDING %BACKEND% SLN] @@ -85,6 +86,12 @@ IF "%XP%"=="1" ( GOTO EXIT :REBUILD -python.exe meson.py --internal regenerate %CD% "%CD%\%BUILDDIR%" --backend %BACKEND% %RELEASE% %DEFAULT_LIBRARY% +python meson.py --internal regenerate %CD% "%CD%\%BUILDDIR%" --backend %BACKEND% %RELEASE% %DEFAULT_LIBRARY% :EXIT +EXIT /B 0 + +:SDB_BUILD +ECHO [ SDB BUILD AND GENERATION ] +python sys\meson_sdb.py +EXIT /B 0 diff --git a/meson.build b/meson.build index ec5701db85..d319202406 100644 --- a/meson.build +++ b/meson.build @@ -122,14 +122,6 @@ configure_file(input : 'libr/include/r_version.h.in', # Copy missing header run_command('python', '-c', '__import__("shutil").copyfile("shlr/spp/config.def.h", "shlr/spp/config.h")') -message(' --- Building sdb and generating files --- ') -r = run_command('python', 'sys/meson_sdb.py') -if r.returncode() != 0 - error('Failed.') - error(r.stderr()) -endif - -message(' --- Building radare2 --- ') subdir('shlr/') subdir('libr/util') subdir('binr/rax2') diff --git a/sys/meson_sdb.py b/sys/meson_sdb.py index 9c153b769b..cacb3c2597 100644 --- a/sys/meson_sdb.py +++ b/sys/meson_sdb.py @@ -44,7 +44,7 @@ def main(): continue inf, base, ext = get_extension(f) inf = os.path.join(folder, inf) - if os.path.isdir(inf): + if os.path.isdir(inf) and not os.path.islink(inf): DATADIRS.append(inf) l += 1 continue