1
我正在使用GnuWin32項目,並創建了makefile
來管理某些代碼的編譯。在命令行我運行:無法使用之前定義的var的
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/[email protected] $^
print_%:
@echo $* = ${$*}
當我運行make print_UIC
我得到:
UIC = python "E:\PortableApps\Portable Python 2.7.3.1\App\Lib\site-packages\PyQt4\uic\pyuic.py"
但是當我執行「make爲主。 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
它運行沒有問題,結果如預期。
怎麼了?
我以爲變量用括號包圍 – CBIII