提交 ae280b14 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

cosmetic

上级 ff74c1ff
...@@ -28,7 +28,8 @@ else ...@@ -28,7 +28,8 @@ else
export NINJA = $(PIP_DIR)/bin/ninja export NINJA = $(PIP_DIR)/bin/ninja
endif endif
# Instruct Python where to look for modules it needs, such that `meson` actually runs from installed location. # Instruct Python where to look for modules it needs, such that `meson` actually
# runs from installed location.
# For some reason on Windows adding `:${PYTHONPATH}` breaks things. # For some reason on Windows adding `:${PYTHONPATH}` breaks things.
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
export PYTHONPATH := $(PIP_DIR) export PYTHONPATH := $(PIP_DIR)
...@@ -45,17 +46,21 @@ default: mediasoup-worker ...@@ -45,17 +46,21 @@ default: mediasoup-worker
meson-ninja: meson-ninja:
ifeq ($(wildcard $(PIP_DIR)),) ifeq ($(wildcard $(PIP_DIR)),)
# Updated pip and setuptools are needed for meson # Updated pip and setuptools are needed for meson
# `--system` is not present everywhere and is only needed as workaround for Debian-specific issue (copied from # `--system` is not present everywhere and is only needed as workaround for
# https://github.com/gluster/gstatus/pull/33), fallback to command without `--system` if the first one fails. # Debian-specific issue (copied from
# https://github.com/gluster/gstatus/pull/33), fallback to command without
# `--system` if the first one fails.
$(PYTHON) -m pip install --system --target=$(PIP_DIR) pip setuptools || \ $(PYTHON) -m pip install --system --target=$(PIP_DIR) pip setuptools || \
$(PYTHON) -m pip install --target=$(PIP_DIR) pip setuptools || \ $(PYTHON) -m pip install --target=$(PIP_DIR) pip setuptools || \
echo "Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package" echo "Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package"
# Install `meson` and `ninja` using `pip` into custom location, so we don't depend on system-wide installation. # Install `meson` and `ninja` using `pip` into custom location, so we don't
# depend on system-wide installation.
$(PYTHON) -m pip install --upgrade --target=$(PIP_DIR) $(PIP_BUILD_BINARIES) meson ninja $(PYTHON) -m pip install --upgrade --target=$(PIP_DIR) $(PIP_BUILD_BINARIES) meson ninja
endif endif
setup: meson-ninja setup: meson-ninja
# We try to call `--reconfigure` first as a workaround for https://github.com/ninja-build/ninja/issues/1997 # We try to call `--reconfigure` first as a workaround for this issue:
# https://github.com/ninja-build/ninja/issues/1997
ifeq ($(MEDIASOUP_BUILDTYPE),Release) ifeq ($(MEDIASOUP_BUILDTYPE),Release)
$(MESON) setup \ $(MESON) setup \
--buildtype release \ --buildtype release \
...@@ -135,7 +140,8 @@ format: ...@@ -135,7 +140,8 @@ format:
test: setup test: setup
ifeq ($(MEDIASOUP_WORKER_BIN),) ifeq ($(MEDIASOUP_WORKER_BIN),)
$(MESON) compile -j $(CORES) -C $(MEDIASOUP_OUT_DIR)/$(MEDIASOUP_BUILDTYPE) mediasoup-worker-test $(MESON) compile -j $(CORES) -C $(MEDIASOUP_OUT_DIR)/$(MEDIASOUP_BUILDTYPE) mediasoup-worker-test
# On Windows lcov doesn't work (at least not yet) and we need to add `.exe` to the binary path. # On Windows lcov doesn't work (at least not yet) and we need to add `.exe` to
# the binary path.
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
$(MEDIASOUP_OUT_DIR)/$(MEDIASOUP_BUILDTYPE)/mediasoup-worker-test.exe --invisibles --use-colour=yes $(MEDIASOUP_TEST_TAGS) $(MEDIASOUP_OUT_DIR)/$(MEDIASOUP_BUILDTYPE)/mediasoup-worker-test.exe --invisibles --use-colour=yes $(MEDIASOUP_TEST_TAGS)
else else
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论