From 8b67e745eba9b328863c69b8192299a557e3df26 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 23 Dec 2024 15:33:03 -0500 Subject: [PATCH] build: Add check that a value was specified in SetConfigVar. e.g. if one merely has "SetConfigVar DEBUG : HAIKU_TOP src system kernel ;" this won't actually set a value for DEBUG, and thus it won't use one of the pre-set debug objects directories, and so all the objects will wind up in the root of wherever jam is run. --- build/jam/ConfigRules | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/jam/ConfigRules b/build/jam/ConfigRules index 10a4c7eb06..4ac3b3189f 100644 --- a/build/jam/ConfigRules +++ b/build/jam/ConfigRules @@ -42,6 +42,10 @@ rule SetConfigVar local config = [ ConfigObject $(2) ] ; local scope = $(4:E=global) ; + if ! $(3) { + Exit "Error: no value specified for ConfigVar '$(var)'!" ; + } + $(var) on $(config) = $(3) ; __set_$(var) on $(config) = $(scope) ;