add NoCache wrapper to Command
This commit is contained in:
parent
43f62a2c2a
commit
57ae75876f
|
@ -118,6 +118,7 @@ env_base.__class__.split_lib = methods.split_lib
|
|||
env_base.__class__.add_shared_library = methods.add_shared_library
|
||||
env_base.__class__.add_library = methods.add_library
|
||||
env_base.__class__.add_program = methods.add_program
|
||||
env_base.__class__.CommandNoCache = methods.CommandNoCache
|
||||
|
||||
env_base["x86_libtheora_opt_gcc"] = False
|
||||
env_base["x86_libtheora_opt_vc"] = False
|
||||
|
|
|
@ -89,7 +89,7 @@ env.add_source_files(env.core_sources, "*.cpp")
|
|||
|
||||
# Make binders
|
||||
import make_binders
|
||||
env.Command(['method_bind.gen.inc', 'method_bind_ext.gen.inc'], 'make_binders.py', make_binders.run)
|
||||
env.CommandNoCache(['method_bind.gen.inc', 'method_bind_ext.gen.inc'], 'make_binders.py', make_binders.run)
|
||||
|
||||
|
||||
# Chain load SCsubs
|
||||
|
|
10
editor/SCsub
10
editor/SCsub
|
@ -177,11 +177,11 @@ if (env["tools"] == "yes"):
|
|||
|
||||
# API documentation
|
||||
env.Depends("#editor/doc_data_compressed.gen.h", "#doc/base/classes.xml")
|
||||
env.Command("#editor/doc_data_compressed.gen.h", "#doc/base/classes.xml", make_doc_header)
|
||||
env.CommandNoCache("#editor/doc_data_compressed.gen.h", "#doc/base/classes.xml", make_doc_header)
|
||||
|
||||
# Certificates
|
||||
env.Depends("#editor/certs_compressed.gen.h", "#thirdparty/certs/ca-certificates.crt")
|
||||
env.Command("#editor/certs_compressed.gen.h", "#thirdparty/certs/ca-certificates.crt", make_certs_header)
|
||||
env.CommandNoCache("#editor/certs_compressed.gen.h", "#thirdparty/certs/ca-certificates.crt", make_certs_header)
|
||||
|
||||
import glob
|
||||
path = env.Dir('.').abspath
|
||||
|
@ -189,17 +189,17 @@ if (env["tools"] == "yes"):
|
|||
# Translations
|
||||
tlist = glob.glob(path + "/translations/*.po")
|
||||
env.Depends('#editor/translations.gen.h', tlist)
|
||||
env.Command('#editor/translations.gen.h', tlist, make_translations_header)
|
||||
env.CommandNoCache('#editor/translations.gen.h', tlist, make_translations_header)
|
||||
|
||||
# Fonts
|
||||
flist = glob.glob(path + "/../thirdparty/fonts/*.ttf")
|
||||
flist.append(glob.glob(path + "/../thirdparty/fonts/*.otf"))
|
||||
env.Depends('#editor/builtin_fonts.gen.h', flist)
|
||||
env.Command('#editor/builtin_fonts.gen.h', flist, make_fonts_header)
|
||||
env.CommandNoCache('#editor/builtin_fonts.gen.h', flist, make_fonts_header)
|
||||
|
||||
# Authors
|
||||
env.Depends('#editor/authors.gen.h', "../AUTHORS.md")
|
||||
env.Command('#editor/authors.gen.h', "../AUTHORS.md", make_authors_header)
|
||||
env.CommandNoCache('#editor/authors.gen.h', "../AUTHORS.md", make_authors_header)
|
||||
|
||||
|
||||
env.add_source_files(env.editor_sources, "*.cpp")
|
||||
|
|
|
@ -1680,3 +1680,8 @@ def add_program(env, name, sources, **args):
|
|||
program = env.Program(name, sources, **args)
|
||||
env.NoCache(program)
|
||||
return program
|
||||
|
||||
def CommandNoCache(env, target, sources, command, **args):
|
||||
result = env.Command(target, sources, command, **args)
|
||||
env.NoCache(result)
|
||||
return result
|
||||
|
|
Loading…
Reference in New Issue