【发布时间】:2019-11-03 11:27:09
【问题描述】:
我正在尝试使用 python 构建一些文件,但它以错误的方式执行它。
我尝试在 linux 中构建一些文件。
当我在终端中使用“make ./package/feeds/proj/{clean,compile} V=s”命令时,它工作正常,但是当我尝试使用 python 脚本运行它时,使用命令“p = subprocess.call(r'/usr/bin/make package/feeds/proj/{clean,compile} V=s',shell = True))”,它的行为有所不同。
日志:
在终端运行时:
make[1]: Entering directory '/local/mnt/workspace/rubaeshk/unused2/qsdk'
make[2]: Entering directory '/local/mnt/workspace/rubaeshk/unused2/qsdk/package/feeds/whc/qca-whc-crash-log'
rm -f /local/mnt/workspace/rubaeshk/unused2/qsdk/bin/ipq/packages/whc/qca-whc-crash-log_*
..(log continued until successfully built)
通过 python 脚本运行时:
WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!
make[1]: Entering directory '/local/mnt/workspace/rubaeshk/unused2/qsdk'
make[1]: *** No rule to make target 'package/feeds/whc/qca-whc-crash-log/{clean,compile}'. Stop.
make[1]: Leaving directory '/local/mnt/workspace/rubaeshk/unused2/qsdk'
/local/mnt/workspace/rubaeshk/unused2/qsdk/include/toplevel.mk:186: recipe for target 'package/feeds/whc/qca-whc-crash-log/{clean,compile}' failed
make: *** [package/feeds/whc/qca-whc-crash-log/{clean,compile}] Error 2
谁能看看哪里出错了..
【问题讨论】:
标签: python linux makefile subprocess os.system