Boost logo

Boost-Build :

From: Jurko Gospodnetiæ (jurko.gospodnetic_at_[hidden])
Date: 2008-07-07 05:55:21


   Hi Eric.

> But alas it is causing my windows builds to fail. From the Vista command
> prompt with a native win32 bjam, I get this when trying to run the
> foreach tests:
>
> ...updating 200 targets...
> MkDir1-quick-fix-for-unix ..\..\..\bin.v2\libs\foreach
> MkDir1-quick-fix-for-unix ..\..\..\bin.v2\libs\foreach\test
> A subdirectory or file -p already exists.
> Error occurred while processing: -p.
>
> mkdir -p "..\..\..\bin.v2\libs\foreach\test"
>
> ...failed MkDir1-quick-fix-for-unix ..\..\..\bin.v2\libs\foreach\test...
>
> Looks like the patch thinks I'm on a unix system.

   Fixed. Updated patch is attached.

   It seems of all the OS checks in that module one was buggy and I had
to go and copy-paste that one. :-( I just can not figure our how it
seemed to work for me when I tested it in the first place.

   Note also that I committed a patch for the other invalid OS check.

   Changeset link: http://svn.boost.org/trac/boost/changeset/47174

   And the attached patch is based on that revision.

   Best regards,
     Jurko Gospodnetiæ

Index: tools/build/v2/tools/common.jam
===================================================================
--- tools/build/v2/tools/common.jam (revision 47174)
+++ tools/build/v2/tools/common.jam (working copy)
@@ -576,7 +576,14 @@
         $(<)-mkdir = true ;
 
         # Schedule the mkdir build action.
- MkDir1 $(<) ;
+ if [ os.name ] = NT
+ {
+ MkDir1-quick-fix-for-windows $(<) ;
+ }
+ else
+ {
+ MkDir1-quick-fix-for-unix $(<) ;
+ }
 
         # Prepare a Jam 'dirs' target that can be used to make the build only
         # construct all the target directories.
@@ -617,6 +624,21 @@
 }
 
 
+# (todo)
+# The following quick-fix actions should be replaced using the original MkDir1
+# action once Boost Jam gets updated to correctly detect different paths leading
+# up to the same filesystem target and triggers their build action only once.
+# (todo) (04.07.2008.) (Jurko)
+actions MkDir1-quick-fix-for-unix
+{
+ mkdir -p "$(<)"
+}
+actions MkDir1-quick-fix-for-windows
+{
+ if not exist "$(<)\\" mkdir "$(<)"
+}
+
+
 actions piecemeal together existing Clean
 {
     $(RM) "$(>)"


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