114 Star 1 Fork 17

src-openEuler/trace-cmd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0002-trace-cmd-Fix-the-logic-behind-SWIG_DEFINED-in-the-M.patch 1.68 KB
一键复制 编辑 原始数据 按行查看 历史
dogsheng 提交于 2019-12-14 21:40 +08:00 . Package init
From 2abc926978474c4588ad43fd49c54f6a7fa3abaf Mon Sep 17 00:00:00 2001
From: "Vladislav Valtchev (VMware)" <vladislav.valtchev@gmail.com>
Date: Tue, 6 Feb 2018 10:48:59 +0200
Subject: [PATCH 01/25] trace-cmd: Fix the logic behind SWIG_DEFINED in the
Makefile
At least on Ubuntu, the $(shell ...) command used in the master Makefile to test
for the existence of the 'swig' command does not work in the negative case.
That causes the build to report ugly errors in case 'swig' is not installed on
the system.
This one-line patch, fixes the problem by using the POSIX 'comamnd -v {CMD}'
in $(shell ...) to detect the presence of the swig and restores this way the
fake report_noswig target.
Signed-off-by: Vladislav Valtchev (VMware) <vladislav.valtchev@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 6217037..85433b8 100644
--- a/Makefile
+++ b/Makefile
@@ -92,7 +92,7 @@ ifndef VERBOSE
VERBOSE = 0
endif
-SWIG_DEFINED := $(shell if swig -help &> /dev/null; then echo 1; else echo 0; fi)
+SWIG_DEFINED := $(shell if command -v swig; then echo 1; else echo 0; fi)
ifeq ($(SWIG_DEFINED), 0)
BUILD_PYTHON := report_noswig
NO_PYTHON = 1
@@ -105,7 +105,7 @@ PYTHON_GUI := ctracecmd.so ctracecmdgui.so
PYTHON_VERS ?= python
# Can build python?
-ifeq ($(shell sh -c "pkg-config --cflags $(PYTHON_VERS) > /dev/null 2>&1 && which swig && echo y"), y)
+ifeq ($(shell sh -c "pkg-config --cflags $(PYTHON_VERS) > /dev/null 2>&1 && echo y"), y)
PYTHON_PLUGINS := plugin_python.so
BUILD_PYTHON := $(PYTHON) $(PYTHON_PLUGINS)
PYTHON_SO_INSTALL := ctracecmd.install
--
2.14.3
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/trace-cmd.git
git@gitee.com:src-openeuler/trace-cmd.git
src-openeuler
trace-cmd
trace-cmd
openEuler-20.03-LTS-SP2

搜索帮助