Boost logo

Boost-Build :

From: Michael Stevens (Michael.Stevens_at_[hidden])
Date: 2004-01-12 08:44:21


Vladimir Prus wrote:

> Eddy, would you mind trying this out? Or, even better, the following one:
>
> actions archive
> {
> if test -f "$(<[1])" ; then
> rm "$(<[1]:W)"
> fi
> $(.LD) /lib /NOLOGO "/out:$(<[1]:W)" @"$(<[2]:W)"
> }
>
> ?
>
> - Volodya

Hi Volodya,

I often wondered about this code. In particular it seems odd that we
don't have a common method to remove files.

The closest we have is the "RM" variable as set in "common.jam".

For some reason this does not have the "-f" option in the non NT case.
This seems rather odd as it means it cannot be used to delete possible
non existing files, as in the case of library file above.

I have attached a simple patch for this. It simply changes the
definition to.
RM = rm -f ;

This allows the archive action for the cygwin case to me simplified and
possibly combine it with the non cygwin version.

Alternatively it may be possible to use the "Clean" rule in this case.

Michael

-- 
___________________________________
Michael Stevens Systems Engineering
Lilienweg 13a
34128 Kassel, Germany
Phone/Fax: +49 561 5218038
___________________________________
 --------------060208030506080503070406 Content-Type: text/plain;
name="common.jam_RM_patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="common.jam_RM_patch"
Index: tools/build/v2/tools/common.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/common.jam,v
retrieving revision 1.12
diff -u -r1.12 common.jam
--- tools/build/v2/tools/common.jam	4 Nov 2003 17:03:18 -0000	1.12
+++ tools/build/v2/tools/common.jam	12 Jan 2004 10:50:31 -0000
@@ -19,7 +19,7 @@
}
else
{
- RM = rm ;
+ RM = rm -f ;
CP = cp ;
}
 --------------060208030506080503070406-- 

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk