Index: /CMT/HEAD/ChangeLog
===================================================================
--- /CMT/HEAD/ChangeLog	(revision 77)
+++ /CMT/HEAD/ChangeLog	(revision 78)
@@ -1,2 +1,36 @@
+2005-08-19  Christian Arnault  <arnault@lal.in2p3.fr> 274
+
+	* source/cmt_use.cxx (fill_includes_macro): skip include_dirs entries with empty name
+
+	* source/cmt_project.cxx (show_all): Use the top project when current is not defined
+	(start_visit): idem
+	(class VisitorForFillCMTPATH): Initialize CMTPATH to empty when filling in CMTPATH for all projects
+
+	* source/cmt_cvs.cxx (class CvsImplementation): Add the get_module function to compute the CVS module
+	from the requested package/offset
+	(class CvsImplementation): Add a check_structure to verify various structures before doing the checkout
+	(class CvsImplementation): Ask for the checkout when the directory structure is in place but 
+	when the CMT structure is NOT in place. Useful for mounting disks before the checkout.
+
+	* source/cmt_parser.cxx (class StandardMacroBuilder): Apply the post-processing of include_dirs statements.
+	(get_strategy): Get the top project to compute a strategy when the current project is not defined
+	in order to avoid losing all strategies for standalone packages.
+
+	* source/cmt_include.h (class Include): Suppress print_all and print_filters obsolete functions
+	* source/cmt_include.cxx: Suppress print_all and print_filters obsolete functions
+	(parse): Add a post-processing step to expand include_dirs statements at set_standard_macros stage
+
+	* source/cmt_deps_builder.cxx (build_deps_text): Fix and Change the way source files are parsed 
+	for computing dependencies. Fill a cmt_string at once and traverse the string without any additional 
+	copy.
+
+2005-07-21  Christian Arnault  <arnault@lal.in2p3.fr> 274
+
+	* source/cmt_symbol.cxx (build): Clean up unneeded path separators
+
+2005-07-19  Christian Arnault  <arnault@lal.in2p3.fr> 274
+
+	* source/cmt_symbol.cxx (build): Suppress old test in CommandPathRemoveRegexp
+
 2005-05-09  Christian Arnault  <arnault@lal.in2p3.fr> 273
 
Index: /CMT/HEAD/mgr/VisualC.nmake
===================================================================
--- /CMT/HEAD/mgr/VisualC.nmake	(revision 77)
+++ /CMT/HEAD/mgr/VisualC.nmake	(revision 78)
@@ -1,5 +1,4 @@
 CMT_tag=$(tag) 
 CMTVERSION=HEAD 
-CMT_project=macro 
 cmt_hardware_query_command=uname -m 
 cmt_hardware=WIN32 
Index: /CMT/HEAD/mgr/cmt_dependencies.make
===================================================================
--- /CMT/HEAD/mgr/cmt_dependencies.make	(revision 77)
+++ /CMT/HEAD/mgr/cmt_dependencies.make	(revision 78)
@@ -1,34 +1,34 @@
-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 
-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 
-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 
-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 
-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 
-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 
-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 
-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 
-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 
-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 
-cmt_string_cxx_dependencies =  ../source/cmt_string.cxx   ../source/cmt_std.h   ../source/cmt_string.h 
-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 
-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 
-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 
-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 
-cmt_error_cxx_dependencies =  ../source/cmt_error.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_error.h   ../source/cmt_vector.h 
-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 
-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 
-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 
-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 
-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 
-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 
-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 
-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 
-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 
-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 
-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 
-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 
-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 
-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 
-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 
-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 
-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 
-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 
+cmt_cxx_dependencies =  ../source/cmt.cxx 
+cmt_awk_cxx_dependencies =  ../source/cmt_awk.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h 
+cmt_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 
+cmt_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 
+cmt_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 
+cmt_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 
+cmt_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 
+cmt_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 
+cmt_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 
+cmt_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 
+cmt_string_cxx_dependencies =  ../source/cmt_string.cxx   ../source/cmt_string.h 
+cmt_system_cxx_dependencies =  ../source/cmt_system.cxx   ../source/cmt_string.h   ../source/cmt_error.h 
+cmt_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 
+cmt_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 
+cmt_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 
+cmt_error_cxx_dependencies =  ../source/cmt_error.cxx   ../source/cmt_vector.h 
+cmt_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 
+cmt_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 
+cmt_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 
+cmt_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 
+cmt_database_cxx_dependencies =  ../source/cmt_database.cxx   ../source/cmt_vector.h 
+cmt_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 
+cmt_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 
+cmt_regexp_cxx_dependencies =  ../source/cmt_regexp.cxx   ../source/cmt_regexp.h   ../source/cmt_vector.h   ../source/cmt_string.h   ../source/cmt_system.h 
+cmt_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 
+cmt_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 
+cmt_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 
+cmt_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 
+cmt_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 
+cmt_sequence_cxx_dependencies =  ../source/cmt_sequence.cxx   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h 
+cmt_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 
+cmt_scope_section_cxx_dependencies =  ../source/cmt_scope_section.cxx 
+cmt_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 
+cmt_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 
Index: /CMT/HEAD/source/cmt_cvs.cxx
===================================================================
--- /CMT/HEAD/source/cmt_cvs.cxx	(revision 77)
+++ /CMT/HEAD/source/cmt_cvs.cxx	(revision 78)
@@ -773,8 +773,27 @@
   }
 
