summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2016-12-17 17:12:56 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2017-01-05 11:25:18 +0100
commit737e3b175886618eb28b46f3feed218fdad9c517 (patch)
tree5e755481ae5330d7af1ff720e3c4a79cac5467be /wscript_build.py
parent0e7dd6d4ff3c7510a147ba68f43040828dcf486f (diff)
downloadmpv-737e3b175886618eb28b46f3feed218fdad9c517.tar.bz2
mpv-737e3b175886618eb28b46f3feed218fdad9c517.tar.xz
build: use matroska.py & file2string.py as python modules
Diffstat (limited to 'wscript_build.py')
-rw-r--r--wscript_build.py59
1 files changed, 42 insertions, 17 deletions
diff --git a/wscript_build.py b/wscript_build.py
index b7c7b39464..52871c2031 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -51,39 +51,64 @@ def build(ctx):
ctx.load('waf_customizations')
ctx.load('generators.sources')
- ctx.file2string(
+ ctx(
+ features = "file2string",
source = "TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns",
- target = "osdep/macosx_icon.inc")
+ target = "osdep/macosx_icon.inc",
+ before = ['c']
+ )
- ctx.file2string(
+ ctx(
+ features = "file2string",
source = "video/out/x11_icon.bin",
- target = "video/out/x11_icon.inc")
+ target = "video/out/x11_icon.inc",
+ before = ['c']
+ )
- ctx.file2string(
+ ctx(
+ features = "file2string",
source = "etc/input.conf",
- target = "input/input_conf.h")
+ target = "input/input_conf.h",
+ before = ['c']
+ )
- ctx.file2string(
+ ctx(
+ features = "file2string",
source = "etc/builtin.conf",
- target = "player/builtin_conf.inc")
+ target = "player/builtin_conf.inc",
+ before = ['c']
+ )
- ctx.file2string(
+ ctx(
+ features = "file2string",
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",
"ytdl_hook.lua"]
+
for fn in lua_files:
fn = "player/lua/" + fn
- ctx.file2string(source = fn, target = os.path.splitext(fn)[0] + ".inc")
+ ctx(
+ features = "file2string",
+ source = fn,
+ target = os.path.splitext(fn)[0] + ".inc",
+ before = ['c']
+ )
- ctx.matroska_header(
- source = "demux/ebml.c demux/demux_mkv.c",
- target = "ebml_types.h")
+ ctx(
+ features = "ebml_header",
+ target = "ebml_types.h",
+ before = ['c']
+ )
- ctx.matroska_definitions(
- source = "demux/ebml.c",
- target = "ebml_defs.c")
+ ctx(
+ features = "ebml_definitions",
+ target = "ebml_defs.c",
+ before = ['c']
+ )
if ctx.env.DEST_OS == 'win32':
main_fn_c = 'osdep/main-fn-win.c'