Pythonをコンパイルしたいです。私はGitHubのからリポジトリをクローン:ファイルのタイムスタンプのためにPythonをコンパイルしようとしていません
git clone --depth=1 --branch=2.7 https://github.com/python/cpython.git
設定は動作しますが、Pythonのが発見されていないため、建物が失敗する:
$ cd cpython
$ ./configure
...
$ make
/bin/mkdir -p Include
./Parser/asdl_c.py -h Include ./Parser/Python.asdl
/usr/bin/env: python: No such file or directory
Makefile:718: recipe for target 'Include/Python-ast.h' failed
make: *** [Include/Python-ast.h] Error 127
make --debug
が語るようInclude/Python-ast.h
が、Parser/asdl_c.py
よりも新しいので、これは次のとおりです。
...
Prerequisite 'Parser/Python.asdl' is newer than target 'Include/Python-ast.h'.
Prerequisite 'Parser/asdl.py' is newer than target 'Include/Python-ast.h'.
Prerequisite 'Parser/asdl_c.py' is newer than target 'Include/Python-ast.h'.
Must remake target 'Include/Python-ast.h'.
実際に、ヘッダーはPythonスクリプトの後に少しクローン化されました:
ヘッダに触れる$ ls --full-time Include/Python-ast.h Parser/asdl_c.py
-rw-r--r-- 1 piwi piwi 21113 2016-09-08 15:22:32.984000000 +0200 Include/Python-ast.h
-rwxr-xr-x 1 piwi piwi 41414 2016-09-08 15:22:33.248000000 +0200 Parser/asdl_c.py
は、この特定のケースで問題を回避します:
$ touch Include/Python-ast.h
$ make
... compiles ...
は、この動作を防止するための適切な方法はありますか?
ありがとう、
を参照してください。 'make'または' make all'は常にtarget1とtarget2をリメイクします。 – ElpieKay
別の試みは 'make -B'または' make -always-make'です。 – ElpieKay
@ElpieKayありがとうございます。 – piwi