diff --git a/new/common.jam b/new/common.jam index a1db840a5..50a6c527b 100644 --- a/new/common.jam +++ b/new/common.jam @@ -37,7 +37,24 @@ rule variable-setting-command ( variable value ) } } +# Return a command which can create a file. If 'r' is result of invocation, +# then +# r foobar +# will create foobar with unspecified content. What happens if file already +# exists is unspecified. +rule file-creation-command ( ) +{ + if [ modules.peek : NT ] + { + return "echo. > " ; + } + else + { + return "touch " ; + } +} + rule MkDir { # If dir exists, don't update it diff --git a/v2/tools/common.jam b/v2/tools/common.jam index a1db840a5..50a6c527b 100644 --- a/v2/tools/common.jam +++ b/v2/tools/common.jam @@ -37,7 +37,24 @@ rule variable-setting-command ( variable value ) } } +# Return a command which can create a file. If 'r' is result of invocation, +# then +# r foobar +# will create foobar with unspecified content. What happens if file already +# exists is unspecified. +rule file-creation-command ( ) +{ + if [ modules.peek : NT ] + { + return "echo. > " ; + } + else + { + return "touch " ; + } +} + rule MkDir { # If dir exists, don't update it