From 70155d8def3dd1596fbc96eaf517f989badb58be Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 9 Feb 2006 13:53:20 +0000 Subject: [PATCH] Exit if one of processed options wants to exit. [SVN r32769] --- src/kernel/bootstrap.jam | 22 +++++++--------------- src/util/option.jam | 7 +++++++ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/kernel/bootstrap.jam b/src/kernel/bootstrap.jam index a4c5300d3..5d8736caf 100755 --- a/src/kernel/bootstrap.jam +++ b/src/kernel/bootstrap.jam @@ -112,19 +112,11 @@ IMPORT modules : import : : import ; # import modules ; -if ! $(dont-build) -{ - # Allow users to override the build system file from the - # command-line (mostly for testing) - local build-system = [ MATCH --build-system=(.*) : $(ARGV) ] ; - build-system ?= build-system ; +# Allow users to override the build system file from the +# command-line (mostly for testing) +local build-system = [ MATCH --build-system=(.*) : $(ARGV) ] ; +build-system ?= build-system ; + +# Use last element in case of multiple command-line options +import $(build-system[-1]) ; - # Use last element in case of multiple command-line options - import $(build-system[-1]) ; -} -else -{ - # Exit without printing "don't know how to build..." and "found 1 target" - # messages. - EXIT ; -} diff --git a/src/util/option.jam b/src/util/option.jam index ead4da062..daa56b011 100644 --- a/src/util/option.jam +++ b/src/util/option.jam @@ -87,5 +87,12 @@ rule process ( ) } } } + + if $(dont-build) + { + # Exit without printing "don't know how to build..." and "found 1 target" + # messages. + EXIT ; + } }