From 334c96ac07eaf546fa04964a3947e2cf3db4b028 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 10 Jul 2003 14:07:16 +0000 Subject: [PATCH] * new/common.jam (variable-setting-command): New rule. [SVN r19027] --- src/tools/common.jam | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/tools/common.jam b/src/tools/common.jam index 1c530af83..a1db840a5 100644 --- a/src/tools/common.jam +++ b/src/tools/common.jam @@ -20,6 +20,24 @@ else CP = cp ; } +nl = " +" ; + +# Returns the command needed to set shell variable on the +# current platform. +rule variable-setting-command ( variable value ) +{ + if [ modules.peek : NT ] + { + return "set $(variable)=$(value)$(nl)" ; + } + else + { + return "$(variable)=$(value)" ; + } +} + + rule MkDir { # If dir exists, don't update it