+  void get_module (const cmt_string& offset,
+		   const cmt_string& product,
+		   cmt_string& module)
+  {
+    module = "";
+
+    if (offset != "")
+      {
+	module = offset;
+	module += "/"; // This is for CVS only thus we don't use the real separator.
+	while (module.find ("//") != cmt_string::npos)
+	  {
+	    module.replace_all ("//", "/");
+	  }
+      }
+
+    module += product;
+  }
+
   bool get_version (const cmt_string& offset,
                     const cmt_string& product,
                     const cmt_string& version_request,
-                    cmt_string& module,
+                    const cmt_string& module,
                     cmt_string& version,
                     bool& at_head)
@@ -787,18 +806,4 @@
     at_head = false;
             
-    module = "";
-
-    if (offset != "")
-      {
-	module = offset;
-	module += "/"; // This is for CVS only thus we don't use the real separator.
-	while (module.find ("//") != cmt_string::npos)
-	  {
-	    module.replace_all ("//", "/");
-	  }
-      }
-
-    module += product;
-
     /**
      *   Try to figure out what is the effective version tag available
@@ -1344,4 +1349,11 @@
   }
 
+  /**
+     Find the most appropriate effective version directory corresponding to the 
+     specified version expression.
+     The specified expression may contain wildcards (in the file manager sense). This
+     FME is first converted into a RE then a directory search is performed.
+     An empty string is returned if no match is found.
+   */
   cmt_string find_matching_version (const cmt_string& expression)
   {
@@ -1462,4 +1474,66 @@
     CmtSystem::cd (here);
     me = saved;
+  }
+
+  /**
+     Check whether a given directory structure matches an expected product structure
+     given by the structure info obtained from the most recent request to the CVS pluggin
+   */
+  bool check_structure (const cmt_string& dir)
+  {
+    bool result = false;
+
+    if (!CmtSystem::test_directory (dir))
+      {
+	return (false);
+      }
+
+    if (structure_info == "package")
+      {
+	// Check if it is a true CMT package.
+	
+	cmt_string file_name;
+	
+	file_name = dir;
+	file_name += CmtSystem::file_separator ();
+	file_name += "cmt";
+	file_name += CmtSystem::file_separator ();
+	file_name += "requirements";
+	
+	if (CmtSystem::test_file (file_name))
+	  {
+	    result = true;
+	  }
+	else
+	  {
+	    file_name = dir;
+	    file_name += CmtSystem::file_separator ();
+	    file_name += "mgr";
+	    file_name += CmtSystem::file_separator ();
+	    file_name += "requirements";
+	    
+	    if (CmtSystem::test_file (file_name))
+	      {
+		result = true;
+	      }
+	  }
+      }
+    else if (structure_info == "project")
+      {
+	cmt_string file_name;
+	
+	file_name = dir;
+	file_name += CmtSystem::file_separator ();
+	file_name += "cmt";
+	file_name += CmtSystem::file_separator ();
+	file_name += "project.cmt";
+	
+	if (CmtSystem::test_file (file_name))
+	  {
+	    result = true;
+	  }
+      }
+
+    return (result);
   }
 
@@ -1527,22 +1601,16 @@
     cmt_string effective_version = find_matching_version (dir);
     
+    cmt_string module;
+    get_module (full_offset, product, module);
+
+    cmt_string cvs_tag = (tag != "") ? tag : version;
+    bool at_head = false;
+
     if (effective_version != "")
       {
 	version = effective_version;
-	
-	dir = build_version_directory (offset, product, version);
-	
-	cout << "# ================= " << structure_info << " " << product 
-	     << " version " << version << echo_ppath 
-	     << " already installed in " << dir << endl;
-	
-	recursive = false;
       }
     else
       {
-	bool at_head = false;
-	cmt_string module;
-	cmt_string cvs_tag = (tag != "") ? tag : version;
-	
 	//
 	// get_version attempts to find the most appropriate version
@@ -1561,6 +1629,6 @@
 	  }
 	
-	if (!get_version (full_offset, product, cvs_tag,
-			  module, cvs_tag, at_head))
+	if (!get_version (full_offset, product, cvs_tag, module,
+			  cvs_tag, at_head))
 	  {
 	    return;
@@ -1591,27 +1659,28 @@
 	    dir = build_version_directory (offset, product, version);
 	  }
