Changeset 73

Show
Ignore:
Timestamp:
09/07/06 11:40:00 (2 years ago)
Author:
allenb
Message:

- Fix bug in osg-config.in where version and prefix options were not working correctly.
- Generate an osg2-config file so users can use OpenSG 1.x and OpenSG 2.0 in parallel.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/SConstruct

    r70 r73  
    415415             '@VERSION@':opensg_version_string, 
    416416             '@LIBRARY_UTIL_SRC@':file(pj('Tools','scons-build','LibraryUtils.py')).read()} 
    417    osg_config = common_env.SubstBuilder(pj(paths['bin'],'osg-config'), 
    418                               'osg-config.in', submap=submap) 
    419    common_env.AddPostAction(osg_config, Chmod('$TARGET', 0755)) 
    420    common_env.Depends(osg_config, Value(lib_map_str)) 
     417   # Install two scripts so we have one with osg2 in the name to let users be sure they get the right version              
     418   for n in ["osg-config","osg2-config"]: 
     419      osg_config = common_env.SubstBuilder(pj(paths['bin'],n), 
     420                              'osg-config.in', submap=submap)    
     421      common_env.AddPostAction(osg_config, Chmod('$TARGET', 0755)) 
     422      common_env.Depends(osg_config, Value(lib_map_str)) 
    421423 
    422424   # Close up with aliases and defaults    
  • trunk/osg-config.in

    r61 r73  
    7474   (options, pos_args) = parser.parse_args()   
    7575    
     76   # Process simple single options 
     77   if options.prefix: 
     78      print inst_prefix 
     79      return 
     80   elif options.version: 
     81      print version 
     82      return 
     83    
    7684   # Try to find libname 
    7785   # - Try given name and name with OSG prefix 
     
    8593         else: 
    8694            print "Error: Can not find library named: ", n 
    87     
     95       
     96   # Make sure we have libraries 
    8897   if len(libraries) == 0: 
    8998      printUsage() 
    9099      sys.exit(1) 
    91     
     100 
    92101   # If set to no prefix flags, then clear all defaults 
    93102   if options.no_prefix_flags: 
     
    102111   config_info = ConfigInfoAdapter(libraries, lib_map, default_lib_settings, 
    103112                     options.inc_prefix, options.lib_prefix, options.libpath_prefix) 
    104        
    105    if options.prefix: 
    106       print inst_prefix 
    107    elif options.version: 
    108       print version 
    109    elif options.cflags: 
     113             
     114   if options.cflags: 
    110115      print config_info.getIncPathStr() 
    111116   elif options.libs or options.llibs or options.lflags: