Changeset ec129c4


Ignore:
Timestamp:
Oct 26, 2016, 5:10:48 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
1b29996
Parents:
315f634
git-author:
Peter A. Buhr <pabuhr@…> (10/26/16 17:02:36)
git-committer:
Peter A. Buhr <pabuhr@…> (10/26/16 17:10:48)
Message:

add additional #defines for CFA version numbers

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • config.h.in

    r315f634 rec129c4  
    1818/* Location of cfa install. */
    1919#undef CFA_PREFIX
     20
     21/* Major version number. */
     22#undef CFA_VERSION_MAJOR
     23
     24/* Minor version number. */
     25#undef CFA_VERSION_MINOR
     26
     27/* Patch version number. */
     28#undef CFA_VERSION_PATCH
    2029
    2130/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
  • configure

    r315f634 rec129c4  
    29642964                        # may require auto* software to be installed
    29652965
     2966
     2967$as_echo "#define CFA_VERSION_MAJOR \"1\"" >>confdefs.h
     2968
     2969
     2970$as_echo "#define CFA_VERSION_MINOR \"0\"" >>confdefs.h
     2971
     2972
     2973$as_echo "#define CFA_VERSION_PATCH \"0\"" >>confdefs.h
     2974
     2975
    29662976# Installation paths
    29672977
  • configure.ac

    r315f634 rec129c4  
    1717AM_INIT_AUTOMAKE
    1818AM_MAINTAINER_MODE(enable)                      # may require auto* software to be installed
     19
     20AC_DEFINE(CFA_VERSION_MAJOR, "1", [Major version number.])
     21AC_DEFINE(CFA_VERSION_MINOR, "0", [Minor version number.])
     22AC_DEFINE(CFA_VERSION_PATCH, "0", [Patch version number.])
    1923
    2024# Installation paths
  • doc/user/user.tex

    r315f634 rec129c4  
    1111%% Created On       : Wed Apr  6 14:53:29 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Thu Sep 29 11:50:28 2016
    14 %% Update Count     : 1325
     13%% Last Modified On : Tue Oct 25 23:03:59 2016
     14%% Update Count     : 1357
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    326326\begin{description}
    327327\item
    328 \Indexc{__CFA__}\index{preprocessor variables!__CFA__@{©__CFA__©}}
    329 is always available during preprocessing and its value is the current major \Index{version number} of \CFA.\footnote{
     328\Indexc{__CFA_MAJOR__}\index{preprocessor variables!__CFA__@{©__CFA__©}}
     329is available during preprocessing and its value is the major \Index{version number} of \CFA.\footnote{
    330330The C preprocessor allows only integer values in a preprocessor variable so a value like ``\Version'' is not allowed.
    331331Hence, the need to have three variables for the major, minor and patch version number.}
     
    333333\item
    334334\Indexc{__CFA_MINOR__}\index{preprocessor variables!__CFA_MINOR__@{©__CFA_MINOR__©}}
    335 is always available during preprocessing and its value is the current minor \Index{version number} of \CFA.
     335is available during preprocessing and its value is the minor \Index{version number} of \CFA.
    336336
    337337\item
    338338\Indexc{__CFA_PATCH__}\index{preprocessor variables!__CFA_PATCH__@©__CFA_PATCH__©}
    339 is always available during preprocessing and its value is the current patch \Index{version number} of \CFA.
    340 
    341 \item
     339is available during preprocessing and its value is the patch \Index{level number} of \CFA.
     340
     341\item
     342\Indexc{__CFA__}\index{preprocessor variables!__CFA__@©__CFA__©} and
    342343\Indexc{__CFORALL__}\index{preprocessor variables!__CFORALL__@©__CFORALL__©}
    343 is always available during preprocessing and has no value.
     344are always available during preprocessing and have no value.
    344345\end{description}
    345346These preprocessor variables allow conditional compilation of programs that must work differently in these situations.
  • src/driver/cfa.cc

    r315f634 rec129c4  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Aug  6 16:14:55 2016
    13 // Update Count     : 148
     12// Last Modified On : Tue Oct 25 21:29:48 2016
     13// Update Count     : 152
    1414//
    1515
     
    5151int main( int argc, char *argv[] ) {
    5252        string Version( VERSION );                                                      // current version number from CONFIG
    53         string Major( "0" ), Minor( "0" ), Patch( "0" );        // default version numbers
    54 
    55         int posn1 = Version.find( "." );                                        // find the divider between major and minor version numbers
    56         if ( posn1 == -1 ) {                                                            // not there ?
    57                 Major = Version;
    58         } else {
    59                 Major = Version.substr( 0, posn1 );
    60                 int posn2 = Version.find( ".", posn1 + 1 );             // find the divider between minor and patch numbers
    61                 if ( posn2 == -1 ) {                                                    // not there ?
    62                         Minor = Version.substr( posn1 );
    63                 } else {
    64                         Minor = Version.substr( posn1 + 1, posn2 - posn1 - 1 );
    65                         Patch = Version.substr( posn2 + 1 );
    66                 } // if
    67         } // if
     53        string Major( CFA_VERSION_MAJOR ), Minor( CFA_VERSION_MINOR ), Patch( CFA_VERSION_MINOR );
    6854
    6955        string installincdir( CFA_INCDIR );                                     // fixed location of include files
     
    268254        // add the correct set of flags based on the type of compile this is
    269255
    270         args[nargs] = ( *new string( string("-D__CFA__=") + Major ) ).c_str();
     256        args[nargs] = ( *new string( string("-D__CFA_MAJOR__=") + Major ) ).c_str();
    271257        nargs += 1;
    272258        args[nargs] = ( *new string( string("-D__CFA_MINOR__=") + Minor ) ).c_str();
    273259        nargs += 1;
    274         args[nargs] = ( *new string( string("-D__CFA_PATCHLEVEL__=") + Patch ) ).c_str();
     260        args[nargs] = ( *new string( string("-D__CFA_PATCH__=") + Patch ) ).c_str();
    275261        nargs += 1;
    276262        args[nargs] = "-D__CFA__";
Note: See TracChangeset for help on using the changeset viewer.