From 0181e640c9e9bea9f6aefa45c3e2deeda2ddc060 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 2 Dec 2024 20:43:48 +0300 Subject: [PATCH] 3rdparty: wscript: set explicit names for correct dependency calc of generated files This helps avoid issue when the bzip2 or libogg are compiled before header is generated for them. In theory, we shouldn't do that, but I guess dependency calculation through include directives doesn't work when the file doesn't exist. --- 3rdparty/bzip2/wscript | 3 ++- 3rdparty/libogg/wscript | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/3rdparty/bzip2/wscript b/3rdparty/bzip2/wscript index 6204ca04..126a3c75 100644 --- a/3rdparty/bzip2/wscript +++ b/3rdparty/bzip2/wscript @@ -14,13 +14,14 @@ def configure(conf): conf.define('BZ_UNIX', 1) def build(bld): - bld(features = 'subst', source = 'bzip2/bz_version.h.in', target = 'bzip2/bz_version.h', BZ_VERSION='1.1.0-fwgs') + bld(features = 'subst', source = 'bzip2/bz_version.h.in', target = 'bzip2/bz_version.h', BZ_VERSION='1.1.0-fwgs', name = 'bz_version') bz_sources = ['bzip2/blocksort.c', 'bzip2/huffman.c', 'bzip2/crctable.c', 'bzip2/randtable.c', 'bzip2/compress.c', 'bzip2/decompress.c', 'bzip2/bzlib.c'] bld.stlib( source = bz_sources, target = 'bzip2', + use = 'bz_version', includes = 'bzip2/', export_includes = 'bzip2/' ) diff --git a/3rdparty/libogg/wscript b/3rdparty/libogg/wscript index c1411046..026e6073 100644 --- a/3rdparty/libogg/wscript +++ b/3rdparty/libogg/wscript @@ -31,6 +31,7 @@ def build(bld): bld( features = 'subst', + name = 'libogg_config_types', source = 'libogg/include/ogg/config_types.h.in', target = 'libogg/include/ogg/config_types.h', INCLUDE_INTTYPES_H = bld.env.INCLUDE_INTTYPES_H, @@ -47,6 +48,7 @@ def build(bld): bld.stlib( source = sources, target = 'libogg', + use = 'libogg_config_types', includes = ['libogg/include/'], export_includes = ['libogg/include/'] )