Changeset 78


Ignore:
Timestamp:
Aug 19, 2005, 5:04:48 PM (19 years ago)
Author:
arnault
Message:

Various bug fixes - see CL# 273 274

Location:
CMT/HEAD
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/ChangeLog

    r50 r78  
     12005-08-19  Christian Arnault  <arnault@lal.in2p3.fr> 274
     2
     3        * source/cmt_use.cxx (fill_includes_macro): skip include_dirs entries with empty name
     4
     5        * source/cmt_project.cxx (show_all): Use the top project when current is not defined
     6        (start_visit): idem
     7        (class VisitorForFillCMTPATH): Initialize CMTPATH to empty when filling in CMTPATH for all projects
     8
     9        * source/cmt_cvs.cxx (class CvsImplementation): Add the get_module function to compute the CVS module
     10        from the requested package/offset
     11        (class CvsImplementation): Add a check_structure to verify various structures before doing the checkout
     12        (class CvsImplementation): Ask for the checkout when the directory structure is in place but
     13        when the CMT structure is NOT in place. Useful for mounting disks before the checkout.
     14
     15        * source/cmt_parser.cxx (class StandardMacroBuilder): Apply the post-processing of include_dirs statements.
     16        (get_strategy): Get the top project to compute a strategy when the current project is not defined
     17        in order to avoid losing all strategies for standalone packages.
     18
     19        * source/cmt_include.h (class Include): Suppress print_all and print_filters obsolete functions
     20        * source/cmt_include.cxx: Suppress print_all and print_filters obsolete functions
     21        (parse): Add a post-processing step to expand include_dirs statements at set_standard_macros stage
     22
     23        * source/cmt_deps_builder.cxx (build_deps_text): Fix and Change the way source files are parsed
     24        for computing dependencies. Fill a cmt_string at once and traverse the string without any additional
     25        copy.
     26
     272005-07-21  Christian Arnault  <arnault@lal.in2p3.fr> 274
     28
     29        * source/cmt_symbol.cxx (build): Clean up unneeded path separators
     30
     312005-07-19  Christian Arnault  <arnault@lal.in2p3.fr> 274
     32
     33        * source/cmt_symbol.cxx (build): Suppress old test in CommandPathRemoveRegexp
     34
    1352005-05-09  Christian Arnault  <arnault@lal.in2p3.fr> 273
    236
  • CMT/HEAD/mgr/VisualC.nmake

    r44 r78  
    11CMT_tag=$(tag)
    22CMTVERSION=HEAD
    3 CMT_project=macro
    43cmt_hardware_query_command=uname -m
    54cmt_hardware=WIN32
  • CMT/HEAD/mgr/cmt_dependencies.make

    r45 r78  
    1 cmt_cxx_dependencies =  ../source/cmt.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_parser.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h
    2 cmt_awk_cxx_dependencies =  ../source/cmt_awk.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_regexp.h   ../source/cmt_awk.h   ../source/cmt_vector.h   ../source/cmt_system.h
    3 cmt_branch_cxx_dependencies =  ../source/cmt_branch.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_map.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h
    4 cmt_constituent_cxx_dependencies =  ../source/cmt_constituent.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_awk.h   ../source/cmt_deps_builder.h   ../source/cmt_generator.h   ../source/cmt_branch.h   ../source/cmt_map.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h
    5 cmt_deps_builder_cxx_dependencies =  ../source/cmt_deps_builder.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_parser.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_deps_builder.h   ../source/cmt_map.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_log.h
    6 cmt_fragment_cxx_dependencies =  ../source/cmt_fragment.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_fragment.h   ../source/cmt_map.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_branch.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h
    7 cmt_generator_cxx_dependencies =  ../source/cmt_generator.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_awk.h   ../source/cmt_deps_builder.h   ../source/cmt_generator.h   ../source/cmt_map.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_generators.h
    8 cmt_include_cxx_dependencies =  ../source/cmt_include.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_include.h   ../source/cmt_map.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h
    9 cmt_parser_cxx_dependencies =  ../source/cmt_parser.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_version.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_map.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h   ../source/cmt_deps_builder.h   ../source/cmt_generator.h   ../source/cmt_error.h   ../source/cmt_cvs.h   ../source/cmt_lock.h   ../source/cmt_triggers.h   ../source/cmt_model.h   ../source/cmt_syntax.h   ../source/cmt_install_area.h   ../source/cmt_sequence.h   ../source/cmt_log.h   ../source/cmt_commands.h
    10 cmt_script_cxx_dependencies =  ../source/cmt_script.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_script.h   ../source/cmt_map.h   ../source/cmt_include.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h
    11 cmt_string_cxx_dependencies =  ../source/cmt_string.cxx   ../source/cmt_std.h   ../source/cmt_string.h
    12 cmt_system_cxx_dependencies =  ../source/cmt_system.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_error.h
    13 cmt_tag_cxx_dependencies =  ../source/cmt_tag.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_map.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h   ../source/cmt_log.h
    14 cmt_use_cxx_dependencies =  ../source/cmt_use.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_map.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_error.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h   ../source/cmt_syntax.h
    15 cmt_symbol_cxx_dependencies =  ../source/cmt_symbol.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_map.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h
    16 cmt_error_cxx_dependencies =  ../source/cmt_error.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_error.h   ../source/cmt_vector.h
    17 cmt_pattern_cxx_dependencies =  ../source/cmt_pattern.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_parser.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_map.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h   ../source/cmt_error.h   ../source/cmt_syntax.h
    18 cmt_language_cxx_dependencies =  ../source/cmt_language.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_fragment.h   ../source/cmt_language.h   ../source/cmt_branch.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_map.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h
    19 cmt_cvs_cxx_dependencies =  ../source/cmt_cvs.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_parser.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_cvs.h   ../source/cmt_awk.h   ../source/cmt_map.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_project.h
    20 cmt_group_cxx_dependencies =  ../source/cmt_group.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_group.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_map.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h
    21 cmt_database_cxx_dependencies =  ../source/cmt_database.cxx   ../source/cmt_vector.h   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_map.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h
    22 cmt_lock_cxx_dependencies =  ../source/cmt_lock.cxx   ../source/cmt_std.h   ../source/cmt_lock.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_error.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_map.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h
    23 cmt_triggers_cxx_dependencies =  ../source/cmt_triggers.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_triggers.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_awk.h   ../source/cmt_map.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_project.h   ../source/cmt_syntax.h
    24 cmt_regexp_cxx_dependencies =  ../source/cmt_regexp.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_regexp.h   ../source/cmt_vector.h   ../source/cmt_system.h
    25 cmt_model_cxx_dependencies =  ../source/cmt_model.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_model.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_fragment.h   ../source/cmt_map.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h
    26 cmt_project_cxx_dependencies =  ../source/cmt_project.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_map.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h   ../source/cmt_syntax.h   ../source/cmt_error.h
    27 cmt_syntax_cxx_dependencies =  ../source/cmt_syntax.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_map.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_syntax.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_error.h   ../source/cmt_branch.h   ../source/cmt_language.h   ../source/cmt_cmtpath_pattern.h
    28 cmt_install_area_cxx_dependencies =  ../source/cmt_install_area.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_parser.h   ../source/cmt.h   ../source/cmt_install_area.h   ../source/cmt_map.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_syntax.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_cmtpath_pattern.h
    29 cmt_cmtpath_pattern_cxx_dependencies =  ../source/cmt_cmtpath_pattern.cxx   ../source/cmt_vector.h   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_map.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h   ../source/cmt_syntax.h
    30 cmt_sequence_cxx_dependencies =  ../source/cmt_sequence.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_regexp.h   ../source/cmt_awk.h   ../source/cmt_sequence.h   ../source/cmt_vector.h   ../source/cmt_system.h
    31 cmt_generators_cxx_dependencies =  ../source/cmt_generators.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_awk.h   ../source/cmt_deps_builder.h   ../source/cmt_generator.h   ../source/cmt_generators.h   ../source/cmt_map.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_log.h
    32 cmt_scope_section_cxx_dependencies =  ../source/cmt_scope_section.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_scope_section.h
    33 cmt_log_cxx_dependencies =  ../source/cmt_log.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_log.h   ../source/cmt_vector.h   ../source/cmt_parser.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h
    34 cmt_commands_cxx_dependencies =  ../source/cmt_commands.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_map.h   ../source/cmt_parser.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_commands.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h
     1cmt_cxx_dependencies =  ../source/cmt.cxx
     2cmt_awk_cxx_dependencies =  ../source/cmt_awk.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h
     3cmt_branch_cxx_dependencies =  ../source/cmt_branch.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h
     4cmt_constituent_cxx_dependencies =  ../source/cmt_constituent.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_awk.h   ../source/cmt_deps_builder.h   ../source/cmt_generator.h   ../source/cmt_branch.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h
     5cmt_deps_builder_cxx_dependencies =  ../source/cmt_deps_builder.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_log.h
     6cmt_fragment_cxx_dependencies =  ../source/cmt_fragment.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h
     7cmt_generator_cxx_dependencies =  ../source/cmt_generator.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_awk.h   ../source/cmt_deps_builder.h   ../source/cmt_generator.h   ../source/cmt_generators.h
     8cmt_include_cxx_dependencies =  ../source/cmt_include.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h
     9cmt_parser_cxx_dependencies =  ../source/cmt_parser.cxx   ../source/cmt_version.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h   ../source/cmt_deps_builder.h   ../source/cmt_generator.h   ../source/cmt_error.h   ../source/cmt_cvs.h   ../source/cmt_lock.h   ../source/cmt_triggers.h   ../source/cmt_model.h   ../source/cmt_syntax.h   ../source/cmt_install_area.h   ../source/cmt_sequence.h   ../source/cmt_log.h   ../source/cmt_commands.h
     10cmt_script_cxx_dependencies =  ../source/cmt_script.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h
     11cmt_string_cxx_dependencies =  ../source/cmt_string.cxx   ../source/cmt_string.h
     12cmt_system_cxx_dependencies =  ../source/cmt_system.cxx   ../source/cmt_string.h   ../source/cmt_error.h
     13cmt_tag_cxx_dependencies =  ../source/cmt_tag.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h   ../source/cmt_log.h
     14cmt_use_cxx_dependencies =  ../source/cmt_use.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_error.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h   ../source/cmt_syntax.h
     15cmt_symbol_cxx_dependencies =  ../source/cmt_symbol.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h
     16cmt_error_cxx_dependencies =  ../source/cmt_error.cxx   ../source/cmt_vector.h
     17cmt_pattern_cxx_dependencies =  ../source/cmt_pattern.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h   ../source/cmt_error.h   ../source/cmt_syntax.h
     18cmt_language_cxx_dependencies =  ../source/cmt_language.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h
     19cmt_cvs_cxx_dependencies =  ../source/cmt_cvs.cxx   ../source/cmt_cvs.h   ../source/cmt_string.h   ../source/cmt_regexp.h   ../source/cmt_awk.h   ../source/cmt_vector.h   ../source/cmt_system.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_project.h
     20cmt_group_cxx_dependencies =  ../source/cmt_group.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h
     21cmt_database_cxx_dependencies =  ../source/cmt_database.cxx   ../source/cmt_vector.h
     22cmt_lock_cxx_dependencies =  ../source/cmt_lock.cxx   ../source/cmt_lock.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_error.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h
     23cmt_triggers_cxx_dependencies =  ../source/cmt_triggers.cxx   ../source/cmt_string.h   ../source/cmt_triggers.h   ../source/cmt_std.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_awk.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_project.h   ../source/cmt_syntax.h
     24cmt_regexp_cxx_dependencies =  ../source/cmt_regexp.cxx   ../source/cmt_regexp.h   ../source/cmt_vector.h   ../source/cmt_string.h   ../source/cmt_system.h
     25cmt_model_cxx_dependencies =  ../source/cmt_model.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_fragment.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h
     26cmt_project_cxx_dependencies =  ../source/cmt_project.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h   ../source/cmt_syntax.h   ../source/cmt_tag.h   ../source/cmt_error.h
     27cmt_syntax_cxx_dependencies =  ../source/cmt_syntax.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_std.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_error.h   ../source/cmt_branch.h   ../source/cmt_language.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_cmtpath_pattern.h
     28cmt_install_area_cxx_dependencies =  ../source/cmt_install_area.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_install_area.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_std.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_syntax.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_cmtpath_pattern.h
     29cmt_cmtpath_pattern_cxx_dependencies =  ../source/cmt_cmtpath_pattern.cxx   ../source/cmt_cmtpath_pattern.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_syntax.h
     30cmt_sequence_cxx_dependencies =  ../source/cmt_sequence.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h
     31cmt_generators_cxx_dependencies =  ../source/cmt_generators.cxx   ../source/cmt_string.h   ../source/cmt_regexp.h   ../source/cmt_awk.h   ../source/cmt_vector.h   ../source/cmt_system.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_symbol.h   ../source/cmt_log.h
     32cmt_scope_section_cxx_dependencies =  ../source/cmt_scope_section.cxx
     33cmt_log_cxx_dependencies =  ../source/cmt_log.cxx   ../source/cmt_log.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h
     34cmt_commands_cxx_dependencies =  ../source/cmt_commands.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_std.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_map.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_awk.h   ../source/cmt_project.h
  • CMT/HEAD/source/cmt_cvs.cxx

    r45 r78  
    773773  }
    774774
     775  void get_module (const cmt_string& offset,
     776                   const cmt_string& product,
     777                   cmt_string& module)
     778  {
     779    module = "";
     780
     781    if (offset != "")
     782      {
     783        module = offset;
     784        module += "/"; // This is for CVS only thus we don't use the real separator.
     785        while (module.find ("//") != cmt_string::npos)
     786          {
     787            module.replace_all ("//", "/");
     788          }
     789      }
     790
     791    module += product;
     792  }
     793
    775794  bool get_version (const cmt_string& offset,
    776795                    const cmt_string& product,
    777796                    const cmt_string& version_request,
    778                     cmt_string& module,
     797                    const cmt_string& module,
    779798                    cmt_string& version,
    780799                    bool& at_head)
     
    787806    at_head = false;
    788807           
    789     module = "";
    790 
    791     if (offset != "")
    792       {
    793         module = offset;
    794         module += "/"; // This is for CVS only thus we don't use the real separator.
    795         while (module.find ("//") != cmt_string::npos)
    796           {
    797             module.replace_all ("//", "/");
    798           }
    799       }
    800 
    801     module += product;
    802 
    803808    /**
    804809     *   Try to figure out what is the effective version tag available
     
    13441349  }
    13451350
     1351  /**
     1352     Find the most appropriate effective version directory corresponding to the
     1353     specified version expression.
     1354     The specified expression may contain wildcards (in the file manager sense). This
     1355     FME is first converted into a RE then a directory search is performed.
     1356     An empty string is returned if no match is found.
     1357   */
    13461358  cmt_string find_matching_version (const cmt_string& expression)
    13471359  {
     
    14621474    CmtSystem::cd (here);
    14631475    me = saved;
     1476  }
     1477
     1478  /**
     1479     Check whether a given directory structure matches an expected product structure
     1480     given by the structure info obtained from the most recent request to the CVS pluggin
     1481   */
     1482  bool check_structure (const cmt_string& dir)
     1483  {
     1484    bool result = false;
     1485
     1486    if (!CmtSystem::test_directory (dir))
     1487      {
     1488        return (false);
     1489      }
     1490
     1491    if (structure_info == "package")
     1492      {
     1493        // Check if it is a true CMT package.
     1494       
     1495        cmt_string file_name;
     1496       
     1497        file_name = dir;
     1498        file_name += CmtSystem::file_separator ();
     1499        file_name += "cmt";
     1500        file_name += CmtSystem::file_separator ();
     1501        file_name += "requirements";
     1502       
     1503        if (CmtSystem::test_file (file_name))
     1504          {
     1505            result = true;
     1506          }
     1507        else
     1508          {
     1509            file_name = dir;
     1510            file_name += CmtSystem::file_separator ();
     1511            file_name += "mgr";
     1512            file_name += CmtSystem::file_separator ();
     1513            file_name += "requirements";
     1514           
     1515            if (CmtSystem::test_file (file_name))
     1516              {
     1517                result = true;
     1518              }
     1519          }
     1520      }
     1521    else if (structure_info == "project")
     1522      {
     1523        cmt_string file_name;
     1524       
     1525        file_name = dir;
     1526        file_name += CmtSystem::file_separator ();
     1527        file_name += "cmt";
     1528        file_name += CmtSystem::file_separator ();
     1529        file_name += "project.cmt";
     1530       
     1531        if (CmtSystem::test_file (file_name))
     1532          {
     1533            result = true;
     1534          }
     1535      }
     1536
     1537    return (result);
    14641538  }
    14651539
     
    15271601    cmt_string effective_version = find_matching_version (dir);
    15281602   
     1603    cmt_string module;
     1604    get_module (full_offset, product, module);
     1605
     1606    cmt_string cvs_tag = (tag != "") ? tag : version;
     1607    bool at_head = false;
     1608
    15291609    if (effective_version != "")
    15301610      {
    15311611        version = effective_version;
    1532        
    1533         dir = build_version_directory (offset, product, version);
    1534        
    1535         cout << "# ================= " << structure_info << " " << product
    1536              << " version " << version << echo_ppath
    1537              << " already installed in " << dir << endl;
    1538        
    1539         recursive = false;
    15401612      }
    15411613    else
    15421614      {
    1543         bool at_head = false;
    1544         cmt_string module;
    1545         cmt_string cvs_tag = (tag != "") ? tag : version;
    1546        
    15471615        //
    15481616        // get_version attempts to find the most appropriate version
     
    15611629          }
    15621630       
    1563         if (!get_version (full_offset, product, cvs_tag,
    1564                           module, cvs_tag, at_head))
     1631        if (!get_version (full_offset, product, cvs_tag, module,
     1632                          cvs_tag, at_head))
    15651633          {
    15661634            return;
     
    15911659            dir = build_version_directory (offset, product, version);
    15921660          }
    1593 
    1594         if (CmtSystem::test_directory (dir))
    1595           {
    1596             cout << "# ================= " << structure_info << " " << product
    1597                  << " version " << version << echo_ppath
    1598                  << " already installed." << endl;
    1599            
    1600             recursive = false;
    1601           }
    1602         else
    1603           {
    1604             //
    1605             // Now we can say that we have to perform the real checkout.
    1606             //
    1607            
    1608             if (!really_checkout (offset, product, version, cvs_tag, module, dir, at_head))
    1609               {
    1610                 cout << "# bad return from really_checkout_product" << endl;
    1611                 return;
    1612               }
    1613           }
    1614       }
    1615    
     1661      }
     1662   
     1663
     1664    if (check_structure (dir))
     1665      {
     1666        cout << "# ================= " << structure_info << " " << product
     1667             << " version " << version << echo_ppath
     1668             << " already installed." << endl;
     1669       
     1670        recursive = false;
     1671      }
     1672    else
     1673      {
     1674        //
     1675        // Now we can say that we have to perform the real checkout.
     1676        //
     1677       
     1678        if (!really_checkout (offset, product, version, cvs_tag, module, dir, at_head))
     1679          {
     1680            cout << "# bad return from really_checkout_product" << endl;
     1681            return;
     1682          }
     1683      }
     1684
    16161685    //
    16171686    //  Now reach the newly checked out product.
     
    17511820    cmt_string tag;
    17521821   
     1822    {
     1823      cmt_string m;
     1824      m = m_cvs_offset;
     1825      m += module;
     1826       
     1827      get_cvs_infos_with_offset (m);
     1828       
     1829      if (error_info != "")
     1830        {
     1831          cout << error_info << endl;
     1832          return;
     1833        }
     1834    }
     1835
    17531836    if (version_tag == "")
    17541837      {
    17551838        Cut cut (0);
    17561839       
    1757         cmt_string m;
    1758         m = m_cvs_offset;
    1759         m += module;
    1760        
    1761         get_cvs_infos_with_offset (m);
    1762        
    1763         if (error_info != "")
    1764           {
    1765             cout << error_info << endl;
    1766             return;
    1767           }
    1768 
    17691840        if (tags_top_info != "") tag = tags_top_info;
    17701841        else tag = tags_info;
  • CMT/HEAD/source/cmt_deps_builder.cxx

    r11 r78  
    4848                                CmtSystem::cmt_string_vector& deps)
    4949{
     50  Log;
     51
    5052  bool found = false;
    5153
    5254  for (int i = 0; i < all_deps.size (); i++)
    5355    {
    54       if (all_deps[i] == header_file)
     56      const cmt_string& n = all_deps[i];
     57
     58      log << "CMT> check old header file name=" << n << " against " << header_file << log_endl;
     59
     60      if (n == header_file)
    5561        {
    5662          found = true;
     
    6167  if (!found)
    6268    {
     69      log << "CMT> parsing new header file name=" << header_file << log_endl;
     70
    6371      all_deps.push_back (header_file);
    6472     
     
    115123    {
    116124      ptr++;
     125
     126      // skip spaces
    117127      while ((*ptr == ' ') || (*ptr == '\t')) ptr++;
     128
    118129      if (!strncmp (ptr, "include", 7))
    119130        {
     131          // We have a #include statement
     132
    120133          ptr += 7;
    121134
     
    133146          else
    134147            {
     148              // empty #include statement??
    135149              state = in_line;
    136150              ptr += strlen (ptr);
     
    140154      else
    141155        {
     156          // ignore other pre-processor statements
     157
    142158          state = in_line;
    143159          ptr += strlen (ptr);
     
    147163  else if (!strncmp (ptr, "      include", 13))
    148164    {
     165      // fortran include statement
     166
    149167      ptr += 13;
    150168
    151169      while ((*ptr == ' ') || (*ptr == '\t')) ptr++;
     170
    152171      if (*ptr == '\'')
    153172        {
     
    163182  else if (!strncmp (ptr, "\tinclude", 8))
    164183    {
     184      // fortran include statement
     185
    165186      ptr += 8;
    166187
    167188      while ((*ptr == ' ') || (*ptr == '\t')) ptr++;
     189
    168190      if (*ptr == '\'')
    169191        {
     
    182204      return (ptr);
    183205    }
     206
     207  // At this point we do have to include a header file.
    184208
    185209  char* end;
     
    212236}
    213237
    214 //--------------------------------------------------
     238/**
     239   Any line with no header inclusion
     240   step through comments and strings
     241 */
    215242static char* in_line_action (char* ptr, state_def& state)
    216243{
    217   char* pattern = &ptr[strlen (ptr)];
     244  char* pattern = ptr + strlen (ptr);
     245  int length = 0;
     246
     247  /*
     248    search for the first occurrence of
     249    {single-quote double-quote open-comment open-line-comment}
     250
     251    Must exclude escaped quotes \' and \"
     252  */
    218253
    219254  char* pos = strchr (ptr, '"');
    220   if (pos != 0)
    221     {
    222       if (pos < pattern)
    223         {
    224           state = in_string;
    225           pattern = pos;
    226         }
     255  if ((pos != 0) && (pos < pattern) && (pos > ptr) && (*(pos-1) != '\\'))
     256    {
     257      state = in_string;
     258      pattern = pos;
     259      length = 1;
    227260    }
    228261
    229262  pos = strchr (ptr, '\'');
    230   if (pos != 0)
    231     {
    232       if (pos < pattern)
    233         {
    234           state = in_char;
    235           pattern = pos;
    236         }
     263  if ((pos != 0) && (pos < pattern) && (pos > ptr) && (*(pos-1) != '\\'))
     264    {
     265      state = in_char;
     266      pattern = pos;
     267      length = 1;
    237268    }
    238269
    239270  pos = strstr (ptr, "/*");   //*/
    240   if (pos != 0)
    241     {
    242       if (pos < pattern)
    243         {
    244           state = in_comment;
    245           pattern = pos + 1;
    246         }
     271  if ((pos != 0) && (pos < pattern))
     272    {
     273      state = in_comment;
     274      pattern = pos;
     275      length = 2;
    247276    }
    248277
    249278  pos = strstr (ptr, "//");
    250   if (pos != 0)
    251     {
    252       if (pos < pattern)
    253         {
    254           state = in_line_comment;
    255           pattern = pos + 1;
    256         }
    257     }
    258 
    259   if (state != in_line)
    260     {
    261       ptr = pattern + 1;
     279  if ((pos != 0) && (pos < pattern))
     280    {
     281      state = in_line_comment;
     282      pattern = pos;
     283      length = 2;
     284    }
     285
     286  ptr = pattern + length;
     287
     288  return (ptr);
     289}
     290
     291//--------------------------------------------------
     292static char* in_string_action (char* ptr, state_def& state)
     293{
     294  // we exclusively look for a double quote
     295
     296  char* pos = strchr (ptr, '"');
     297  if (pos == 0)
     298    {
     299        // This string is not finished till the end of the line..
     300        // we expect it to continue to the next line...
     301        // thus we leave the state as it is
     302      ptr += strlen (ptr);
    262303    }
    263304  else
    264305    {
     306      if ((pos > ptr) && (*(pos - 1) == '\\'))
     307        {
     308          ptr = pos + 1;
     309        }
     310      else
     311        {
     312          ptr = pos + 1;
     313          state = in_line;
     314        }
     315    }
     316
     317  return (ptr);
     318}
     319
     320//--------------------------------------------------
     321static char* in_char_action (char* ptr, state_def& state)
     322{
     323  // we exclusively look for a single quote
     324
     325  char* pos = strchr (ptr, '\'');
     326  if (pos == 0)
     327    {
     328        // This string is not finished till the end of the line..
     329        // we expect it continues to the nex line...
     330        // thus we leave the state as it is
    265331      ptr += strlen (ptr);
    266332    }
     333  else
     334    {
     335      if ((pos > ptr) && (*(pos - 1) == '\\'))
     336        {
     337          ptr = pos + 1;
     338        }
     339      else
     340        {
     341          ptr = pos + 1;
     342          state = in_line;
     343        }
     344    }
    267345
    268346  return (ptr);
     
    270348
    271349//--------------------------------------------------
    272 static char* in_string_action (char* ptr, state_def& state)
     350static char* in_comment_action (char* ptr, state_def& state)
     351{
     352  char* pattern = ptr + strlen (ptr);
     353  int length = 0;
     354
     355  /*
     356    Even if we are inside a comment, we must detect strings since comment markers may
     357    be written inside them.
     358   */
     359
     360  char* pos = strchr (ptr, '"');
     361  if ((pos != 0) && (pos < pattern) && (pos > ptr) && (*(pos-1) != '\\'))
     362    {
     363      state = in_string_comment;
     364      pattern = pos;
     365      length = 1;
     366    }
     367
     368  pos = strchr (ptr, '\'');
     369  if ((pos != 0) && (pos < pattern) && (pos > ptr) && (*(pos-1) != '\\'))
     370    {
     371      state = in_char_comment;
     372      pattern = pos;
     373      length = 1;
     374    }
     375
     376  pos = strstr (ptr, "*/");
     377  if ((pos != 0) && (pos < pattern))
     378    {
     379      state = in_line;
     380      pattern = pos;
     381      length = 2;
     382    }
     383
     384  ptr = pattern + length;
     385
     386  return (ptr);
     387}
     388
     389//--------------------------------------------------
     390static char* in_string_comment_action (char* ptr, state_def& state)
    273391{
    274392  char* pos = strchr (ptr, '"');
     
    281399  else
    282400    {
    283       pos--;
    284       if (*pos == '\\')
    285         {
    286           ptr = pos + 2;
     401      if ((pos > ptr) && (*(pos - 1) == '\\'))
     402        {
     403          ptr = pos + 1;
    287404        }
    288405      else
    289406        {
    290           ptr = pos + 2;
    291           state = in_line;
     407          ptr = pos + 1;
     408          state = in_comment;
    292409        }
    293410    }
     
    297414
    298415//--------------------------------------------------
    299 static char* in_char_action (char* ptr, state_def& state)
     416static char* in_char_comment_action (char* ptr, state_def& state)
    300417{
    301418  char* pos = strchr (ptr, '\'');
     
    308425  else
    309426    {
     427      if ((pos > ptr) && (*(pos - 1) == '\\'))
     428        {
     429          ptr = pos + 1;
     430        }
     431      else
     432        {
     433          ptr = pos + 1;
     434          state = in_comment;
     435        }
    310436      pos--;
    311       if (*pos == '\\')
    312         {
    313           ptr = pos + 2;
     437    }
     438
     439  return (ptr);
     440}
     441
     442//--------------------------------------------------
     443static char* in_line_comment_action (char* ptr, state_def& state)
     444{
     445  ptr += strlen (ptr);
     446  state = in_line;
     447
     448  return (ptr);
     449}
     450
     451//--------------------------------------------------
     452static void build_deps_text (char* text,
     453                             const cmt_string& dir_name,
     454                             int current_path_index,
     455                             const CmtSystem::cmt_string_vector& include_paths,
     456                             const CmtSystem::cmt_string_vector& substitutions,
     457                             CmtSystem::cmt_string_vector& all_deps,
     458                             CmtSystem::cmt_string_vector& deps)
     459{
     460  Log;
     461
     462  int pos;
     463  int max_pos;
     464  int line_number = 1;
     465
     466  log << "CMT> build_deps_text dir_name="
     467      << dir_name << log_endl;
     468
     469  pos = 0;
     470  max_pos = strlen (text);
     471
     472  char* current = text;
     473  char* last = text + max_pos;
     474
     475  state_def state = at_start;
     476
     477  while (current < last)
     478    {
     479      char marker;
     480      char* marker_pos = 0;
     481
     482      char* crnl = strstr (current, "\r\n");
     483      char* nl = strchr (current, '\n');
     484
     485      char* first = nl;
     486      int length = 1;
     487
     488      char* ptr = 0;
     489
     490      if (crnl != 0)
     491        {
     492          // cr+nl has been found
     493
     494          if (nl == 0)
     495            {
     496              // cr but no nl ??
     497              first = crnl;
     498              length = 2;
     499            }
     500          else
     501            {
     502              // both cr+nl and nl found
     503              first = (nl < crnl) ? nl : crnl;
     504              length = (nl < crnl) ? 1 : 2;
     505            }
    314506        }
    315507      else
    316         {
    317           ptr = pos + 2;
    318           state = in_line;
    319         }
    320     }
    321 
    322   return (ptr);
    323 }
    324 
    325 //--------------------------------------------------
    326 static char* in_comment_action (char* ptr, state_def& state)
    327 {
    328   char* pattern = &ptr[strlen (ptr)];
    329   char* pos = strchr (ptr, '"');
    330   if (pos != 0)
    331     {
    332       if (pos < pattern)
    333         {
    334           state = in_string_comment;
    335           pattern = pos;
    336         }
    337     }
    338   pos = strchr (ptr, '\'');
    339   if (pos != 0)
    340     {
    341       if (pos < pattern)
    342         {
    343           state = in_char_comment;
    344           pattern = pos;
    345         }
    346     }
    347   pos = strstr (ptr, "*/");
    348   if (pos != 0)
    349     {
    350       if (pos < pattern)
    351         {
    352           state = in_line;
    353           pattern = pos + 1;
    354         }
    355     }
    356 
    357   if (state == in_comment)
    358     {
    359       ptr += strlen (ptr);
    360     }
    361   else
    362     {
    363       ptr = pattern + 1;
    364     }
    365 
    366   return (ptr);
    367 }
    368 
    369 //--------------------------------------------------
    370 static char* in_string_comment_action (char* ptr, state_def& state)
    371 {
    372   char* pos = strchr (ptr, '"');
    373   if (pos == 0)
    374     {
    375         // This string is not finished till the end of the line..
    376         // we expect it continues to the nex line...
    377       ptr += strlen (ptr);
    378     }
    379   else
    380     {
    381       pos--;
    382       if (*pos == '\\')
    383         {
    384           ptr = pos + 2;
     508        {
     509          // no cr+nl but nl alone found
     510          first = nl;
     511          length = 1;
     512        }
     513
     514      ptr = current;
     515
     516      if (first == 0)
     517        {
     518          // neither nl nor cr+nl found => this is the last line
     519
     520          marker_pos = 0;
    385521        }
    386522      else
    387523        {
    388           ptr = pos + 2;
    389           state = in_comment;
    390         }
    391     }
    392 
    393   return (ptr);
    394 }
    395 
    396 //--------------------------------------------------
    397 static char* in_char_comment_action (char* ptr, state_def& state)
    398 {
    399   char* pos = strchr (ptr, '\'');
    400   if (pos == 0)
    401     {
    402         // This string is not finished till the end of the line..
    403         // we expect it continues to the nex line...
    404       ptr += strlen (ptr);
    405     }
    406   else
    407     {
    408       pos--;
    409       if (*pos == '\\')
    410         {
    411           ptr = pos + 2;
    412         }
     524          marker_pos = first;
     525          marker = *marker_pos;
     526          *marker_pos = 0;
     527        }
     528
     529      log << "CMT> build_deps_text2 line=["
     530          << current << "]" << log_endl;
     531     
     532      while (strlen (ptr) > 0)
     533        {
     534          switch (state)
     535            {
     536            case at_start:
     537              ptr = at_start_action (ptr,
     538                                     state,
     539                                     dir_name,
     540                                     current_path_index,
     541                                     include_paths,
     542                                     substitutions,
     543                                     all_deps,
     544                                     deps);
     545              break;
     546            case in_line:
     547              ptr = in_line_action (ptr, state);
     548              break;
     549            case in_string:
     550              ptr = in_string_action (ptr, state);
     551              break;
     552            case in_char:
     553              ptr = in_char_action (ptr, state);
     554              break;
     555            case in_comment:
     556              ptr = in_comment_action (ptr, state);
     557              break;
     558            case in_string_comment:
     559              ptr = in_string_comment_action (ptr, state);
     560              break;
     561            case in_char_comment:
     562              ptr = in_char_comment_action (ptr, state);
     563              break;
     564            case in_line_comment:
     565              ptr = in_line_action (ptr, state);
     566              break;
     567            }
     568        }
     569
     570      if (state == in_line) state = at_start;
     571      line_number++;
     572
     573      if (marker_pos != 0)
     574        {
     575          *marker_pos = marker;
     576          current = marker_pos + length;
     577        }
    413578      else
    414         {
    415           ptr = pos + 2;
    416           state = in_comment;
    417         }
    418     }
    419 
    420   return (ptr);
    421 }
    422 
    423 //--------------------------------------------------
    424 static char* in_line_comment_action (char* ptr, state_def& state)
    425 {
    426   ptr += strlen (ptr);
    427 
    428   return (ptr);
    429 }
    430 
    431 //--------------------------------------------------
    432 static void build_deps_stream (istream& input,
    433                                const cmt_string& dir_name,
    434                                int current_path_index,
    435                                const CmtSystem::cmt_string_vector& include_paths,
    436                                const CmtSystem::cmt_string_vector& substitutions,
    437                                CmtSystem::cmt_string_vector& all_deps,
    438                                CmtSystem::cmt_string_vector& deps)
    439 {
    440   Log;
    441 
    442   if (input)
    443     {
    444       log << "CMT> build_deps_stream dir_name="
    445           << dir_name << log_endl;
    446 
    447       while (!input.eof ())
    448         {
    449           char line[16384];
    450 
    451           input.getline (line, sizeof (line));
    452           char* ptr = &line[0];
    453           state_def state = at_start;
    454 
    455           log << "CMT> build_deps_stream2 line=["
    456               << line << "]" << log_endl;
    457 
    458           while (strlen (ptr) > 0)
    459             {
    460               switch (state)
    461                 {
    462                   case at_start:
    463                     ptr = at_start_action (ptr,
    464                                            state,
    465                                            dir_name,
    466                                            current_path_index,
    467                                            include_paths,
    468                                            substitutions,
    469                                            all_deps,
    470                                            deps);
    471                     break;
    472                   case in_line:
    473                     ptr = in_line_action (ptr, state);
    474                     break;
    475                   case in_string:
    476                     ptr = in_string_action (ptr, state);
    477                     break;
    478                   case in_char:
    479                     ptr = in_char_action (ptr, state);
    480                     break;
    481                   case in_comment:
    482                     ptr = in_comment_action (ptr, state);
    483                     break;
    484                   case in_string_comment:
    485                     ptr = in_string_comment_action (ptr, state);
    486                     break;
    487                   case in_char_comment:
    488                     ptr = in_char_comment_action (ptr, state);
    489                     break;
    490                   case in_line_comment:
    491                     ptr = in_line_action (ptr, state);
    492                     break;
    493                 }
    494             }
    495         }
     579        {
     580          break;
     581        }
    496582    }
    497583}
     
    519605  if (CmtSystem::test_file (name))
    520606    {
    521       ifstream input (name.c_str ());
    522       if (input)
    523         {
    524           CmtSystem::dirname (name, new_dir);
    525           build_deps_stream (input, new_dir, current_path_index,
    526                              include_paths, substitutions,
    527                              all_deps, deps);
    528           return (0);
    529         }
     607      cmt_string text;
     608
     609      text.read (name);
     610
     611      char* ptr = &text[0];
     612      CmtSystem::dirname (name, new_dir);
     613
     614      build_deps_text (ptr, new_dir, current_path_index,
     615                       include_paths, substitutions,
     616                       all_deps, deps);
     617      return (0);
    530618    }
    531619
     
    542630  if (CmtSystem::test_file (full_name))
    543631    {
    544       ifstream input (full_name.c_str ());
    545       if (input)
    546         {
    547           CmtSystem::dirname (full_name, new_dir);
    548           build_deps_stream (input, new_dir, current_path_index,
    549                              include_paths, substitutions,
    550                              all_deps, deps);
    551           return (1);
    552         }
     632      cmt_string text;
     633
     634      text.read (full_name);
     635
     636      char* ptr = &text[0];
     637      CmtSystem::dirname (full_name, new_dir);
     638
     639      build_deps_text (ptr, new_dir, current_path_index,
     640                       include_paths, substitutions,
     641                       all_deps, deps);
     642      return (1);
    553643    }
    554644
     
    569659      if (CmtSystem::test_file (full_name))
    570660        {
    571           ifstream in (full_name.c_str ());
    572           if (in)
    573             {
    574               CmtSystem::dirname (full_name, new_dir);
    575 
    576               log << "CMT> build_deps3 new_dir=" << new_dir << log_endl;
    577 
    578               build_deps_stream (in,
    579                                  new_dir,
    580                                  path_index + 2,
    581                                  include_paths,
    582                                  substitutions,
    583                                  all_deps,
    584                                  deps);
    585 
    586               return (path_index + 2);
    587             }
     661          cmt_string text;
     662
     663          text.read (full_name);
     664
     665          char* ptr = &text[0];
     666          CmtSystem::dirname (full_name, new_dir);
     667
     668          log << "CMT> build_deps3 new_dir=" << new_dir << log_endl;
     669
     670          build_deps_text (ptr,
     671                           new_dir,
     672                           path_index + 2,
     673                           include_paths,
     674                           substitutions,
     675                           all_deps,
     676                           deps);
     677
     678          return (path_index + 2);
    588679        }
    589680    }
     
    696787CmtSystem::cmt_string_vector& DepsBuilder::run (const cmt_string& file_name)
    697788{
     789  Log;
     790
     791  log << "Starting deps builder on " << file_name << log_endl;
     792
     793
    698794  m_deps.clear ();
    699795  m_all_deps.clear ();
  • CMT/HEAD/source/cmt_include.cxx

    r11 r78  
    1212#include "cmt_include.h"
    1313#include "cmt_use.h"
     14#include "cmt_symbol.h"
    1415
    1516/*----------------------------------------------------------*/
     
    1920/*----------------------------------------------------------*/
    2021
    21 /*----------------------------------------------------------*/
     22/**
     23   Executed to parse an include_dirs statement
     24   It postpones the macro expansion to the post-processing stage
     25   (during set_standard_macros)
     26 */
    2227void Include::action (const CmtSystem::cmt_string_vector& words, Use* use)
    2328{
     
    2833  for (int i = 1; i < words.size (); i++)
    2934    {
     35      /*
     36        statement words may contain macro references at that level
     37        they are stored as they are.
     38        They will be expanded later on using the parse_all method
     39
     40        (called from set_standard_macros)
     41
     42       */
    3043      name = words[i];
    3144      if (name == "") return;
     45
    3246      add (name, use);
    3347    }
    3448}
    3549
    36 /*----------------------------------------------------------*/
     50/**
     51   Search a database entry for this include_dirs matching the
     52   duet {name, use}
     53 */
    3754Include* Include::find (const cmt_string& name, Use* use)
    3855{
     
    6077}
    6178
    62 /*----------------------------------------------------------*/
     79/**
     80   Add a unique entry for this include_dirs specification given by the duet {name, use}
     81 */
    6382Include* Include::add (const cmt_string& name, Use* use)
    6483{
     
    83102
    84103/*----------------------------------------------------------*/
    85 void Include::print_all (PrintMode mode)
     104void Include::clear_all ()
    86105{
    87   int number;
    88   int include_number;
    89   Use::UsePtrVector& uses = Use::get_ordered_uses ();
    90 
    91   if (uses.size () > 0)
    92     {
    93       for (number = 0; number < uses.size (); number++)
    94         {
    95           const Use* use = uses[number];
    96 
    97           Package* p = use->get_package ();
    98           if (p->is_cmt ()) continue;
    99 
    100           cout << "-I${" << use->prefix << "ROOT}/src ";
    101 
    102           for (include_number = 0;
    103                include_number < use->includes.size ();
    104                include_number++)
    105             {
    106               const Include& incl = use->includes[include_number];
    107 
    108               cout << "-I" << incl.name << " ";
    109             }
    110         }
    111     }
    112 
    113   for (include_number = 0;
     106  for (int include_number = 0;
    114107       include_number < (Use::current()).includes.size ();
    115108       include_number++)
    116109    {
    117       const Include& incl = (Use::current()).includes[include_number];
     110      Include& incl = (Use::current()).includes[include_number];
    118111
    119       cout << "-I" << incl.name << " ";
     112      incl.clear ();
     113    }
     114}
     115
     116/**
     117   Post processing of the include_dirs statements.
     118   This is meant to expand all macro references used in the
     119   include_dirs statements
     120
     121   Note that this may create new Include objects. Thus the loop is
     122   only performed onto the existing objects before the post-processing step
     123 */
     124void Include::parse_all ()
     125{
     126  int size = (Use::current()).includes.size ();
     127
     128  for (int include_number = 0;
     129       include_number < size;
     130       include_number++)
     131    {
     132      Include& incl = (Use::current()).includes[include_number];
     133
     134      incl.parse ();
    120135    }
    121136}
    122137
    123138/*----------------------------------------------------------*/
    124 void Include::print_filters (PrintMode mode)
     139void Include::clear ()
    125140{
    126   int number;
    127   int include_number;
    128   Use::UsePtrVector& uses = Use::get_ordered_uses ();
    129 
    130   if (uses.size () > 0)
    131     {
    132       for (number = 0; number < uses.size (); number++)
    133         {
    134           Use* use = uses[number];
    135 
    136           cout << "s#" <<
    137               ".*" << SLASH <<
    138               use->get_package_name () << SLASH <<
    139               use->version << SLASH <<
    140               "#$(" << use->prefix << "ROOT)" << SLASH <<
    141               "#g" << endl;
    142 
    143           for (include_number = 0;
    144                include_number < use->includes.size ();
    145                include_number++)
    146             {
    147               Include& incl = use->includes[include_number];
    148 
    149               const cmt_string& d = Cmt::filter_dir (incl.name);
    150 
    151               if (d.size () > 0)
    152                 {
    153                   cout << "s#" << d << "#" <<
    154                       incl.name << "#g" << endl;
    155                 }
    156             }
    157         }
    158     }
    159 
    160   {
    161     const Use* use = &(Use::current());
    162 
    163     cout << "s#" << ".*" << SLASH <<
    164         use->get_package_name () << SLASH <<
    165         use->version << SLASH <<
    166         "#$(" << use->prefix << "ROOT)" << SLASH <<
    167         "#g" << endl;
    168 
    169     for (include_number = 0;
    170          include_number < use->includes.size ();
    171          include_number++)
    172       {
    173         const Include& incl = use->includes[include_number];
    174 
    175         const cmt_string& d = Cmt::filter_dir (incl.name);
    176 
    177         if (d.size () > 0)
    178           {
    179             cout << "s#" << d << "#" <<
    180                 incl.name << "#g" << endl;
    181           }
    182       }
    183   }
     141  use = 0;
    184142}
    185143
    186 /*----------------------------------------------------------*/
    187 void Include::clear_all ()
     144/**
     145   Post processing of an include_dirs statement.
     146
     147   The name field is expanded for its macro references
     148   and split into individual words.
     149   Each word in turn generates a new Include object
     150   The old Include object is inactivated by setting an empty name
     151 */
     152void Include::parse ()
    188153{
     154  Symbol::expand (name);
     155
     156  CmtSystem::cmt_string_vector ws;
     157
     158  ws.clear ();
     159
     160  CmtSystem::split (name, " ", ws);
     161
     162  name = "";
     163  use = 0;
     164
     165  for (int j = 0; j < ws.size (); j++)
     166    {
     167      const cmt_string& w = ws[j];
     168
     169      add (w, use);
     170    }
    189171}
    190172
     
    192174Include::Include ()
    193175{
    194   use = 0;
     176  clear ();
    195177}
    196178
  • CMT/HEAD/source/cmt_include.h

    r11 r78  
    1919  static Include* find (const cmt_string& name, Use* use);
    2020  static Include* add (const cmt_string& name, Use* use);
    21   static void print_all (PrintMode mode);
    22   static void print_filters (PrintMode mode);
     21  static void parse_all ();
    2322  static void clear_all ();
    2423
     
    2625  Include ();
    2726  ~Include ();
     27  void parse ();
     28  void clear ();
    2829
    2930  cmt_string name;
  • CMT/HEAD/source/cmt_parser.cxx

    r42 r78  
    164164  bool strategy;
    165165
    166   if (p == 0) strategy = StrategyMgr::get_default_strategy (name);
    167   else strategy = p->get_strategy (name);
     166  if (p == 0)
     167    {
     168      static const Project::ProjectVector& projects = Project::projects ();
     169
     170      if (projects.size () == 0) strategy = StrategyMgr::get_default_strategy (name);
     171      else
     172        {
     173          p = &(projects[0]);
     174          strategy = p->get_strategy (name);
     175        }
     176    }
     177  else
     178    {
     179      strategy = p->get_strategy (name);
     180    }
    168181
    169182  return (strategy);
     
    64796492  void fill_for_use_includes ()
    64806493  {
     6494    Include::parse_all ();
    64816495    Use::UsePtrVector& Uses = Use::get_ordered_uses ();
    64826496
  • CMT/HEAD/source/cmt_project.cxx

    r41 r78  
    792792    }
    793793
    794   Project* current = get_current ();
    795 
    796   if (current != 0) current->show ();
     794  Project* p = get_current ();
     795
     796  if (p == 0)
     797    {
     798      if (Projects.size () == 0) return;
     799
     800      p = &(Projects[0]);
     801    }
     802
     803  p->show ();
    797804}
    798805
     
    10291036  Project* p = get_current ();
    10301037
    1031   if (p == 0) return;
     1038  if (p == 0)
     1039    {
     1040      if (Projects.size () == 0) return;
     1041
     1042      p = &(Projects[0]);
     1043    }
    10321044
    10331045  visitor.pre (p);
     
    10421054  VisitorForFillCMTPATH (cmt_string& buffer) : m_buffer (buffer)
    10431055  {
     1056    buffer = "path CMTPATH \"\" \n";
    10441057  }
    10451058
     
    10551068        m_buffer += "path_append CMTPATH \"";
    10561069        m_buffer += w;
    1057         m_buffer += "\" \n";
     1070        m_buffer += ":\" \n";
    10581071      }
    10591072  }
     
    10701083        m_buffer += "path_append CMTPATH \"";
    10711084        m_buffer += w;
    1072         m_buffer += "\" \n";
     1085        m_buffer += ":\" \n";
    10731086      }
    10741087  }
  • CMT/HEAD/source/cmt_symbol.cxx

    r40 r78  
    21232123
    21242124                Cmt::vector_to_string (paths, path_separator, temp);
    2125                 temp.replace_all ("::", ":");
    2126                 temp.replace_all (";;", ";");
    21272125              }
    21282126             
     
    21712169
    21722170                Cmt::vector_to_string (paths, path_separator, temp);
    2173                 temp.replace_all ("::", ":");
    2174                 temp.replace_all (";;", ";");
    21752171              }
    21762172             
     
    21812177
    21822178  level--;
     2179
     2180  for (;;)
     2181    {
     2182      int sz = temp.size ();
     2183
     2184      if (sz == 0) break;
     2185
     2186      if ((temp[0] == ';') || (temp[0] == ':'))
     2187        {
     2188          temp.erase (0, 1);
     2189        }
     2190      else if ((temp[sz-1] == ';') || (temp[sz-1] == ':'))
     2191        {
     2192          temp.erase (sz-1, 1);
     2193        }
     2194      else
     2195        {
     2196          break;
     2197        }
     2198    }
     2199
     2200  temp.replace_all ("::", ":");
     2201  temp.replace_all (";;", ";");
    21832202 
    21842203  return (temp);
  • CMT/HEAD/source/cmt_use.cxx

    r50 r78  
    28972897    {
    28982898      Include& incl = includes[i];
     2899
     2900      if (incl.name == "") continue;
    28992901     
    29002902      buffer += "$(ppcmd)\"";
  • CMT/HEAD/source/cmt_version.h

    r46 r78  
    88#define __cmt_version_h__
    99
    10 #define CMTVERSION "v1r18p20050501"
     10//#define CMTVERSION "v1r18p20050501"
     11#define CMTVERSION "HEAD"
    1112
    1213#endif
Note: See TracChangeset for help on using the changeset viewer.