NCBI C++ Toolkit Cross Reference

C++/compilers/msvc800_prj/lock_ptb_config.bat


  1 @echo off
  2 REM $Id: lock_ptb_config.bat 103491 2007-05-04 17:18:18Z kazimird $
  3 REM ===========================================================================
  4 REM 
  5 REM                            PUBLIC DOMAIN NOTICE
  6 REM               National Center for Biotechnology Information
  7 REM 
  8 REM  This software/database is a "United States Government Work" under the
  9 REM  terms of the United States Copyright Act.  It was written as part of
 10 REM  the author's official duties as a United States Government employee and
 11 REM  thus cannot be copyrighted.  This software/database is freely available
 12 REM  to the public for use. The National Library of Medicine and the U.S.
 13 REM  Government have not placed any restriction on its use or reproduction.
 14 REM 
 15 REM  Although all reasonable efforts have been taken to ensure the accuracy
 16 REM  and reliability of the software and data, the NLM and the U.S.
 17 REM  Government do not and cannot warrant the performance or results that
 18 REM  may be obtained by using this software or data. The NLM and the U.S.
 19 REM  Government disclaim all warranties, express or implied, including
 20 REM  warranties of performance, merchantability or fitness for any particular
 21 REM  purpose.
 22 REM 
 23 REM  Please cite the author in any work or product based on this material.
 24 REM  
 25 REM ===========================================================================
 26 REM 
 27 REM Author:  Andrei Gourianov
 28 REM
 29 REM Check platform name and create a lock to prevent
 30 REM running more than one instance of project_tree_builder.exe at the same time.
 31 REM
 32 REM ===========================================================================
 33 
 34 set CFG_PLATFORM=__configured_platform
 35 set CFG_LIST=Win32 x64
 36 set PTB_RUNNING=__configure.lock
 37 
 38 if _%PTB_PLATFORM%==_ (
 39   echo PTB_PLATFORM is undefined
 40   goto return_error
 41 )
 42 if _%1%==_  goto report_usage
 43 if _%2%==_  goto report_usage
 44 set MSVC_PRJ=%~2%
 45 if %1%==ON  goto do_ON
 46 if %1%==OFF goto do_OFF
 47 
 48 
 49 :report_usage
 50 echo The script checks MSVC platform name and creates a lock to prevent
 51 echo running more than one -CONFIGURE- at the same time.
 52 echo Usage:
 53 echo    lock_ptb_config ON msvc_prj_folder, or
 54 echo    lock_ptb_config OFF msvc_prj_folder
 55 goto return_error
 56 
 57 :return_error
 58 exit /b 1
 59 
 60 :do_ON
 61 for %%c in ( %CFG_LIST% ) do (
 62   if exist "%MSVC_PRJ%%CFG_PLATFORM%.%%c" (
 63     if not %%c==%PTB_PLATFORM% (
 64       echo ******************************************************************************
 65       echo Requested platform %PTB_PLATFORM% does not match already configured %%c
 66       echo If you believe it is not so, - delete '%MSVC_PRJ%%CFG_PLATFORM%.%%c' file
 67       echo ******************************************************************************
 68       goto return_error
 69     )
 70     goto do_ON_lock
 71   )
 72 )
 73 echo %CFG_PLATFORM% > "%MSVC_PRJ%%CFG_PLATFORM%.%PTB_PLATFORM%"
 74 
 75 :do_ON_lock
 76 if exist "%MSVC_PRJ%%PTB_RUNNING%" (
 77   echo ******************************************************************************
 78   echo There is another CONFIGURE process running in this tree.
 79   echo If you believe it is not so, - delete '%MSVC_PRJ%%PTB_RUNNING%' file
 80   echo ******************************************************************************
 81   goto return_error
 82 )
 83 echo ptb_running > "%MSVC_PRJ%%PTB_RUNNING%"
 84 goto done
 85 
 86 
 87 :do_OFF
 88 if exist "%MSVC_PRJ%%PTB_RUNNING%" (
 89   del "%MSVC_PRJ%%PTB_RUNNING%"
 90 )
 91 goto done
 92 
 93 :done
 94 

source navigation ]   [ diff markup ]   [ identifier search ]   [ freetext search ]   [ file search ]  

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.