From bf3602fa82c18c084091eadc5b46a145c9c3de44 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] --- new/common.jam | 18 ++++++++++++++++++ v2/tools/common.jam | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/new/common.jam b/new/common.jam index 1c530af83..a1db840a5 100644 --- a/new/common.jam +++ b/new/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 diff --git a/v2/tools/common.jam b/v2/tools/common.jam index 1c530af83..a1db840a5 100644 --- a/v2/tools/common.jam +++ b/v2/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