mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
* new/targets.jam: Use 'common' instead of 'utility'.
* test/project_test3.py: Test that 'clean' works.
* test/svn_tree.py: Sync with upstream revision 2944. Fix a bug
which caused empty directory to be treated as file.
[SVN r14886]
64 lines
1.3 KiB
Plaintext
64 lines
1.3 KiB
Plaintext
# Copyright (C) Vladimir Prus 2002. Permission to copy, use, modify, sell and
|
|
# distribute this software is granted provided this copyright notice appears in
|
|
# all copies. This software is provided "as is" without express or implied
|
|
# warranty, and with no claim as to its suitability for any purpose.
|
|
|
|
# Provides actions common to all toolsets, for as making directoies and
|
|
# removing files.
|
|
|
|
rule MkDir
|
|
{
|
|
# If dir exists, don't update it
|
|
# Do this even for $(DOT).
|
|
|
|
NOUPDATE $(<) ;
|
|
|
|
if $(<) != $(DOT) && ! $($(<)-mkdir)
|
|
{
|
|
local s ;
|
|
|
|
# Cheesy gate to prevent multiple invocations on same dir
|
|
# MkDir1 has the actions
|
|
# Arrange for jam dirs
|
|
|
|
$(<)-mkdir = true ;
|
|
MkDir1 $(<) ;
|
|
Depends dirs : $(<) ;
|
|
|
|
# Recursively make parent directories.
|
|
# $(<:P) = $(<)'s parent, & we recurse until root
|
|
|
|
s = $(<:P) ;
|
|
|
|
if $(NT)
|
|
{
|
|
switch $(s)
|
|
{
|
|
case *: : s = ;
|
|
case *:\\ : s = ;
|
|
}
|
|
}
|
|
|
|
if $(s) && $(s) != $(<)
|
|
{
|
|
Depends $(<) : $(s) ;
|
|
MkDir $(s) ;
|
|
}
|
|
else if $(s)
|
|
{
|
|
NOTFILE $(s) ;
|
|
}
|
|
}
|
|
}
|
|
|
|
actions MkDir1
|
|
{
|
|
mkdir $(<)
|
|
}
|
|
|
|
actions piecemeal together existing Clean
|
|
{
|
|
rm $(>)
|
|
}
|
|
|