Index: /CMT/HEAD/ChangeLog
===================================================================
--- /CMT/HEAD/ChangeLog	(revision 101)
+++ /CMT/HEAD/ChangeLog	(revision 102)
@@ -1,5 +1,22 @@
+2005-10-18    <arnault@lal.in2p3.fr> 288
+
+	* source/cmt_symbol.cxx (print): Filter path values before
+	setting them externally
+
+	* source/cmt_symbol.cxx (all_set): Filter path values before
+	setting them internally
+
+	* source/cmt_parser.cxx (configure_cmt_path): Filter out CMTPATH
+	before creating or updating projects from the CMTPATH value
+
+	* source/cmt_symbol.h (class Symbol): Add a static function to
+	filter out faulty items in a PATH symbol
+
 2005-10-17    <arnault@lal.in2p3.fr> 287
 
-	* source/cmt_cvs.cxx (class CvsImplementation): Protect agains
+	* mgr/Makefile (cmtexe): Use -quiet option whenever using cmt
+	within the Makefile of CMT
+
+	* source/cmt_cvs.cxx (class CvsImplementation): Protect against
 	empty protocol level (for backward compatibility)
 
Index: /CMT/HEAD/mgr/Makefile
===================================================================
--- /CMT/HEAD/mgr/Makefile	(revision 101)
+++ /CMT/HEAD/mgr/Makefile	(revision 102)
@@ -124,7 +124,7 @@
 
 cmt_dependencies.make $(bin)/cmt_dependencies.make : $(cmtexe)
-	$(cmtexe) build dependencies cmt -all_sources -no_stamps
+	$(cmtexe) -quiet build dependencies cmt -all_sources -no_stamps
 	cp $(bin)/cmt_dependencies.make ../mgr
-	$(cmtexe) build dependencies cmt -all_sources
+	$(cmtexe) -quiet build dependencies cmt -all_sources
 
 #---------------------------------------------------------
@@ -252,5 +252,5 @@
 #----------------------------------------------------------
 rpm ::
-	version=`$(cmtexe) version`; \
+	version=`$(cmtexe) -quiet version`; \
 	tempdir=/tmp/CMT; \
 	rm -rf $${tempdir}; \
@@ -302,6 +302,6 @@
 	@echo "  Creating all $(demo_sequence) packages..."
 	cd $(demo_location); \
-	version=`$(cmtexe) version`; \
-	($(cmtexe) run_sequence ${CMTROOT}/src/demo/$(demo_sequence).cmt | \
+	version=`$(cmtexe) -quiet version`; \
+	($(cmtexe) -quiet run_sequence ${CMTROOT}/src/demo/$(demo_sequence).cmt | \
 	  sed -e "s#$${CMTROOT}#"'$${CMTROOT}'"#" \
 	      -e "s#$${version}#"'$${version}'"#" \
@@ -329,7 +329,7 @@
 	mkdir -p $${location}; \
 	cd $${location}; \
-	version=`$(cmtexe) version`; \
+	version=`$(cmtexe) -quiet version`; \
 	echo "  Creating all $${sequence} packages..."; \
-	($(cmtexe) run_sequence ${CMTROOT}/src/demo/$${sequence}.cmt | \
+	($(cmtexe) -quiet run_sequence ${CMTROOT}/src/demo/$${sequence}.cmt | \
 	  sed -e "s#$${CMTROOT}#"'$${CMTROOT}'"#" \
 	      -e "s#$${version}#"'$${version}'"#" \
Index: /CMT/HEAD/mgr/cmt.nmake
===================================================================
--- /CMT/HEAD/mgr/cmt.nmake	(revision 101)
+++ /CMT/HEAD/mgr/cmt.nmake	(revision 102)
@@ -3,5 +3,5 @@
 #  Application cmt
 #
-#   Generated Sat Oct 15 11:22:36 2005  by ARNAULT
+#   Generated Mon Oct 17 11:37:01 2005  by ARNAULT
 #
 #====================================
Index: /CMT/HEAD/source/cmt_parser.cxx
===================================================================
--- /CMT/HEAD/source/cmt_parser.cxx	(revision 101)
+++ /CMT/HEAD/source/cmt_parser.cxx	(revision 102)
@@ -582,4 +582,11 @@
       s = CmtSystem::getenv ("CMTPATH");
     }
+
+  {
+    bool q = Me.m_quiet;
+    Me.m_quiet = true;  
+    Symbol::filter_path_value ("CMTPATH", s);
+    Me.m_quiet = q;  
+  }
 
   IProjectFactory& factory = ProjectFactory::instance ();
Index: /CMT/HEAD/source/cmt_symbol.cxx
===================================================================
--- /CMT/HEAD/source/cmt_symbol.cxx	(revision 101)
+++ /CMT/HEAD/source/cmt_symbol.cxx	(revision 102)
@@ -856,4 +856,55 @@
 }
 
+/**
+   Filter out faulty items of a path-like symbol value
+ */
+void Symbol::filter_path_value (const cmt_string& name, cmt_string& text)
+{
+  CmtSystem::cmt_string_vector paths;
+                  
+  CmtSystem::split (text, CmtSystem::path_separator (), paths);
+                  
+  for (int j = 0; j < paths.size (); ++j)
+    {
+      cmt_string& t = paths[j];
+
+      if (!CmtSystem::test_directory (t))
+	{
+	  if (!Cmt::get_quiet ())
+	    {
+	      cerr << "#CMT> Warning: Wrong " << name << " item " << t << endl;
+	    }
+	    
+	  t = "";
+	}
+    }
+  
+  Cmt::vector_to_string (paths, CmtSystem::path_separator (), text);
+
+  for (;;)
+    {
+      int sz = text.size ();
+
+      if (sz == 0) break;
+
+      if ((text[0] == ';') || (text[0] == ':'))
+	{
+	  text.erase (0, 1);
+	}
+      else if ((text[sz-1] == ';') || (text[sz-1] == ':'))
+	{
+	  text.erase (sz-1, 1);
+	}
+      else
+	{
+	  break;
+	}
+    }
+
+  text.replace_all ("::", ":");
+  text.replace_all (";;", ";");
+}
+
+
 //-------------------------------------------------------------
 Symbol& Symbol::symbol (int index)
@@ -1348,4 +1399,6 @@
       if (value != "")
 	{
+	  filter_path_value (symbol.name, value);
+
 	  cmt_string& temp = envs.add ();
 
@@ -1565,4 +1618,10 @@
 
   bool empty = (temp.size () == 0) ? true : false;
+
+  if (type == SymbolPath)
+    {
+      expand (temp);
+      Symbol::filter_path_value (name, temp);
+    }
 
   switch (type)
Index: /CMT/HEAD/source/cmt_symbol.h
===================================================================
--- /CMT/HEAD/source/cmt_symbol.h	(revision 101)
+++ /CMT/HEAD/source/cmt_symbol.h	(revision 102)
@@ -97,4 +97,6 @@
   static void expand (cmt_string& text);
 
+  static void filter_path_value (const cmt_string& name, cmt_string& text);
+
   static bool check_tag_used (Tag* tag);
 
