Better meson build

This commit is contained in:
xarkes 2017-07-28 14:02:27 +02:00 committed by radare
parent 00be0a19d3
commit d4d07ee1ca
4 changed files with 15 additions and 12 deletions

View file

@ -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:

View file

@ -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

View file

@ -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')

View file

@ -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