1 回答

TA貢獻1816條經驗 獲得超6個贊
正如評論中簡要描述的那樣,重建的原因是使用Decider('make')(即通過時間戳檢查)與源文件的有效全局匹配來捕獲自動生成的文件。
scons --debug=explain按照 bdbaddog 在問題評論中的建議運行時,很容易看到這一點。
雖然有點脆弱,但最簡單的解決方案是修改發射器,留下以下內容(見--->標記):
def _ppl_emitter(target, source, env):
""" Appends any dependencies found in the .mk file to the list of sources.
The target should be like [<SD>/A.lvlibp],
and the source should be like [<src>/A.lvlib]
"""
if not source:
return target, source
exts_tuple = tuple(env['SRC_EXTS'].split(' '))
src_files = _get_other_deps(source, exts_tuple)
--->filtered_files = list(filter(lambda x: "Get PPL Version.vi" not in x, src_files))
if __verbose:
_print_info("Adding " + str(filtered_files) + " as dependencies")
env.Depends(target, filtered_files)
depsList, nodeDepsList = _get_ppl_deps(str(source[0]), env)
if nodeDepsList:
source += [os.path.normpath(os.path.join(env['LV_Dirs'].storageDir, str(pplNode))) for pplNode in nodeDepsList]
return target, source
通過刪除此文件,目標不再顯式依賴生成的文件(這與 Decider 調用無關)。
此外,Decider('make')從 SConstruct 文件中刪除該行允許刪除和重新下載整個源存儲庫,而不會觸發重建。
作為旁注,特定于 Git 的代碼也被刪除并放置在由 Builder 調用的代碼中 - 這樣,它另外(為了減少代碼收益)僅在需要重建時調用(而不是每次都調用) SCons 運行)。
添加回答
舉報