Changeset 323


Ignore:
Timestamp:
Nov 14, 2006, 3:57:16 PM (18 years ago)
Author:
garonne
Message:

See C.L. 319

Location:
CMT/v1r20b1
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CMT/v1r20b1/ChangeLog

    r318 r323  
     12006-14-11 Vincent Garonne <garonne@lal.in2p3.fr> 319
     2
     3    *  cmt.h, cmt_parser.cxx: Generate a native_version.cmt file if the <package>_native_version macro exists at the config step.
     4
    152006-14-11 Vincent Garonne <garonne@lal.in2p3.fr> 318
    26
  • CMT/v1r20b1/source/cmt.h

    r282 r323  
    224224  static void install_cleanup_scripts ();
    225225  static void install_setup_scripts ();
     226  static void install_native_version_file ();
    226227  static void install_test_cleanup_scripts ();
    227228  static void install_test_setup_scripts ();
  • CMT/v1r20b1/source/cmt_parser.cxx

    r301 r323  
    21882188  install_setup_scripts ();
    21892189  install_cleanup_scripts ();
     2190  install_native_version_file ();
    21902191
    21912192  CmtSystem::cd ("..");
     
    45204521}
    45214522
     4523//----------------------------------------------------------
     4524void Cmt::install_native_version_file ()
     4525{
     4526   
     4527
     4528  Use& current_use = Use::current ();
     4529  cmt_string package_name = current_use.get_package_name();
     4530  cmt_string macro_name = package_name + "_native_version";
     4531  Symbol* macro = Symbol::find (macro_name);
     4532  if (macro != 0)
     4533  {
     4534      cout << "Creating native_version file." << endl;   
     4535      Symbol::expand (macro_name);
     4536      cmt_string value = macro->resolve_macro_value ();
     4537      FILE* f = fopen ("new.native_version.cmt", "wb");
     4538      if (f != NULL)
     4539      {
     4540            fprintf (f, "%s\n", value.c_str ());
     4541      }     
     4542      //cout<<value <<endl;
     4543      fclose (f);
     4544
     4545      CmtSystem::compare_and_update_files ("new.native_version.cmt", "native_version.cmt");
     4546  }   
     4547}
    45224548//----------------------------------------------------------
    45234549void Cmt::install_test_setup_scripts ()
Note: See TracChangeset for help on using the changeset viewer.