From 17f719558cce8780b857aae9e6ca517dd4264b0e Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 25 Mar 2019 01:25:44 +0300 Subject: [PATCH] wscript: move build env setup to main wscript --- engine/wscript | 4 ---- game_launch/wscript | 4 ---- mainui | 2 +- public/wscript | 6 +----- ref_gl/wscript | 9 +-------- vgui_support/wscript | 4 ---- wscript | 2 ++ 7 files changed, 5 insertions(+), 26 deletions(-) diff --git a/engine/wscript b/engine/wscript index f691dd64..b25d2a7a 100644 --- a/engine/wscript +++ b/engine/wscript @@ -4,7 +4,6 @@ from waflib import Logs import os -from fwgslib import get_subproject_name top = '.' @@ -49,9 +48,6 @@ def configure(conf): conf.env.append_unique('DEFINES', 'DBGHELP') def build(bld): - bld.load_envs() - bld.env = bld.all_envs[get_subproject_name(bld)] - libs = [ 'public' ] source = bld.path.ant_glob([ 'common/*.c', diff --git a/game_launch/wscript b/game_launch/wscript index 99608a83..0ed69e39 100644 --- a/game_launch/wscript +++ b/game_launch/wscript @@ -5,7 +5,6 @@ from waflib import Logs import os import sys -from fwgslib import get_subproject_name top = '.' @@ -17,9 +16,6 @@ def configure(conf): conf.load('winres') def build(bld): - bld.load_envs() - bld.env = bld.all_envs[get_subproject_name(bld)] - source = ['game.cpp'] includes = '. ../common' libs = [] diff --git a/mainui b/mainui index f2a54fcb..cfa77685 160000 --- a/mainui +++ b/mainui @@ -1 +1 @@ -Subproject commit f2a54fcb5465d4e3902004228918586aa54e5f47 +Subproject commit cfa77685072cb5b6789de185b4512d654584d8e1 diff --git a/public/wscript b/public/wscript index 1906df6f..8acb732b 100644 --- a/public/wscript +++ b/public/wscript @@ -17,17 +17,13 @@ def configure(conf): return def build(bld): - bld.load_envs() - name = get_subproject_name(bld) - bld.env = bld.all_envs[name] - source = bld.path.ant_glob(['*.c']) libs = [] includes = [ '.', '../common', '../engine' ] bld.stlib( source = source, - target = name, + target = 'public', features = 'c', includes = includes, use = libs, diff --git a/ref_gl/wscript b/ref_gl/wscript index a4e4b2c6..d75063ea 100644 --- a/ref_gl/wscript +++ b/ref_gl/wscript @@ -23,13 +23,6 @@ def configure(conf): conf.env.append_unique('DEFINES', 'REF_DLL') def build(bld): - if bld.env.DEDICATED: - return - - bld.load_envs() - name = get_subproject_name(bld) - bld.env = bld.all_envs[name] - libs = [ 'public', 'M' ] source = bld.path.ant_glob(['*.c']) @@ -45,7 +38,7 @@ def build(bld): bld.shlib( source = source, - target = name, + target = 'ref_gl', features = 'c', includes = includes, use = libs, diff --git a/vgui_support/wscript b/vgui_support/wscript index e10909ca..5ce49815 100644 --- a/vgui_support/wscript +++ b/vgui_support/wscript @@ -4,7 +4,6 @@ from waflib import Logs import os -from fwgslib import get_subproject_name top = '.' @@ -74,9 +73,6 @@ def configure(conf): conf.fatal("Can't compile simple program. Check your path to vgui-dev repository.") def build(bld): - bld.load_envs() - bld.env = bld.all_envs[get_subproject_name(bld)] - if bld.env.NO_VGUI: return diff --git a/wscript b/wscript index 9e89cd89..1de88b11 100644 --- a/wscript +++ b/wscript @@ -198,6 +198,7 @@ def configure(conf): conf.setenv('') def build(bld): + bld.load_envs() for i in SUBDIRS: if bld.env.SINGLE_BINARY and i.singlebin: continue @@ -208,4 +209,5 @@ def build(bld): if i.ignore: continue + bld.env = bld.all_envs[i.name] bld.recurse(i.name)