diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2017-01-07 14:59:30 +0100 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2017-01-07 15:00:22 +0100 |
commit | 68d737bd92c7a8c9a12033604e171581b14fe232 (patch) | |
tree | 21637ab993aa9b512a989abec49105d093993fc9 | |
parent | c17c26f404ad064b7b0e67697cf10c9dada9ca37 (diff) | |
download | mpv-68d737bd92c7a8c9a12033604e171581b14fe232.tar.bz2 mpv-68d737bd92c7a8c9a12033604e171581b14fe232.tar.xz |
build: always run code generators before compiling
-rw-r--r-- | waftools/generators/sources.py | 1 | ||||
-rw-r--r-- | wscript_build.py | 19 |
2 files changed, 3 insertions, 17 deletions
diff --git a/waftools/generators/sources.py b/waftools/generators/sources.py index ef26a514db..96224cf839 100644 --- a/waftools/generators/sources.py +++ b/waftools/generators/sources.py @@ -18,6 +18,7 @@ def __file2string__(ctx, **kwargs): ) def execf(self, fn): + setattr(self, 'before', ['c']) setattr(self, 'rule', ' ') # waf doesn't print the task with no rule target = getattr(self, 'target', None) out = self.path.find_or_declare(target) diff --git a/wscript_build.py b/wscript_build.py index 52871c2031..0d7b3d8c3f 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -55,35 +55,30 @@ def build(ctx): features = "file2string", source = "TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns", target = "osdep/macosx_icon.inc", - before = ['c'] ) ctx( features = "file2string", source = "video/out/x11_icon.bin", target = "video/out/x11_icon.inc", - before = ['c'] ) ctx( features = "file2string", source = "etc/input.conf", target = "input/input_conf.h", - before = ['c'] ) ctx( features = "file2string", source = "etc/builtin.conf", target = "player/builtin_conf.inc", - before = ['c'] ) ctx( features = "file2string", source = "sub/osd_font.otf", target = "sub/osd_font.h", - before = ['c'] ) lua_files = ["defaults.lua", "assdraw.lua", "options.lua", "osc.lua", @@ -95,20 +90,10 @@ def build(ctx): features = "file2string", source = fn, target = os.path.splitext(fn)[0] + ".inc", - before = ['c'] ) - ctx( - features = "ebml_header", - target = "ebml_types.h", - before = ['c'] - ) - - ctx( - features = "ebml_definitions", - target = "ebml_defs.c", - before = ['c'] - ) + ctx(features = "ebml_header", target = "ebml_types.h") + ctx(features = "ebml_definitions", target = "ebml_defs.c") if ctx.env.DEST_OS == 'win32': main_fn_c = 'osdep/main-fn-win.c' |