Boost logo

Boost-Commit :

From: bdawes_at_[hidden]
Date: 2008-06-19 11:53:32


Author: bemandawes
Date: 2008-06-19 11:53:32 EDT (Thu, 19 Jun 2008)
New Revision: 46525
URL: http://svn.boost.org/trac/boost/changeset/46525

Log:
Add optional bare locate-root at end of command line for compatibility with prior versions.
Text files modified:
   trunk/tools/regression/src/process_jam_log.cpp | 24 +++++++++++++++++++++---
   1 files changed, 21 insertions(+), 3 deletions(-)

Modified: trunk/tools/regression/src/process_jam_log.cpp
==============================================================================
--- trunk/tools/regression/src/process_jam_log.cpp (original)
+++ trunk/tools/regression/src/process_jam_log.cpp 2008-06-19 11:53:32 EDT (Thu, 19 Jun 2008)
@@ -560,9 +560,11 @@
   std::istream* input = 0;
 
   if ( argc <= 1 )
+ {
     std::cout << "process_jam_log [--echo] [--create-directories] [--v1|--v2]\n"
                   " [--boost-root boost_root] [--locate-root locate_root]\n"
                   " [--input-file input_file]\n"
+ " [locate-root]\n"
                   "--echo - verbose diagnostic output.\n"
                   "--create-directories - if the directory for xml file doesn't exists - creates it.\n"
                   " usually used for processing logfile on different machine\n"
@@ -574,6 +576,8 @@
                   " parameter, if any. Default is boost-root.\n"
                   "--input-file - the output of a bjam --dump-tests run. Default is std input.\n"
                   ;
+ return 1;
+ }
 
   while ( argc > 1 )
   {
@@ -620,9 +624,6 @@
         std::exit(1);
       }
       locate_root = fs::path( argv[1], fs::native );
- if ( !locate_root.is_complete() )
- locate_root = ( fs::initial_path() / locate_root ).normalize();
-
       --argc; ++argv;
     }
     else if ( std::strcmp( argv[1], "--input-file" ) == 0 )
@@ -636,6 +637,16 @@
       input = new std::ifstream(argv[1]);
       --argc; ++argv;
     }
+ else if ( *argv[1] == '-' )
+ {
+ std::cout << "Abort: unknown option; invoke with no arguments to see list of valid options\n";
+ return 1;
+ }
+ else
+ {
+ locate_root = fs::path( argv[1], fs::native );
+ --argc; ++argv;
+ }
   }
 
   if ( boost_root.empty() )
@@ -643,10 +654,17 @@
     set_boost_root();
     boost_root.normalize();
   }
+
+
   if ( locate_root.empty() )
   {
     locate_root = boost_root;
   }
+ else if ( !locate_root.is_complete() )
+ {
+ locate_root = ( fs::initial_path() / locate_root ).normalize();
+ }
+
   if ( input == 0 )
   {
     input = &std::cin;


Boost-Commit 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