我正在使用GnuWin32项目,并创建了一个makefile
来管理一些代码的编译。在命令行中我运行:
set PYUIC=python "E:\PortableApps\Portable Python 2.7.3.1\App\Lib\site-packages\PyQt4\uic\pyuic.py"
我的make文件包含以下内容:
UIC := %pyuic%
HELP_VIEW := less
vpath %.ui ./ui
vpath %.py ./py
.PHONY: help
help:
${HELP_VIEW} help
%.py: %.ui
${UIC} -o ./py/$@ $^
print_%:
@echo $* = ${$*}
当我跑步时,make print_UIC
我得到:
UIC = python "E:\PortableApps\Portable Python 2.7.3.1\App\Lib\site-packages\PyQt4\uic\pyuic.py"
但是当我运行'make main.py'时,我得到:
%pyuic% -o ./py/main.py ./ui/main.ui
process_begin: CreateProcess(NULL, %pyuic% -o ./py/main.py ./ui/main.ui, ...) fa
iled.
make (e=2): The system cannot find the file specified.
make: *** [main.py] Error 2
当我运行%pyuic% -o ./py/main.py ./ui/main.ui
它时,它运行没有问题,结果符合预期。
怎么了?