Changeset 1898

Show
Ignore:
Timestamp:
03/30/08 16:16:01 (9 months ago)
Author:
peter
Message:

source/Makefile:
source/version.h:

Remove unnecessary code for future version numbering system. It will not be used in this release.

Location:
branches/c08_branch/source
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/c08_branch/source/Makefile

    r1896 r1898  
    8585endif 
    8686 
    87 SVNVER = ${shell which svnversion} 
    88 ifneq ($(SVNVER),) 
    89   REVISION = ${shell $(SVNVER) $(SRCDIR)} 
    90 else 
    91   REVISION = exported 
    92 endif 
    93 CXXFLAGS += -DSVN_REVISION=\"$(REVISION)\" 
    94  
    9587cloudy.exe : ${preobjects} maincl.o libcloudy.a 
    9688        ${CXX} ${LDFLAGS} -o cloudy.exe maincl.o -L. -lcloudy ${LDLIBS} 
  • branches/c08_branch/source/version.h

    r1896 r1898  
    1111static const int CLD_MINOR = 1; 
    1212static const int CLD_PATCH = 0; 
    13  
    14 #if 0 
    15 #ifdef SVN_REVISION 
    16 static const char* svn_revision = SVN_REVISION; 
    17 #else 
    18 static const char* svn_revision = "unknown"; 
    19 #endif 
    20  
    21 static const string Url = "$HeadURL$"; 
    22 #endif 
    2313 
    2414static const char* CITATION = "Ferland, G. J., Korista, K. T., Verner, D. A., Ferguson, J. W., Kingdon, J. B., & Verner, E. M. 1998, PASP, 110, 761"; 
     
    3525                        { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; 
    3626 
    37 #if 0 
    38                 // first analyze the URL to determine where we live, the chVersion string is derived from that 
    39                 // the code below is based on the following naming scheme: 
    40                 // 
    41                 // /branches/c08_branch -- release branch, all bug fixes are submitted here  
    42                 // 
    43                 // /tags/develop/c08.01_rc1 -- release candidates go here  
    44                 // 
    45                 // /tags/release/c08.01 -- first official release 
    46                 // /tags/release/c08.02 -- first bug-fix rollup, etc...  
    47                 // 
    48                 // /tags/patch_versions/c08.01.00 -- identical to /tags/release/c08.01 
    49                 // /tags/patch_versions/c08.01.01 -- first patch update, etc...  
    50                 // 
    51                 // /trunk -- this will be labeled as "exprimental" 
    52                 // /tags/stable -- ditto 
    53                 // /branches/* -- ditto, note that "*" can be anything except c??_branch 
    54  
    55                 vector<string> Part; 
    56                 Split( Url, "/", Part, SPM_RELAX ); 
    57                 if( Part.size() >= 3 ) 
    58                 { 
    59                         // the last two parts are "source" and "version.h $", we don't need them... 
    60                         // the one before is the name of the branch (e.g. "trunk", "newmole", "c08.01") 
    61                         string Branch = Part[Part.size()-3]; 
    62  
    63                         bool lgReleaseTag = ( Url.find("/tags/release/") != string::npos ); 
    64                         bool lgPatchTag = ( Url.find("/tags/patch_versions/") != string::npos ); 
    65                         bool lgDevelopTag = ( Url.find("/tags/develop/") != string::npos ); 
    66                         // this expects a branch name like "c08_branch" 
    67                         bool lgReleaseBranch = ( Url.find("/branches/") != string::npos && 
    68                                                  Branch.size() == 10 && Branch[0] == 'c' && 
    69                                                  Branch.find("_branch") != string::npos ); 
    70  
    71                         lgRelease = ( lgReleaseTag || lgPatchTag ); 
    72  
    73                         // determine if this is a beta version 
    74                         string::size_type ptr; 
    75                         if( lgDevelopTag && ( ptr = Branch.find( "_rc" ) ) != string::npos ) 
    76                                 // this expects a branch name like "c08.01_rc1" 
    77                                 sscanf( Branch.substr( ptr+3 ).c_str(), "%ld", &nBetaVer ); 
    78                         else 
    79                                 nBetaVer = 0; 
    80  
    81                         int nPatchLevel; 
    82                         if( lgPatchTag ) 
    83                                 // this expects a branch name like "c08.01.02" 
    84                                 sscanf( Branch.substr( Branch.size()-2 ).c_str(), "%d", &nPatchLevel ); 
    85                         else 
    86                                 nPatchLevel = 0;         
    87  
    88                         if( lgReleaseTag ) 
    89                                 // this expects a branch name like "c08.01" 
    90                                 strncpy( chVersion, Branch.substr(1).c_str(), INPUT_LINE_LENGTH ); 
    91                         else if( lgPatchTag ) 
    92                                 // this expects a branch name like "c08.01.02" 
    93                                 sprintf( chVersion, "%s (patch level %d)", Branch.substr(1,5).c_str(), nPatchLevel ); 
    94                         else if( nBetaVer > 0 ) 
    95                                 // this expects a branch name like "c08.01_rc1" 
    96                                 sprintf( chVersion, "%s beta %ld (prerelease)", Branch.substr(1,5).c_str(), nBetaVer ); 
    97                         else if( lgReleaseBranch ) 
    98                                 // this expects a branch name like "c08_branch" 
    99                                 sprintf( chVersion, "(prerelease, %s, ver. %s)", Branch.c_str(), svn_revision ); 
    100                         else 
    101                                 // the branch name can be anything except "c??_branch" 
    102                                 sprintf( chVersion, "(experimental, %s, ver. %s)", Branch.c_str(), svn_revision ); 
    103                 } 
    104                 else 
    105                 { 
    106                         // create a default version string in case HeadURL was not expanded 
    107  
    108                         /* is this a release version? */ 
    109                         lgRelease = false; 
    110  
    111                         /* is this a beta version?  0 for no */ 
    112                         nBetaVer = 0; 
    113  
    114                         sprintf( chVersion, "%2.2i%2.2i%2.2i", YEAR%100, MONTH+1, DAY ); 
    115                 } 
    116 #else 
    11727                /* is this a release version? */ 
    11828                lgRelease = false; 
     
    13646                        sprintf( chVersion, "%2.2i.%2.2i.%2.2i", YEAR%100, MONTH+1, DAY ); 
    13747                } 
    138 #endif 
    13948 
    14049                sprintf( chDate, "%2.2i%3.3s%2.2i", YEAR%100, chMonth[MONTH], DAY );