mirror of https://github.com/mpv-player/mpv
build: always run code generators before compiling
This commit is contained in:
parent
c17c26f404
commit
68d737bd92
|
@ -18,6 +18,7 @@ def __file2string__(ctx, **kwargs):
|
||||||
)
|
)
|
||||||
|
|
||||||
def execf(self, fn):
|
def execf(self, fn):
|
||||||
|
setattr(self, 'before', ['c'])
|
||||||
setattr(self, 'rule', ' ') # waf doesn't print the task with no rule
|
setattr(self, 'rule', ' ') # waf doesn't print the task with no rule
|
||||||
target = getattr(self, 'target', None)
|
target = getattr(self, 'target', None)
|
||||||
out = self.path.find_or_declare(target)
|
out = self.path.find_or_declare(target)
|
||||||
|
|
|
@ -55,35 +55,30 @@ def build(ctx):
|
||||||
features = "file2string",
|
features = "file2string",
|
||||||
source = "TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns",
|
source = "TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns",
|
||||||
target = "osdep/macosx_icon.inc",
|
target = "osdep/macosx_icon.inc",
|
||||||
before = ['c']
|
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx(
|
ctx(
|
||||||
features = "file2string",
|
features = "file2string",
|
||||||
source = "video/out/x11_icon.bin",
|
source = "video/out/x11_icon.bin",
|
||||||
target = "video/out/x11_icon.inc",
|
target = "video/out/x11_icon.inc",
|
||||||
before = ['c']
|
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx(
|
ctx(
|
||||||
features = "file2string",
|
features = "file2string",
|
||||||
source = "etc/input.conf",
|
source = "etc/input.conf",
|
||||||
target = "input/input_conf.h",
|
target = "input/input_conf.h",
|
||||||
before = ['c']
|
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx(
|
ctx(
|
||||||
features = "file2string",
|
features = "file2string",
|
||||||
source = "etc/builtin.conf",
|
source = "etc/builtin.conf",
|
||||||
target = "player/builtin_conf.inc",
|
target = "player/builtin_conf.inc",
|
||||||
before = ['c']
|
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx(
|
ctx(
|
||||||
features = "file2string",
|
features = "file2string",
|
||||||
source = "sub/osd_font.otf",
|
source = "sub/osd_font.otf",
|
||||||
target = "sub/osd_font.h",
|
target = "sub/osd_font.h",
|
||||||
before = ['c']
|
|
||||||
)
|
)
|
||||||
|
|
||||||
lua_files = ["defaults.lua", "assdraw.lua", "options.lua", "osc.lua",
|
lua_files = ["defaults.lua", "assdraw.lua", "options.lua", "osc.lua",
|
||||||
|
@ -95,20 +90,10 @@ def build(ctx):
|
||||||
features = "file2string",
|
features = "file2string",
|
||||||
source = fn,
|
source = fn,
|
||||||
target = os.path.splitext(fn)[0] + ".inc",
|
target = os.path.splitext(fn)[0] + ".inc",
|
||||||
before = ['c']
|
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx(
|
ctx(features = "ebml_header", target = "ebml_types.h")
|
||||||
features = "ebml_header",
|
ctx(features = "ebml_definitions", target = "ebml_defs.c")
|
||||||
target = "ebml_types.h",
|
|
||||||
before = ['c']
|
|
||||||
)
|
|
||||||
|
|
||||||
ctx(
|
|
||||||
features = "ebml_definitions",
|
|
||||||
target = "ebml_defs.c",
|
|
||||||
before = ['c']
|
|
||||||
)
|
|
||||||
|
|
||||||
if ctx.env.DEST_OS == 'win32':
|
if ctx.env.DEST_OS == 'win32':
|
||||||
main_fn_c = 'osdep/main-fn-win.c'
|
main_fn_c = 'osdep/main-fn-win.c'
|
||||||
|
|
Loading…
Reference in New Issue