-
-	if (CmtSystem::test_directory (dir))
-	  {
-	    cout << "# ================= " << structure_info << " " << product 
-		 << " version " << version << echo_ppath 
-		 << " already installed." << endl;
-	    
-	    recursive = false;
-	  }
-	else
-	  {
-	    //
-	    // Now we can say that we have to perform the real checkout.
-	    // 
-	    
-	    if (!really_checkout (offset, product, version, cvs_tag, module, dir, at_head))
-	      {
-		cout << "# bad return from really_checkout_product" << endl;
-		return;
-	      }
-	  }
-      }
-    
+      }
+    
+
+    if (check_structure (dir))
+      {
+	cout << "# ================= " << structure_info << " " << product 
+	     << " version " << version << echo_ppath 
+	     << " already installed." << endl;
+	
+	recursive = false;
+      }
+    else
+      {
+	//
+	// Now we can say that we have to perform the real checkout.
+	// 
+	
+	if (!really_checkout (offset, product, version, cvs_tag, module, dir, at_head))
+	  {
+	    cout << "# bad return from really_checkout_product" << endl;
+	    return;
+	  }
+      }
+
     //
     //  Now reach the newly checked out product.
@@ -1751,20 +1820,22 @@
     cmt_string tag;
     
+    {
+      cmt_string m;
+      m = m_cvs_offset;
+      m += module;
+        
+      get_cvs_infos_with_offset (m);
+        
+      if (error_info != "")
+	{
+	  cout << error_info << endl;
+	  return;
+	}
+    }
+
     if (version_tag == "")
       {
         Cut cut (0);
         
-        cmt_string m;
-        m = m_cvs_offset;
-        m += module;
-        
-        get_cvs_infos_with_offset (m);
-        
-        if (error_info != "")
-          {
-            cout << error_info << endl;
-            return;
-          }
-
         if (tags_top_info != "") tag = tags_top_info;
         else tag = tags_info;
Index: /CMT/HEAD/source/cmt_deps_builder.cxx
===================================================================
--- /CMT/HEAD/source/cmt_deps_builder.cxx	(revision 77)
+++ /CMT/HEAD/source/cmt_deps_builder.cxx	(revision 78)
@@ -48,9 +48,15 @@
                                 CmtSystem::cmt_string_vector& deps)
 {
+  Log;
+
   bool found = false;
 
   for (int i = 0; i < all_deps.size (); i++)
     {
-      if (all_deps[i] == header_file)
+      const cmt_string& n = all_deps[i];
+
+      log << "CMT> check old header file name=" << n << " against " << header_file << log_endl;
+
+      if (n == header_file)
         {
           found = true;
@@ -61,4 +67,6 @@
   if (!found)
     {
+      log << "CMT> parsing new header file name=" << header_file << log_endl;
+
       all_deps.push_back (header_file);
       
@@ -115,7 +123,12 @@
     {
       ptr++;
+
+      // skip spaces 
       while ((*ptr == ' ') || (*ptr == '\t')) ptr++;
+
       if (!strncmp (ptr, "include", 7))
         {
+	  // We have a #include statement
+
           ptr += 7;
 
@@ -133,4 +146,5 @@
           else
             {
+	      // empty #include statement??
               state = in_line;
               ptr += strlen (ptr);
@@ -140,4 +154,6 @@
       else
         {
+	  // ignore other pre-processor statements
+
           state = in_line;
           ptr += strlen (ptr);
@@ -147,7 +163,10 @@
   else if (!strncmp (ptr, "      include", 13))
     {
+      // fortran include statement
+
       ptr += 13;
 
       while ((*ptr == ' ') || (*ptr == '\t')) ptr++;
+
       if (*ptr == '\'')
         {
@@ -163,7 +182,10 @@
   else if (!strncmp (ptr, "\tinclude", 8))
     {
+      // fortran include statement
+
       ptr += 8;
 
       while ((*ptr == ' ') || (*ptr == '\t')) ptr++;
+
       if (*ptr == '\'')
         {
@@ -182,4 +204,6 @@
       return (ptr);
     }
+
+  // At this point we do have to include a header file.
 
   char* end;
@@ -212,57 +236,111 @@
 }
 
-//--------------------------------------------------
+/**
+   Any line with no header inclusion
+   step through comments and strings
+ */
 static char* in_line_action (char* ptr, state_def& state)
 {
-  char* pattern = &ptr[strlen (ptr)];
+  char* pattern = ptr + strlen (ptr);
+  int length = 0;
+
+  /*
+    search for the first occurrence of 
+    {single-quote double-quote open-comment open-line-comment}
+
+    Must exclude escaped quotes \' and \"
+  */
 
   char* pos = strchr (ptr, '"');
-  if (pos != 0)
-    {
-      if (pos < pattern)
-        {
-          state = in_string;
-          pattern = pos;
-        }
+  if ((pos != 0) && (pos < pattern) && (pos > ptr) && (*(pos-1) != '\\'))
+    {
+      state = in_string;
+      pattern = pos;
+      length = 1;
     }
 
   pos = strchr (ptr, '\'');
-  if (pos != 0)
-    {
-      if (pos < pattern)
-        {
-          state = in_char;
-          pattern = pos;
-        }
+  if ((pos != 0) && (pos < pattern) && (pos > ptr) && (*(pos-1) != '\\'))
+    {
+      state = in_char;
+      pattern = pos;
+      length = 1;
     }
 
   pos = strstr (ptr, "/*");   //*/
-  if (pos != 0)
-    {
-      if (pos < pattern)
-        {
-          state = in_comment;
-          pattern = pos + 1;
-        }
+  if ((pos != 0) && (pos < pattern))
+    {
+      state = in_comment;
+      pattern = pos;
+      length = 2;
     }
 
   pos = strstr (ptr, "//");
-  if (pos != 0)
-    {
-      if (pos < pattern)
-        {
-          state = in_line_comment;
-          pattern = pos + 1;
-        }
-    }
-
-  if (state != in_line)
-    {
-      ptr = pattern + 1;
+  if ((pos != 0) && (pos < pattern))
+    {
+      state = in_line_comment;
+      pattern = pos;
+      length = 2;
+    }
+
+  ptr = pattern + length;
+
+  return (ptr);
+}
+
+//--------------------------------------------------
+static char* in_string_action (char* ptr, state_def& state)
+{
+  // we exclusively look for a double quote
+
+  char* pos = strchr (ptr, '"');
+  if (pos == 0)
+    {
+        // This string is not finished till the end of the line..
+        // we expect it to continue to the next line...
+        // thus we leave the state as it is
+      ptr += strlen (ptr);
     }
   else
     {
+      if ((pos > ptr) && (*(pos - 1) == '\\'))
+        {
+          ptr = pos + 1;
+        }
+      else
+        {
+          ptr = pos + 1;
+          state = in_line;
+        }
+    }
+
+  return (ptr);
+}
+
+//--------------------------------------------------
+static char* in_char_action (char* ptr, state_def& state)
+{
+  // we exclusively look for a single quote
+
+  char* pos = strchr (ptr, '\'');
+  if (pos == 0)
+    {
+        // This string is not finished till the end of the line..
+        // we expect it continues to the nex line...
+        // thus we leave the state as it is
       ptr += strlen (ptr);
     }
+  else
+    {
+      if ((pos > ptr) && (*(pos - 1) == '\\'))
+        {
+          ptr = pos + 1;
+        }
+      else
+        {
+          ptr = pos + 1;
+          state = in_line;
+        }
+    }
 
   return (ptr);
@@ -270,5 +348,45 @@
 
 //--------------------------------------------------
-static char* in_string_action (char* ptr, state_def& state)
+static char* in_comment_action (char* ptr, state_def& state)
+{
+  char* pattern = ptr + strlen (ptr);
+  int length = 0;
+
+  /*
+    Even if we are inside a comment, we must detect strings since comment markers may 
+    be written inside them.
+   */
+
+  char* pos = strchr (ptr, '"');
+  if ((pos != 0) && (pos < pattern) && (pos > ptr) && (*(pos-1) != '\\'))
+    {
+      state = in_string_comment;
+      pattern = pos;
+      length = 1;
+    }
+
+  pos = strchr (ptr, '\'');
+  if ((pos != 0) && (pos < pattern) && (pos > ptr) && (*(pos-1) != '\\'))
+    {
+      state = in_char_comment;
+      pattern = pos;
+      length = 1;
+    }
+
+  pos = strstr (ptr, "*/");
+  if ((pos != 0) && (pos < pattern))
+    {
+      state = in_line;
+      pattern = pos;
+      length = 2;
+    }
+
+  ptr = pattern + length;
+
+  return (ptr);
+}
+
+//--------------------------------------------------
+static char* in_string_comment_action (char* ptr, state_def& state)
 {
   char* pos = strchr (ptr, '"');
@@ -281,13 +399,12 @@
   else
     {
-      pos--;
-      if (*pos == '\\')
-        {
-          ptr = pos + 2;
+      if ((pos > ptr) && (*(pos - 1) == '\\'))
+        {
+          ptr = pos + 1;
         }
       else
         {
-          ptr = pos + 2;
-          state = in_line;
+          ptr = pos + 1;
+          state = in_comment;
         }
     }
@@ -297,5 +414,5 @@
 
 //--------------------------------------------------
-static char* in_char_action (char* ptr, state_def& state)
+static char* in_char_comment_action (char* ptr, state_def& state)
 {
   char* pos = strchr (ptr, '\'');
@@ -308,190 +425,159 @@
   else
     {
+      if ((pos > ptr) && (*(pos - 1) == '\\'))
+        {
+          ptr = pos + 1;
+        }
+      else
+        {
+          ptr = pos + 1;
+          state = in_comment;
+        }
       pos--;
-      if (*pos == '\\')
-        {
-          ptr = pos + 2;
+    }
+
+  return (ptr);
+}
+
+//--------------------------------------------------
+static char* in_line_comment_action (char* ptr, state_def& state)
+{
+  ptr += strlen (ptr);
+  state = in_line;
+
+  return (ptr);
+}
+
+//--------------------------------------------------
+static void build_deps_text (char* text,
+			     const cmt_string& dir_name,
+			     int current_path_index,
+			     const CmtSystem::cmt_string_vector& include_paths,
+			     const CmtSystem::cmt_string_vector& substitutions,
+			     CmtSystem::cmt_string_vector& all_deps,
+			     CmtSystem::cmt_string_vector& deps)
+{
+  Log;
+
+  int pos;
+  int max_pos;
+  int line_number = 1;
+
+  log << "CMT> build_deps_text dir_name="
+      << dir_name << log_endl;
+
+  pos = 0;
+  max_pos = strlen (text);
+
+  char* current = text;
+  char* last = text + max_pos;
+
+  state_def state = at_start;
+
+  while (current < last)
+    {
+      char marker;
+      char* marker_pos = 0;
+
+      char* crnl = strstr (current, "\r\n");
+      char* nl = strchr (current, '\n');
+
+      char* first = nl;
+      int length = 1;
+
+      char* ptr = 0;
+
+      if (crnl != 0)
+        {
+	  // cr+nl has been found
+
+          if (nl == 0)
+            {
+	      // cr but no nl ??
+              first = crnl;
+              length = 2;
+            }
+          else
+            {
+	      // both cr+nl and nl found
+              first = (nl < crnl) ? nl : crnl;
+              length = (nl < crnl) ? 1 : 2;
+            }
         }
       else
-        {
-          ptr = pos + 2;
-          state = in_line;
-        }
-    }
-
-  return (ptr);
-}
-
-//--------------------------------------------------
-static char* in_comment_action (char* ptr, state_def& state)
-{
-  char* pattern = &ptr[strlen (ptr)];
-  char* pos = strchr (ptr, '"');
-  if (pos != 0)
-    {
-      if (pos < pattern)
-        {
-          state = in_string_comment;
-          pattern = pos;
-        }
-    }
-  pos = strchr (ptr, '\'');
-  if (pos != 0)
-    {
-      if (pos < pattern)
-        {
-          state = in_char_comment;
-          pattern = pos;
-        }
-    }
-  pos = strstr (ptr, "*/");
-  if (pos != 0)
-    {
-      if (pos < pattern)
-        {
-          state = in_line;
-          pattern = pos + 1;
-        }
-    }
-
-  if (state == in_comment)
-    {
-      ptr += strlen (ptr);
-    }
-  else
-    {
-      ptr = pattern + 1;
-    }
-
-  return (ptr);
-}
-
-//--------------------------------------------------
-static char* in_string_comment_action (char* ptr, state_def& state)
-{
-  char* pos = strchr (ptr, '"');
-  if (pos == 0)
-    {
-        // This string is not finished till the end of the line..
-        // we expect it continues to the nex line...
-      ptr += strlen (ptr);
-    }
-  else
-    {
-      pos--;
-      if (*pos == '\\')
-        {
-          ptr = pos + 2;
+	{
+	  // no cr+nl but nl alone found
+	  first = nl;
+	  length = 1;
+	}
+
+      ptr = current;
+
+      if (first == 0)
+        {
+	  // neither nl nor cr+nl found => this is the last line
+
+	  marker_pos = 0;
         }
       else
         {
-          ptr = pos + 2;
-          state = in_comment;
-        }
-    }
-
-  return (ptr);
-}
-
-//--------------------------------------------------
-static char* in_char_comment_action (char* ptr, state_def& state)
-{
-  char* pos = strchr (ptr, '\'');
-  if (pos == 0)
-    {
-        // This string is not finished till the end of the line..
-        // we expect it continues to the nex line...
-      ptr += strlen (ptr);
-    }
-  else
-    {
-      pos--;
-      if (*pos == '\\')
-        {
-          ptr = pos + 2;
-        }
+	  marker_pos = first;
+	  marker = *marker_pos;
+	  *marker_pos = 0;
+        }
+
+      log << "CMT> build_deps_text2 line=[" 
+	  << current << "]" << log_endl;
+      
+      while (strlen (ptr) > 0)
+	{
+	  switch (state)
+	    {
+	    case at_start:
+	      ptr = at_start_action (ptr,
+				     state,
+				     dir_name,
+				     current_path_index,
+				     include_paths,
+				     substitutions,
+				     all_deps,
+				     deps);
+	      break;
+	    case in_line:
+	      ptr = in_line_action (ptr, state);
+	      break;
+	    case in_string:
+	      ptr = in_string_action (ptr, state);
+	      break;
+	    case in_char:
+	      ptr = in_char_action (ptr, state);
+	      break;
+	    case in_comment:
+	      ptr = in_comment_action (ptr, state);
+	      break;
+	    case in_string_comment:
+	      ptr = in_string_comment_action (ptr, state);
+	      break;
+	    case in_char_comment:
+	      ptr = in_char_comment_action (ptr, state);
+	      break;
+	    case in_line_comment:
+	      ptr = in_line_action (ptr, state);
+	      break;
+	    }
+	}
+
+      if (state == in_line) state = at_start;
+      line_number++;
+
+      if (marker_pos != 0)
+	{
+	  *marker_pos = marker;
+	  current = marker_pos + length;
+	}
       else
-        {
-          ptr = pos + 2;
-          state = in_comment;
-        }
-    }
-
-  return (ptr);
-}
-
-//--------------------------------------------------
-static char* in_line_comment_action (char* ptr, state_def& state)
-{
-  ptr += strlen (ptr);
-
-  return (ptr);
-}
-
-//--------------------------------------------------
-static void build_deps_stream (istream& input,
-                               const cmt_string& dir_name,
-                               int current_path_index,
-                               const CmtSystem::cmt_string_vector& include_paths,
-                               const CmtSystem::cmt_string_vector& substitutions,
-                               CmtSystem::cmt_string_vector& all_deps,
-                               CmtSystem::cmt_string_vector& deps)
-{
-  Log;
-
-  if (input)
-    {
-      log << "CMT> build_deps_stream dir_name="
-	  << dir_name << log_endl;
-
-      while (!input.eof ())
-        {
-          char line[16384];
-
-          input.getline (line, sizeof (line));
-          char* ptr = &line[0];
-          state_def state = at_start;
-
-	  log << "CMT> build_deps_stream2 line=[" 
-	      << line << "]" << log_endl;
-
-          while (strlen (ptr) > 0)
-            {
-              switch (state)
-                {
-                  case at_start:
-                    ptr = at_start_action (ptr,
-                                           state,
-                                           dir_name,
-                                           current_path_index,
-                                           include_paths,
-                                           substitutions,
-                                           all_deps,
-                                           deps);
-                    break;
-                  case in_line:
-                    ptr = in_line_action (ptr, state);
-                    break;
-                  case in_string:
-                    ptr = in_string_action (ptr, state);
-                    break;
-                  case in_char:
-                    ptr = in_char_action (ptr, state);
-                    break;
-                  case in_comment:
-                    ptr = in_comment_action (ptr, state);
-                    break;
-                  case in_string_comment:
-                    ptr = in_string_comment_action (ptr, state);
-                    break;
-                  case in_char_comment:
-                    ptr = in_char_comment_action (ptr, state);
-                    break;
-                  case in_line_comment:
-                    ptr = in_line_action (ptr, state);
-                    break;
-                }
-            }
-        }
+	{
+	  break;
+	}
     }
 }
@@ -519,13 +605,15 @@
   if (CmtSystem::test_file (name))
     {
-      ifstream input (name.c_str ());
-      if (input)
-        {
-          CmtSystem::dirname (name, new_dir);
-          build_deps_stream (input, new_dir, current_path_index,
-                             include_paths, substitutions,
-                             all_deps, deps);
-          return (0);
-        }
+      cmt_string text;
+
+      text.read (name);
+
+      char* ptr = &text[0];
+      CmtSystem::dirname (name, new_dir);
+
+      build_deps_text (ptr, new_dir, current_path_index,
+		       include_paths, substitutions,
+		       all_deps, deps);
+      return (0);
     }
 
@@ -542,13 +630,15 @@
   if (CmtSystem::test_file (full_name))
     {
-      ifstream input (full_name.c_str ());
-      if (input)
-        {
-          CmtSystem::dirname (full_name, new_dir);
-          build_deps_stream (input, new_dir, current_path_index,
-                             include_paths, substitutions,
-                             all_deps, deps);
-          return (1);
-        }
+      cmt_string text;
+
+      text.read (full_name);
+
+      char* ptr = &text[0];
+      CmtSystem::dirname (full_name, new_dir);
+
+      build_deps_text (ptr, new_dir, current_path_index,
+		       include_paths, substitutions,
+		       all_deps, deps);
+      return (1);
     }
 
@@ -569,21 +659,22 @@
       if (CmtSystem::test_file (full_name))
         {
-          ifstream in (full_name.c_str ());
-          if (in)
-            {
-              CmtSystem::dirname (full_name, new_dir);
-
-	      log << "CMT> build_deps3 new_dir=" << new_dir << log_endl;
-
-              build_deps_stream (in,
-                                 new_dir,
-                                 path_index + 2,
-                                 include_paths,
-                                 substitutions,
-                                 all_deps,
-                                 deps);
-
-              return (path_index + 2);
-            }
+	  cmt_string text;
+
+	  text.read (full_name);
+
+	  char* ptr = &text[0];
+	  CmtSystem::dirname (full_name, new_dir);
+
+	  log << "CMT> build_deps3 new_dir=" << new_dir << log_endl;
+
+	  build_deps_text (ptr,
+			   new_dir,
+			   path_index + 2,
+			   include_paths,
+			   substitutions,
+			   all_deps,
+			   deps);
+
+	  return (path_index + 2);
         }
     }
@@ -696,4 +787,9 @@
 CmtSystem::cmt_string_vector& DepsBuilder::run (const cmt_string& file_name)
 {
+  Log;
+
+  log << "Starting deps builder on " << file_name << log_endl;
+
+
   m_deps.clear ();
   m_all_deps.clear ();
Index: /CMT/HEAD/source/cmt_include.cxx
===================================================================
--- /CMT/HEAD/source/cmt_include.cxx	(revision 77)
+++ /CMT/HEAD/source/cmt_include.cxx	(revision 78)
@@ -12,4 +12,5 @@
 #include "cmt_include.h"
 #include "cmt_use.h"
+#include "cmt_symbol.h"
 
 /*----------------------------------------------------------*/
@@ -19,5 +20,9 @@
 /*----------------------------------------------------------*/
 
-/*----------------------------------------------------------*/
+/**
+   Executed to parse an include_dirs statement
+   It postpones the macro expansion to the post-processing stage
+   (during set_standard_macros) 
+ */
 void Include::action (const CmtSystem::cmt_string_vector& words, Use* use)
 {
@@ -28,11 +33,23 @@
   for (int i = 1; i < words.size (); i++)
     {
+      /*
+	statement words may contain macro references at that level
+	they are stored as they are.
+	They will be expanded later on using the parse_all method
+
+	(called from set_standard_macros)
+
+       */
       name = words[i];
       if (name == "") return;
+
       add (name, use);
     }
 }
 
-/*----------------------------------------------------------*/
+/**
+   Search a database entry for this include_dirs matching the
+   duet {name, use}
+ */
 Include* Include::find (const cmt_string& name, Use* use)
 {
@@ -60,5 +77,7 @@
 }
 
-/*----------------------------------------------------------*/
+/**
+   Add a unique entry for this include_dirs specification given by the duet {name, use}
+ */
 Include* Include::add (const cmt_string& name, Use* use)
 {
@@ -83,108 +102,71 @@
 
 /*----------------------------------------------------------*/
-void Include::print_all (PrintMode mode)
+void Include::clear_all ()
 {
-  int number;
-  int include_number;
-  Use::UsePtrVector& uses = Use::get_ordered_uses ();
-
-  if (uses.size () > 0)
-    {
-      for (number = 0; number < uses.size (); number++)
-        {
-          const Use* use = uses[number];
-
-	  Package* p = use->get_package ();
-          if (p->is_cmt ()) continue;
-
-          cout << "-I${" << use->prefix << "ROOT}/src ";
-
-          for (include_number = 0;
-               include_number < use->includes.size ();
-               include_number++)
-            {
-              const Include& incl = use->includes[include_number];
-
-              cout << "-I" << incl.name << " ";
-            }
-        }
-    }
-
-  for (include_number = 0;
+  for (int include_number = 0;
        include_number < (Use::current()).includes.size ();
        include_number++)
     {
-      const Include& incl = (Use::current()).includes[include_number];
+      Include& incl = (Use::current()).includes[include_number];
 
-      cout << "-I" << incl.name << " ";
+      incl.clear ();
+    }
+}
+
+/**
+   Post processing of the include_dirs statements.
+   This is meant to expand all macro references used in the
+   include_dirs statements
+
+   Note that this may create new Include objects. Thus the loop is
+   only performed onto the existing objects before the post-processing step
+ */
+void Include::parse_all ()
+{
+  int size = (Use::current()).includes.size ();
+
+  for (int include_number = 0;
+       include_number < size;
+       include_number++)
+    {
+      Include& incl = (Use::current()).includes[include_number];
+
+      incl.parse ();
     }
 }
 
 /*----------------------------------------------------------*/
-void Include::print_filters (PrintMode mode)
+void Include::clear ()
 {
-  int number;
-  int include_number;
-  Use::UsePtrVector& uses = Use::get_ordered_uses ();
-
-  if (uses.size () > 0)
-    {
-      for (number = 0; number < uses.size (); number++)
-        {
-          Use* use = uses[number];
-
-          cout << "s#" <<
-              ".*" << SLASH <<
-              use->get_package_name () << SLASH <<
-              use->version << SLASH <<
-              "#$(" << use->prefix << "ROOT)" << SLASH <<
-              "#g" << endl;
-
-          for (include_number = 0;
-               include_number < use->includes.size ();
-               include_number++)
-            {
-              Include& incl = use->includes[include_number];
-
-              const cmt_string& d = Cmt::filter_dir (incl.name);
-
-              if (d.size () > 0)
-                {
-                  cout << "s#" << d << "#" <<
-                      incl.name << "#g" << endl;
-                }
-            }
-        }
-    }
-
-  {
-    const Use* use = &(Use::current());
-
-    cout << "s#" << ".*" << SLASH <<
-        use->get_package_name () << SLASH <<
-        use->version << SLASH <<
-        "#$(" << use->prefix << "ROOT)" << SLASH <<
-        "#g" << endl;
-
-    for (include_number = 0;
-         include_number < use->includes.size ();
-         include_number++)
-      {
-        const Include& incl = use->includes[include_number];
-
-        const cmt_string& d = Cmt::filter_dir (incl.name);
-
-        if (d.size () > 0)
-          {
-            cout << "s#" << d << "#" <<
-                incl.name << "#g" << endl;
-          }
-      }
-  }
+  use = 0;
 }
 
-/*----------------------------------------------------------*/
-void Include::clear_all ()
+/**
+   Post processing of an include_dirs statement.
+
+   The name field is expanded for its macro references
+   and split into individual words.
+   Each word in turn generates a new Include object
+   The old Include object is inactivated by setting an empty name
+ */
+void Include::parse ()
 {
+  Symbol::expand (name);
+
+  CmtSystem::cmt_string_vector ws;
+
+  ws.clear ();
+
+  CmtSystem::split (name, " ", ws);
+
+  name = "";
+  use = 0;
+
+  for (int j = 0; j < ws.size (); j++)
+    {
+      const cmt_string& w = ws[j];
+
+      add (w, use);
+    }
 }
 
@@ -192,5 +174,5 @@
 Include::Include ()
 {
-  use = 0;
+  clear ();
 }
 
Index: /CMT/HEAD/source/cmt_include.h
===================================================================
--- /CMT/HEAD/source/cmt_include.h	(revision 77)
+++ /CMT/HEAD/source/cmt_include.h	(revision 78)
@@ -19,6 +19,5 @@
   static Include* find (const cmt_string& name, Use* use);
   static Include* add (const cmt_string& name, Use* use);
-  static void print_all (PrintMode mode);
-  static void print_filters (PrintMode mode);
+  static void parse_all ();
   static void clear_all ();
 
@@ -26,4 +25,6 @@
   Include ();
   ~Include ();
+  void parse ();
+  void clear ();
 
   cmt_string name;
Index: /CMT/HEAD/source/cmt_parser.cxx
===================================================================
--- /CMT/HEAD/source/cmt_parser.cxx	(revision 77)
+++ /CMT/HEAD/source/cmt_parser.cxx	(revision 78)
@@ -164,6 +164,19 @@
   bool strategy;
 
-  if (p == 0) strategy = StrategyMgr::get_default_strategy (name);
-  else strategy = p->get_strategy (name);
+  if (p == 0)
+    {
+      static const Project::ProjectVector& projects = Project::projects ();
+
+      if (projects.size () == 0) strategy = StrategyMgr::get_default_strategy (name);
+      else
+	{
+	  p = &(projects[0]);
+	  strategy = p->get_strategy (name);
+	}
+    }
+  else
+    {
+      strategy = p->get_strategy (name);
+    }
 
   return (strategy);
@@ -6479,4 +6492,5 @@
   void fill_for_use_includes ()
   {
+    Include::parse_all ();
     Use::UsePtrVector& Uses = Use::get_ordered_uses ();
 
Index: /CMT/HEAD/source/cmt_project.cxx
===================================================================
--- /CMT/HEAD/source/cmt_project.cxx	(revision 77)
+++ /CMT/HEAD/source/cmt_project.cxx	(revision 78)
@@ -792,7 +792,14 @@
     }
 
-  Project* current = get_current ();
-
-  if (current != 0) current->show ();
+  Project* p = get_current ();
+
+  if (p == 0)
+    {
+      if (Projects.size () == 0) return;
+
+      p = &(Projects[0]);
+    }
+
+  p->show ();
 }
 
@@ -1029,5 +1036,10 @@
   Project* p = get_current ();
 
-  if (p == 0) return;
+  if (p == 0)
+    {
+      if (Projects.size () == 0) return;
+
+      p = &(Projects[0]);
+    }
 
   visitor.pre (p);
@@ -1042,4 +1054,5 @@
   VisitorForFillCMTPATH (cmt_string& buffer) : m_buffer (buffer)
   {
+    buffer = "path CMTPATH \"\" \n";
   }
 
@@ -1055,5 +1068,5 @@
 	m_buffer += "path_append CMTPATH \"";
 	m_buffer += w;
-	m_buffer += "\" \n";
+	m_buffer += ":\" \n";
       }
   }
@@ -1070,5 +1083,5 @@
 	m_buffer += "path_append CMTPATH \"";
 	m_buffer += w;
-	m_buffer += "\" \n";
+	m_buffer += ":\" \n";
       }
   }
Index: /CMT/HEAD/source/cmt_symbol.cxx
===================================================================
--- /CMT/HEAD/source/cmt_symbol.cxx	(revision 77)
+++ /CMT/HEAD/source/cmt_symbol.cxx	(revision 78)
@@ -2123,6 +2123,4 @@
 
                 Cmt::vector_to_string (paths, path_separator, temp);
-                temp.replace_all ("::", ":");
-                temp.replace_all (";;", ";");
               }
               
@@ -2171,6 +2169,4 @@
 
                 Cmt::vector_to_string (paths, path_separator, temp);
-                temp.replace_all ("::", ":");
-                temp.replace_all (";;", ";");
               }
               
@@ -2181,4 +2177,27 @@
 
   level--;
+
+  for (;;)
+    {
+      int sz = temp.size ();
+
+      if (sz == 0) break;
+
+      if ((temp[0] == ';') || (temp[0] == ':'))
+	{
+	  temp.erase (0, 1);
+	}
+      else if ((temp[sz-1] == ';') || (temp[sz-1] == ':'))
+	{
+	  temp.erase (sz-1, 1);
+	}
+      else
+	{
+	  break;
+	}
+    }
+
+  temp.replace_all ("::", ":");
+  temp.replace_all (";;", ";");
   
   return (temp);
Index: /CMT/HEAD/source/cmt_use.cxx
===================================================================
--- /CMT/HEAD/source/cmt_use.cxx	(revision 77)
+++ /CMT/HEAD/source/cmt_use.cxx	(revision 78)
@@ -2897,4 +2897,6 @@
     {
       Include& incl = includes[i];
+
+      if (incl.name == "") continue;
       
       buffer += "$(ppcmd)\"";
Index: /CMT/HEAD/source/cmt_version.h
===================================================================
--- /CMT/HEAD/source/cmt_version.h	(revision 77)
+++ /CMT/HEAD/source/cmt_version.h	(revision 78)
@@ -8,5 +8,6 @@
 #define __cmt_version_h__
 
-#define CMTVERSION "v1r18p20050501"
+//#define CMTVERSION "v1r18p20050501"
+#define CMTVERSION "HEAD"
 
 #endif
