]> OCCT Git - occt-wok.git/commitdiff
No comments
authorcas <cas@opencascade.com>
Fri, 9 Jun 2000 14:09:51 +0000 (14:09 +0000)
committercas <cas@opencascade.com>
Fri, 9 Jun 2000 14:09:51 +0000 (14:09 +0000)
12 files changed:
src/WOKStep/WOKStep_Compile.cxx
src/WOKStep/WOKStep_ComputeLinkList.cxx
src/WOKStep/WOKStep_ExtractExecList.cxx
src/WOKStep/WOKStep_JavaCompile.tcl
src/WOKStep/WOKStep_JavaHeader.tcl
src/WOKStep/WOKStep_JiniExtract.cxx
src/WOKStep/WOKStep_LibLimit.cxx
src/WOKStep/WOKStep_LinkList.cxx
src/WOKStep/WOKStep_ProcessStep.cxx
src/WOKStep/WOKStep_WNTK.cxx
src/WOKStep/WOKStep_WNTLibrary.cxx
src/WOKStep/WOKStep_WNTLink.cxx

index b0a898469ea06121fdb5606d74d8d40e760c4cb4..6ad38ecd1459f1692ab07ae1054d5c3f649f4264 100755 (executable)
@@ -333,7 +333,9 @@ _TEST_BREAK();
 
   stadm -> GetPath ();
 
-  OSD_Path p (  stadm -> Path () -> Name () -> ToCString ()  );
+//  OSD_Path p (  stadm -> Path () -> Name () -> ToCString ()  );
+  TCollection_AsciiString atstr = stadm -> Path () -> Name () -> ToCString () ;
+  OSD_Path p ( atstr );
   OSD_File f ( p );
 
   f.Build (
index e2f2de17b8ecb8037f179a7247238c50099a8eb6..f28361d3672c1f37967072a69ff2045240174b33 100755 (executable)
@@ -250,8 +250,9 @@ void WOKStep_ComputeLinkList::Execute(const Handle(WOKMake_HSequenceOfInputFile)
                    AddExecDepItem(infile, outfile, Standard_True);
                  else
                    {
-                     SetFailed();
-                     return;
+//                      cout << "WOKStep_ComputeLinkList::Execute GetUnitLibrary returns outfile.IsNull() ==> SetFailed()/return was suppressed(JR)" << endl ;
+//                   SetFailed();
+//                   return;
                    }
                }
            }
index 968bb15c1703e784a2da32389bb19c55e0b7cf14..0019a124d8344f5ba3724ea66e9108d04717388e 100755 (executable)
@@ -126,6 +126,7 @@ _TEST_BREAK();
              outfile->SetPhysicFlag(Standard_False);
              outfile->SetStepID(Standard_True);
 
+//              cout << "WOKStep_ExtractExecList::Execute -> GetAndAddStep" << endl ;
              Handle(WOKMake_Step) astep = BuildProcess()->GetAndAddStep(Unit(), Code(), bent->Name());
              
              astep->DoExecute();
index c32bb6d8a2834c534c2d52995a9e5a7701ead722..a79ff52f5e9d15cb52c68a6bd4fe6580172a6872 100755 (executable)
-
 proc WOKStep_JavaCompile:AdmFileType {} {
     
-    return dbadmfile;
+ return dbadmfile;
+
 }
 
 proc WOKStep_JavaCompile:OutputDirTypeName {} {
-    return dbtmpdir;
+
+ return dbtmpdir;
+
 }
 
 proc WOKStep_JavaCompile:HandleInputFile { ID } {
     
   scan $ID "%\[^:\]:%\[^:\]:%\[^:\]"  unit type name
+ scan $ID "%\[^:\]:%\[^:\]:%\[^:\]"  unit type name
     
-    if {[file extension $name] == ".java"} {
-       return 1;
-    } 
-    return 0;
+ if { [file extension $name] == ".java" } {
+
+  return 1;
+
+ } 
+
+ return 0;
+
 }
 
 proc WOKStep_JavaCompile:ComputeIncludeDir { unit } {
+
+ global env
+ global tcl_platform
+
+ if { $tcl_platform(platform) == "windows" } {
+  set ps "\\;"
+ } else {
+  set ps ":"
+ }
+
+ set fJava [info exists env(WOK_USE_JAVA_DIRECTORY)]
     
   set allwb [w_info -A $unit]
   set unitname [wokinfo -n $unit]
   set result ""
+ set allwb [w_info -A $unit]
+ set unitname [wokinfo -n $unit]
+ set result ""
     
   set themax [llength $allwb]
+ set themax [llength $allwb]
     
-    for {set i $themax} {[expr $i != 0]} {incr i -1} {
-       set awb [lindex $allwb [expr $i - 1]]
-       if {![wokinfo -x ${awb}:$unitname]} {
-           set pseudounit [lindex [w_info -l $awb] 0]
-           set addinc [wokinfo -p derivated:.. ${awb}:$pseudounit]
-           set result ${addinc}:$result
-       } else {
-           set addinc [wokinfo -p derivated:.. ${awb}:$unitname]
-           set result ${addinc}:$result
-           set addinc [wokinfo -p source:. ${awb}:$unitname]
-           set result ${addinc}:$result
-       }
-    }
-    return $result
+ for { set i $themax } { [expr $i != 0] } { incr i -1 } {
+
+  set awb [lindex $allwb [expr $i - 1]]
+
+  if { $fJava } {
+   set addinc [UNC [wokparam -e WOKEntity_javadir ${awb}]]
+  } else {
+   set addinc [UNC [wokparam -e WOKEntity_drvdir ${awb}]]
+  }
+
+  set result ${addinc}$ps$result
+
+ }
+
+ set result $env(WOKHOME)$ps$result
+
+ return $result
+
 }
 
 proc WOKStep_JavaCompile:Execute { theunit args } {
+
+ global env
+ global tcl_platform
     
   msgprint -i -c "WOKStep_JavaCompile::Execute" "Processing unit : $theunit"
   msgprint -i -c "WOKStep_JavaCompile::Execute"
msgprint -i -c "WOKStep_JavaCompile:Execute" "Processing unit : $theunit"
msgprint -i -c "WOKStep_JavaCompile:Execute"
     
-    set unitname [wokinfo -n $theunit]
-    set failed 0
-    set incdir [WOKStep_JavaCompile:ComputeIncludeDir $theunit]
-    wokparam -s%IncludeDir=$incdir
-    set outdir [wokinfo -p derivated:.. $theunit]
-    wokparam -s%OutDir=$outdir
-
-    foreach ID $args {
-       scan $ID "%\[^:\]:%\[^:\]:%\[^:\]"  unit type name
-       set infile [woklocate -p $ID]
-       wokparam -s%Source=$infile
-       set thecommand [wokparam -e JAVA_Compiler]
-       
-       set outfileid [file rootname $name]
-       set outfileid ${outfileid}.class
+ set fJava [info exists env(WOK_USE_JAVA_DIRECTORY)]
+
+ set unitname [wokinfo -n $theunit]
+ set failed 0
+ set incdir [WOKStep_JavaCompile:ComputeIncludeDir $theunit]
+ wokparam -s%IncludeDir=$incdir
+
+ if { $fJava } {
+  set outdir [UNC [wokparam -e WOKEntity_javadir [wokinfo -w]]]
+ } else {
+  set outdir [UNC [wokparam -e WOKEntity_drvdir [wokinfo -w]]]
+ }
+
+ wokparam -s%OutDir=$outdir
+
+ foreach ID $args {
+
+  scan $ID "%\[^:\]:%\[^:\]:%\[^:\]"  unit type name
+  set infile [UNC [woklocate -p $ID]]
+
+  if { $tcl_platform(platform) == "windows" } {
+   regsub -all "/" $infile "\\\\\\" infile
+  }
+
+  wokparam -s%Source=$infile
+  set thecommand [wokparam -e JAVA_Compiler]
+  set outfileid [file rootname $name]
+  set outfileid ${outfileid}.class
        
-       msgprint -i -c "WOKStep_JavaCompile::Execute" "Compiling $name"
-       if {[catch {eval exec [lindex $thecommand 0]} res]} {
-           msgprint -e -c "WOKStep_JavaCompile::Execute" $res
-           set failed 1
-       } else {
-           stepoutputadd $unitname:derivated:$outfileid
-           stepaddexecdepitem $ID $unitname:derivated:$outfileid
-       }
-    }
+  msgprint -i -c "WOKStep_JavaCompile:Execute" "Compiling $name"
+
+  if { [catch {eval exec [lindex $thecommand 0]} res] } {
+
+   msgprint -e -c "WOKStep_JavaCompile:Execute" $res
+   set failed 1
+
+  } else {
+
+   if { $fJava } {
+    stepoutputadd $unitname:javafile:$outfileid
+    stepaddexecdepitem $ID $unitname:javafile:$outfileid
+   } else {
+    stepoutputadd $unitname:derivated:$outfileid
+    stepaddexecdepitem $ID $unitname:derivated:$outfileid
+   }
+
+  }
+
+ }
     
-    return $failed
+ return $failed
+
 }
index 0e76fc2718047dc27b0e7a5a1746179816d56147..2cac194e5804908c376b9797a4fbddf4da13b4a7 100755 (executable)
-
 proc WOKStep_JavaHeader:AdmFileType {} {
     
-    return dbadmfile;
+ return dbadmfile;
+
 }
 
 proc WOKStep_JavaHeader:OutputDirTypeName {} {
-    return dbtmpdir;
+
+ return dbtmpdir;
+
 }
 
 proc WOKStep_JavaHeader:HandleInputFile { ID } {
 
   scan $ID "%\[^:\]:%\[^:\]:%\[^:\]"  unit type name
+ scan $ID "%\[^:\]:%\[^:\]:%\[^:\]"  unit type name
     
-    if {[file extension $name] == ".java"} {
-           return 1;
-    } 
-    return 0;
+ if { [file extension $name] == ".java" } {
+
+  return 1;
+
+ } 
+
+ return 0;
+
 }
 
 proc WOKStep_JavaHeader:ComputeIncludeDir { unit } {
     
-    set allwb [w_info -A $unit]
-    set unitname [wokinfo -n $unit]
-    set result ""
-    
-    set themax [llength $allwb]
+ global env
+ global tcl_platform
+
+ set fJava [info exists env(WOK_USE_JAVA_DIRECTORY)]
+
+ if { $tcl_platform(platform) == "windows" } {
+  set ps "\\;"
+ } else {
+  set ps ":"
+ }
+
+ set allwb    [w_info -A $unit]
+ set unitname [wokinfo -n $unit]
+ set result   ""
+ set themax   [llength $allwb]
     
-    for {set i $themax} {[expr $i != 0]} {incr i -1} {
-       set awb [lindex $allwb [expr $i - 1]]
-       if {![wokinfo -x ${awb}:$unitname]} {
-           set pseudounit [lindex [w_info -l $awb] 0]
-           set addinc [wokinfo -p derivated:.. ${awb}:$pseudounit]
-           set result ${addinc}:$result
-       } else {
-           set addinc [wokinfo -p derivated:.. ${awb}:$unitname]
-           set result ${addinc}:$result
-       }
-    }
-    return $result
+ for {set i $themax} {[expr $i != 0]} {incr i -1} {
+
+  set awb [lindex $allwb [expr $i - 1]]
+
+  if { $fJava != 0 } {
+   set addinc [UNC [wokparam -e WOKEntity_javadir ${awb}]]
+  } else {
+   set addinc [UNC [wokparam -e WOKEntity_drvdir ${awb}]]
+  }
+
+  set result ${addinc}$ps$result
+
+ }
+
+ return $env(WOKHOME)$ps$result
+
 }
 
 proc WOKStep_JavaHeader:Execute { theunit args } {
 
-    msgprint -i -c "WOKStep_JavaHeader::Execute" "Processing unit : $theunit"
-    msgprint -i -c "WOKStep_JavaHeader::Execute"
+ global tcl_platform
+
+ msgprint -i -c "WOKStep_JavaHeader:Execute" "Processing unit : $theunit"
+ msgprint -i -c "WOKStep_JavaHeader:Execute"
 
   set unitname [wokinfo -n $theunit]
   set failed 0
   set incdir [WOKStep_JavaHeader:ComputeIncludeDir $theunit]
   wokparam -s%IncludeDir=$incdir
+ set unitname [wokinfo -n $theunit]
+ set failed 0
+ set incdir [WOKStep_JavaHeader:ComputeIncludeDir $theunit]
+ wokparam -s%IncludeDir=$incdir
 
-    foreach ID $args {
-       scan $ID "%\[^:\]:%\[^:\]:%\[^:\]"  unit type name
-       set infile [woklocate -p $ID]
+ foreach ID $args {
+
+  scan $ID "%\[^:\]:%\[^:\]:%\[^:\]"  unit type name
+  set infile [UNC [woklocate -p $ID]]
        
-       set outfileid [file rootname $name]
-       wokparam -s%Class=${unitname}.$outfileid
-       set outfileid ${unitname}_${outfileid}.h
-       set outfile [wokinfo -p pubinclude:$outfileid $theunit]
-       wokparam -s%OutFile=$outfile
+  if { $tcl_platform(platform) == "windows" } {
+   regsub -all "/" $infile "\\\\\\" infile
+  }
+
+  set outfileid [file rootname $name]
+  wokparam -s%Class=${unitname}.$outfileid
+
+  set nameid ${unitname}
+  regsub -all "\\." $nameid "_" nameid
+  set outfileid ${nameid}_${outfileid}.h
+
+  set outfile [UNC [wokinfo -p pubinclude:$outfileid $theunit]]
+  wokparam -s%OutFile=$outfile
 
-       set thecommand [wokparam -e JAVA_Header]
+  set thecommand [wokparam -e JAVA_Header]
        
-       msgprint -i -c "WOKStep_JavaCompile::Execute" "Building header $outfileid"
-       if {[catch {eval exec [lindex $thecommand 0]} res]} {
-           msgprint -e -c "WOKStep_JavaCompile::Execute" $res
-           set failed 1
-       } else {
-           stepoutputadd $unitname:pubinclude:$outfileid
-           stepaddexecdepitem $ID $unitname:pubinclude:$outfileid
-       }
-    }
+  msgprint -i -c "WOKStep_JavaCompile:Execute" "Building header $outfileid"
+
+  if { [catch {eval exec [lindex $thecommand 0]} res] } {
+
+   msgprint -e -c "WOKStep_JavaCompile:Execute" $res
+   set failed 1
+
+  } else {
+
+   stepoutputadd $unitname:pubinclude:$outfileid
+   stepaddexecdepitem $ID $unitname:pubinclude:$outfileid
+
+  }
+
+ }
     
-    return $failed
+ return $failed
+
 }
index 2c43e01e47c0414a10c15f7fc35df5cb717e4b74..6d64af898ac06ff70193c1f0c9353d4a3516216d 100755 (executable)
@@ -3,8 +3,7 @@
 // Created:    Mon Mar 22 17:10:16 1999
 // Author:     Arnaud BOUZY
 //             <adn>
-
-#include <Standard_NotImplemented.hxx>
+// Modification: Eugeny PLOTNIKOV <e-plotnikov@minsk.matra-dtv.fr> (ClassFile.cfg generation)
 
 #include <Standard_ProgramError.hxx>
 
@@ -15,6 +14,9 @@
 #include <WOKUtils_Path.hxx>
 
 #include <MS.hxx>
+#include <MS_Client.hxx>
+#include <MS_Interface.hxx>
+#include <MS_Package.hxx>
 
 #include <WOKBuilder_MSJiniExtractor.hxx>
 #include <WOKBuilder_MSActionID.hxx>
 
 #include <WOKStep_JiniExtract.ixx>
 
+#include <OSD_File.hxx>
+#include <OSD_Protection.hxx>
+#include <OSD_Environment.hxx>
 
 //=======================================================================
 //function : WOKStep_JiniExtract
 //purpose  : 
 //=======================================================================
-WOKStep_JiniExtract::WOKStep_JiniExtract(const Handle(WOKMake_BuildProcess)& abp,
-                                            const Handle(WOKernel_DevUnit)& aunit, 
-                                            const Handle(TCollection_HAsciiString)& acode, 
-                                            const Standard_Boolean checked, 
-                                            const Standard_Boolean hidden)
-: WOKStep_Extract(abp, aunit, acode, checked, hidden)
-{
-  Handle(WOKBuilder_MSJiniExtractor) anextractor = new WOKBuilder_MSJiniExtractor(Unit()->Params());
-  anextractor->SetMSchema(WOKBuilder_MSTool::GetMSchema());
-  SetExtractor(anextractor);
-}
+WOKStep_JiniExtract :: WOKStep_JiniExtract (
+                        const Handle( WOKMake_BuildProcess)&        abp,
+                                           const Handle( WOKernel_DevUnit)&          aunit, 
+                                           const Handle( TCollection_HAsciiString )& acode, 
+                                           const Standard_Boolean                  checked, 
+                                           const Standard_Boolean                   hidden
+                       ) : WOKStep_Extract ( abp, aunit, acode, checked, hidden ) {
+
+ Handle( WOKBuilder_MSJiniExtractor ) anextractor =
+  new WOKBuilder_MSJiniExtractor (  Unit () -> Params ()  );
+
+ anextractor -> SetMSchema (  WOKBuilder_MSTool :: GetMSchema ()  );
 
+ SetExtractor ( anextractor );
 
+}  // end WOKStep_JiniExtract :: WOKStep_JiniExtract
 //=======================================================================
 //function : HandleInputFile
 //purpose  : 
 //=======================================================================
-Standard_Boolean WOKStep_JiniExtract::HandleInputFile(const Handle(WOKMake_InputFile)& infile)
-{
-   if(!infile->IsPhysic())
-    {
-      if(!strcmp("CPPJini_COMPLETE", infile->ID()->Token(":",2)->ToCString()))
-       {
-         infile->SetDirectFlag(Standard_True);
-         infile->SetBuilderEntity(new WOKBuilder_MSEntity(infile->ID()->Token(":",3)));
-         return Standard_True;
-       }
-      if(!strcmp("CPPJini_INCOMPLETE", infile->ID()->Token(":",2)->ToCString()))
-       {
-         infile->SetDirectFlag(Standard_True);
-         infile->SetBuilderEntity(new WOKBuilder_MSEntity(infile->ID()->Token(":",3)));
-         return Standard_True;
-       }
-      if(!strcmp("CPPJini_SEMICOMPLETE", infile->ID()->Token(":",2)->ToCString()))
-       {
-         infile->SetDirectFlag(Standard_True);
-         infile->SetBuilderEntity(new WOKBuilder_MSEntity(infile->ID()->Token(":",3)));
-         return Standard_True;
-       }
+Standard_Boolean WOKStep_JiniExtract :: HandleInputFile (
+                                         const Handle( WOKMake_InputFile )& infile
+                                        ) {
+//JR                                        ) const {
+
+ if (  !infile -> IsPhysic ()  ) {
+
+  if (   !strcmp (
+           "CPPJini_COMPLETE", infile -> ID () -> Token ( ":", 2 ) -> ToCString ()
+          )
+  ) {
+
+   infile -> SetDirectFlag ( Standard_True );
+   infile -> SetBuilderEntity (
+              new WOKBuilder_MSEntity (  infile -> ID () -> Token ( ":", 3 )  )
+             );
+   return Standard_True;
+
+  }  // end if
+
+  if (   !strcmp (
+           "CPPJini_INCOMPLETE", infile -> ID () -> Token ( ":", 2 ) -> ToCString ()
+          )
+  ) {
+
+   infile -> SetDirectFlag ( Standard_True );
+   infile -> SetBuilderEntity (
+              new WOKBuilder_MSEntity (  infile -> ID () -> Token ( ":", 3 )  )
+             );
+   return Standard_True;
+
+  }  // end if
+
+  if (   !strcmp (
+           "CPPJini_SEMICOMPLETE", infile -> ID () -> Token ( ":", 2 ) -> ToCString ()
+          )
+  ) {
+
+   infile -> SetDirectFlag ( Standard_True );
+   infile -> SetBuilderEntity (
+              new WOKBuilder_MSEntity (  infile -> ID () -> Token ( ":", 3 )  )
+             );
+   return Standard_True;
+
+  }  // end if
       
-    }
-  return Standard_False;
-}
+ }  // end if
 
+ return Standard_False;
+}  // end WOKStep_JiniExtract :: HandleInputFile
 //=======================================================================
 //Author   : Jean Gautier (jga)
 //function : Init
@@ -206,8 +237,16 @@ Handle(WOKMake_HSequenceOfInputFile) WOKStep_JiniExtract::OutOfDateEntities()
          return result;
        }
       
+      Handle( TCollection_HAsciiString ) aName =
+       new TCollection_HAsciiString (  anent -> Name ()  );
+
+      aName -> AssignCat ( "@" );
+      aName -> AssignCat (  Unit () -> Name ()  );
+#if 0
       WOKBuilder_MSActionID anid(anent->Name(), Extractor()->ExtractorID());
-      
+#else
+      WOKBuilder_MSActionID anid (  aName, Extractor () -> ExtractorID ()  );
+#endif
       Handle(WOKBuilder_MSAction) anaction = ameta->GetAction(anid);
       
       switch(Extractor()->ExtractionStatus(anaction))
@@ -226,172 +265,392 @@ Handle(WOKMake_HSequenceOfInputFile) WOKStep_JiniExtract::OutOfDateEntities()
   return result;
 }
 
-
-
 //=======================================================================
 //function : Execute
 //purpose  : 
 //=======================================================================
-void WOKStep_JiniExtract::Execute(const Handle(WOKMake_HSequenceOfInputFile)& tobuild)
-{
-  Standard_Integer i,j;
+void WOKStep_JiniExtract :: Execute (  const Handle( WOKMake_HSequenceOfInputFile )& tobuild  ) {
 
-  // Used Types
-  Handle(WOKernel_FileType) sourcetype       = Unit()->GetFileType("source");
-  Handle(WOKernel_FileType) privincludetype  = Unit()->GetFileType("privinclude");
-  Handle(WOKernel_FileType) pubincludetype   = Unit()->GetFileType("pubinclude");
-  Handle(WOKernel_FileType) derivatedtype    = Unit()->GetFileType("derivated");
-  Handle(WOKernel_FileType) englispfiletype  = Unit()->GetFileType("englisp");
+ Standard_Boolean secondPass = Standard_False;
+ Standard_Integer i, j, k, l;
 
-  Handle(WOKBuilder_Command) acmd   = new WOKBuilder_Command(new TCollection_HAsciiString("COMMAND"), Unit()->Params());
-  Handle(WOKUtils_Shell)     ashell = Shell();
+ Handle( WOKernel_FileType ) sourcetype      = Unit () -> GetFileType ( "source"      );
+ Handle( WOKernel_FileType ) privincludetype = Unit () -> GetFileType ( "privinclude" );
+ Handle( WOKernel_FileType ) pubincludetype  = Unit () -> GetFileType ( "pubinclude"  );
+ Handle( WOKernel_FileType ) derivatedtype   = Unit () -> GetFileType ( "derivated"   );
+ Handle( WOKernel_FileType ) englispfiletype = Unit () -> GetFileType ( "englisp"     );
+ Handle( WOKernel_FileType ) javatype;
 
-  ashell->Lock();
-  acmd->SetShell(ashell);
+ OSD_Environment env ( "WOK_USE_JAVA_DIRECTORY" );
 
-  Handle(WOKernel_File) outfile, basefile;
-  Extractor()->Load();
-  Extractor()->SetOutputDir(OutputDir());
+ javatype = env.Value ().IsEmpty () ? Unit () -> GetFileType ( "derivated" )
+                                    : Unit () -> GetFileType ( "javafile"  );
 
-  WOKBuilder_MSExtractorIterator anit(WOKBuilder_MSTool::GetMSchema(), Extractor());
-  
-  for(j=1; j<=tobuild->Length(); j++)
-    {
-      
-      Handle(WOKBuilder_MSEntity)     entity = Handle(WOKBuilder_MSEntity)::DownCast(tobuild->Value(j)->BuilderEntity());
-      Handle(TCollection_HAsciiString) amode = tobuild->Value(j)->ID()->Token(":", 2);
+ Handle( TCollection_HAsciiString ) str;
+
+ Handle( WOKMake_HSequenceOfInputFile ) buildSeq = tobuild;
+ Handle( WOKMake_HSequenceOfInputFile ) aPackSeq = new WOKMake_HSequenceOfInputFile ();
+
+ Handle( WOKBuilder_Command ) acmd =
+  new WOKBuilder_Command (  new TCollection_HAsciiString ( "COMMAND" ), Unit () -> Params ()  );
+ Handle( WOKUtils_Shell     ) ashell = Shell ();
+
+ ashell -> Lock ();
+ acmd -> SetShell ( ashell );
+
+ Handle( WOKernel_File ) outfile, basefile;
+ Extractor () -> Load ();
+ Extractor () -> SetOutputDir (  OutputDir ()  );
+
+ WOKBuilder_MSExtractorIterator anit (  WOKBuilder_MSTool :: GetMSchema (), Extractor ()  );
+nextPass:  
+ for ( j = 1; j <= buildSeq -> Length (); ++j ) {
+   
+  Handle( WOKBuilder_MSEntity      ) entity =
+   Handle( WOKBuilder_MSEntity ) :: DownCast (  buildSeq -> Value ( j ) -> BuilderEntity ()  );
+  Handle( TCollection_HAsciiString ) amode = buildSeq -> Value ( j ) -> ID () -> Token ( ":", 2 );
+
+  if (  !secondPass &&
+         Extractor () -> MSchema () -> MetaSchema () -> IsPackage (  entity -> Name ()  )
+  ) {
+
+   aPackSeq -> Append (  buildSeq -> Value ( j )  );
+   continue;
+
+  }  // end if
       
-      switch(anit.Execute(entity, amode->ToCString()))
-       {
-       case WOKBuilder_Success:
-         {
+  switch (   anit.Execute (  entity, amode -> ToCString ()  )   ) {
+
+   case WOKBuilder_Success: {
 #ifdef WOK_VERBOSE
-           if(VerboseMsg("WOK_EXTRACT").IsSet())
-             {
-               VerboseMsg("WOK_EXTRACT") << "WOKStep_Extract::Execute" << entity->Name() << " produces : " << endm;
-               for(i=1; i<=anit.Produces()->Length(); i++)
-                 {
-                   VerboseMsg("WOK_EXTRACT") << "WOKStep_Extract::Execute" 
-                                             << "\t\t" << anit.Produces()->Value(i)->Path()->Name() << endm;
-                 }
-             }
-#endif
-         
-           WOKBuilder_MSActionID anid(entity->Name(), WOKBuilder_ClientExtract);
-           Handle(WOKBuilder_MSAction) anaction = Extractor()->MSchema()->GetAction(anid);
-           Handle(WOKBuilder_Entity)   outent;
-
-           Extractor()->MSchema()->ChangeAddAction(anid, Handle(WOKBuilder_Specification)());
-
-           for(i=1; i<=anit.Produces()->Length(); i++)
-             {
-               Standard_Boolean istemplate = Standard_False;
-
-               outent = anit.Produces()->Value(i);
-               switch(outent->Path()->Extension())
-                 {
-                 case WOKUtils_HXXFile:
-                   // a .hxx file is a public include
-                   outfile = new WOKernel_File(outent->Path()->FileName(), Unit(), pubincludetype);
-                   break;
-                 case WOKUtils_IXXFile:
-                 case WOKUtils_JXXFile:
-                 case WOKUtils_DDLFile:
-                   // Private includes
-                   outfile = new WOKernel_File(outent->Path()->FileName(), Unit(), privincludetype);
-                   break;
-                 case WOKUtils_CXXFile:
-                   // Devivated Cxx file
-                   outfile = new WOKernel_File(outent->Path()->FileName(), Unit(), derivatedtype);
-                   break;
-                 case WOKUtils_DATFile:
-                   // Derivated datafile
-                   outfile = new WOKernel_File(outent->Path()->FileName(), Unit(), derivatedtype);
-                   break;
-                 case WOKUtils_LispFile:
-                   // Engine Lisp File
-                   outfile = new WOKernel_File(outent->Path()->FileName(), Unit(), englispfiletype);
-                   break;
-                 case WOKUtils_TemplateFile:
-                   outfile = new WOKernel_File(outent->Path()->FileName(), Unit(), sourcetype);
-                   istemplate = Standard_True;
-                   break;
-#ifdef WNT
-                 case WOKNT_UnknownFile:
+    if (  VerboseMsg ( "WOK_EXTRACT" ).IsSet ()  ) {
+
+     VerboseMsg ( "WOK_EXTRACT" ) << "WOKStep_Extract::Execute"
+                                  << entity -> Name ()
+                                  << " produces : "
+                                  << endm;
+
+     for (  i = 1; i <= anit.Produces () -> Length (); ++i  )
+
+      VerboseMsg ( "WOK_EXTRACT" ) << "WOKStep_Extract::Execute" 
+                                                      << "\t\t"
+                                   << anit.Produces () -> Value ( i ) -> Path () -> Name ()
+                                   << endm;
+    }  // end if
+#endif  // WOK_VERBOSE
+    str = new TCollection_HAsciiString (  entity -> Name ()  );
+
+    str -> AssignCat ( "@" );
+    str -> AssignCat (  Unit () -> Name ()  );
+#if 0
+    WOKBuilder_MSActionID         anid (  entity -> Name (), WOKBuilder_ClientExtract  );
 #else
-                 case WOKUnix_UnknownFile:
+    WOKBuilder_MSActionID         anid (  str, WOKBuilder_ClientExtract  );
 #endif
-                   if (!strcmp(outent->Path()->ExtensionName()->ToCString(),".java")) {
-                     outfile = new WOKernel_File(outent->Path()->FileName(), Unit(), privincludetype);
-                   }
-                   break;
-                   default: break;
+    Handle( WOKBuilder_MSAction ) anaction = Extractor () -> MSchema () -> GetAction ( anid );
+    Handle( WOKBuilder_Entity   ) outent;
+
+    Extractor () -> MSchema () -> ChangeAddAction (
+                                   anid, Handle( WOKBuilder_Specification ) ()
+                                  );
+
+    for ( i = 1; i <= anit.Produces () -> Length (); ++i ) {
+
+     Standard_Boolean istemplate = Standard_False;
+
+     outent = anit.Produces () -> Value ( i );
+
+     switch (  outent -> Path () -> Extension ()  ) {
+
+      case WOKUtils_HXXFile:
+
+       outfile = new WOKernel_File (  outent -> Path () -> FileName (), Unit (), pubincludetype  );
+
+      break;
+
+      case WOKUtils_IXXFile:
+      case WOKUtils_JXXFile:
+      case WOKUtils_DDLFile:
+
+       outfile = new WOKernel_File (  outent -> Path () -> FileName (), Unit (), privincludetype  );
+
+      break;
+
+      case WOKUtils_CXXFile: {
+
+       TCollection_AsciiString name;
+       OSD_Path                p (  outent -> Path () -> FileName () -> String ()  );
+
+       name = p.Name ();
+       name.ChangeAll ( '.', '_' );
+       p.SetName ( name );
+       p.SystemName ( name );
+
+       outfile = new WOKernel_File (
+                      new TCollection_HAsciiString ( name ), Unit (), derivatedtype
+                     );
+
+      } break;
+
+      case WOKUtils_DATFile:
+
+       outfile = new WOKernel_File (  outent -> Path () -> FileName (), Unit (), derivatedtype  );
 
-                 }
+      break;
+
+      case WOKUtils_LispFile:
+
+       outfile = new WOKernel_File(outent->Path()->FileName(), Unit(), englispfiletype);
+
+      break;
+
+      case WOKUtils_TemplateFile:
+
+       outfile = new WOKernel_File (  outent -> Path () -> FileName (), Unit (), sourcetype  );
+       istemplate = Standard_True;
+
+      break;
+
+      case WOKUtils_UnknownFile:
+
+       if (   !strcmp (  outent -> Path () -> ExtensionName () -> ToCString (), ".java"  )   )
+
+        outfile = new WOKernel_File (
+                       outent -> Path () -> FileName (), Unit (), javatype
+                      );
+
+      break;
+
+      default: break;
+
+     }  // end switch
              
-               outfile->GetPath();
-               basefile = Locator()->Locate(Unit()->Name(), outfile->TypeName(), outfile->Name());
+     outfile -> GetPath ();
+     basefile = Locator () -> Locate (
+                               Unit () -> Name (), outfile -> TypeName (), outfile -> Name ()
+                              );
              
-               WOKBuilder_BuildStatus astatus = WOKBuilder_Unbuilt;
+     WOKBuilder_BuildStatus astatus = WOKBuilder_Unbuilt;
                      
-               if(basefile.IsNull())
-                 {
-                   // pas encore de Fichier : Simply Move
-                   astatus = acmd->Move(outent->Path(), outfile->Path());
-                 }
-               else
-                 {
-                   if(!outent->Path()->IsSameFile(basefile->Path()))
-                     {
-                       astatus = acmd->Move(outent->Path(), outfile->Path());
-                     }
-                   //astatus = acmd->ReplaceIfChangedWith(outent->Path(), basefile->Path(), outfile->Path());
-                 }
+     if (  basefile.IsNull ()  )
+
+      astatus = acmd -> Move (  outent -> Path (), outfile -> Path ()  );
+
+     else if (   !outent -> Path () -> IsSameFile (  basefile -> Path ()  )   )
+
+      astatus = acmd -> Move (  outent -> Path (), outfile -> Path ()  );
+
+     else astatus = outent -> Path () -> RemoveFile () ? WOKBuilder_Unbuilt : WOKBuilder_Failed;
              
-               Handle(WOKMake_OutputFile) out;
-
-               switch(astatus)
-                 {
-                 case WOKBuilder_Success:
-                   outent->SetPath(outfile->Path());
-                   out  = new WOKMake_OutputFile(outfile->LocatorName(), outfile, outent, outfile->Path());
-                   out->SetLocateFlag(Standard_True);
-                   out->SetProduction();
-                   if(!istemplate) AddExecDepItem(tobuild->Value(j), out, Standard_True);
-
-                   InfoMsg  << "WOKStep_Extract::Execute" << "File : " << outfile->Path()->Name() << " is modified" << endm;
-                   break;
-                 case WOKBuilder_Unbuilt:
+     Handle( WOKMake_OutputFile ) out;
+
+     switch ( astatus ) {
+
+      case WOKBuilder_Success:
+
+       outent -> SetPath (  outfile -> Path ()  );
+       out  = new WOKMake_OutputFile (
+                   outfile -> LocatorName (), outfile, outent, outfile -> Path ()
+                  );
+       out -> SetLocateFlag ( Standard_True );
+       out -> SetProduction ();
+
+       if ( !istemplate ) AddExecDepItem (  buildSeq -> Value ( j ), out, Standard_True );
+
+       InfoMsg  << "WOKStep_Extract::Execute"
+                << "File : "
+                << outfile -> Path () -> Name ()
+                << " is modified"
+                << endm;
+
+      break;
+
+      case WOKBuilder_Unbuilt:
 #ifdef WOK_VERBOSE
-                   VerboseMsg("WOK_EXTRACT")  << "WOKStep_Extract::Execute" 
-                                              << "File : " << outfile->Path()->Name() << " is unchanged" << endm;
-#endif
-                   
-                   outent->SetPath(basefile->Path());
-                   out  = new WOKMake_OutputFile(basefile->LocatorName(), basefile, outent, basefile->Path());
-                   out->SetLocateFlag(Standard_True);
-                   out->SetProduction();
-                   if(!istemplate) AddExecDepItem(tobuild->Value(j), out, Standard_True);
-                   break;
-                 case WOKBuilder_Failed:
-                   SetFailed();
-                   ErrorMsg << "WOKStep_Extract::Execute" << "Failed    : " << outfile->Name() << endm;
-                   break;
-                  default: break;
-                 }
-             }
-         }
-         break;
-       case WOKBuilder_Failed:
-         ErrorMsg << "WOKStep_Extract::Execute" << "Failed    : " << entity->Name() << endm;          
-         break;
-        default: break;
-       }
-    }
+       VerboseMsg ( "WOK_EXTRACT" ) << "WOKStep_Extract::Execute" 
+                                                       << "File : "
+                                    << outfile -> Path () -> Name ()
+                                    << " is unchanged"
+                                    << endm;
+#endif  // WOK_VERBOSE
+       outent -> SetPath (  basefile -> Path ()  );
+       out  = new WOKMake_OutputFile (
+                   basefile -> LocatorName (), basefile, outent, basefile -> Path ()
+                  );
+       out -> SetLocateFlag ( Standard_True );
+       out -> SetProduction ();
 
-  ashell->UnLock();
+       if ( !istemplate ) AddExecDepItem (  buildSeq -> Value ( j ), out, Standard_True  );
 
-  if(Status() == WOKMake_Unprocessed) SetSucceeded();
-  return;
-}
+      break;
+
+      case WOKBuilder_Failed:
+
+       SetFailed ();
+
+       ErrorMsg << "WOKStep_Extract::Execute"
+                << "Failed    : "
+                << outfile -> Name ()
+                << endm;
+
+      break;
+
+      default: break;
+
+     }  // end switch
+
+    }  // end for
+
+   } break;
+
+   case WOKBuilder_Failed:
+
+    ErrorMsg << "WOKStep_Extract::Execute"
+             << "Failed    : "
+             << entity -> Name ()
+             << endm;          
+
+   break;
+
+   default: break;
+
+  }  // end switch
+
+ }  // end for
+
+ if (  !secondPass && aPackSeq -> Length () > 0  ) {
+
+  secondPass = Standard_True;
+  buildSeq   = aPackSeq;
+  goto nextPass;
+
+ }  // end if
+
+ InfoMsg << "WOKStep_Extract::Execute" << "Generating ClassFile.cfg" << endm;
+#ifdef WNT
+ Handle( TCollection_HAsciiString ) NL = new TCollection_HAsciiString ( "\r\n" );
+#else
+ Handle( TCollection_HAsciiString ) NL = new TCollection_HAsciiString ( "\n"   );
+#endif  // WNT
+ Handle( TCollection_HAsciiString ) cfg = new TCollection_HAsciiString ( "[base]" );
+ Handle( MS_Client                ) clt = Extractor() -> MSchema () -> MetaSchema () ->
+                                           GetClient (  Unit () -> Name ()  );
+ Handle( TColStd_HSequenceOfHAsciiString ) cltSeq = new TColStd_HSequenceOfHAsciiString ();
+ WOKTools_MapOfHAsciiString                map;
+
+ cltSeq -> Append (  Unit () -> Name ()  );
+ cfg    -> AssignCat ( NL );
+ str = new TCollection_HAsciiString(  Unit () -> Name ()  );
+ str -> ChangeAll ( '.', '/' );
+ cfg    -> AssignCat ( str );
+ cfg    -> AssignCat ( NL  );
+
+ for ( i = 1; i <= clt -> Uses () -> Length (); ++i ) {
+
+  str = new TCollection_HAsciiString ( clt -> Uses () -> Value ( i )  );
+  str -> ChangeAll ( '.', '/' );
+  cltSeq -> Append (  clt -> Uses () -> Value ( i )  );
+  cfg -> AssignCat ( str );
+  cfg -> AssignCat ( NL  );
+
+ }  // end for
+
+ cfg -> AssignCat ( "[dependent]" );
+ cfg -> AssignCat ( NL );
+
+ for ( i = 1; i <= cltSeq -> Length (); ++i ) {
+
+  clt = Extractor () -> MSchema () -> MetaSchema () -> GetClient (  cltSeq -> Value ( i )  );
+
+  if (  !clt.IsNull ()  ) {
+
+   str = new TCollection_HAsciiString (  clt -> Name ()  );
+   str -> ChangeAll ( '.', '/' );
+   cfg -> AssignCat ( str );
+   cfg -> AssignCat ( NL  );
+
+   Handle( TColStd_HSequenceOfHAsciiString ) intfSeq = clt -> Interfaces ();
+   Handle( TColStd_HSequenceOfHAsciiString ) clasSeq;
+
+   for ( j = 1; j <= intfSeq -> Length (); ++j ) {
+
+    Handle( MS_Interface ) intf = Extractor () -> MSchema () -> MetaSchema () ->
+                                   GetInterface (  intfSeq -> Value ( j )  );
+
+    if (  !intf.IsNull ()  ) {
+
+     clasSeq = intf -> Classes ();
+
+     for ( k = 1; k <= clasSeq -> Length (); ++k  )
+
+      if (   !map.Contains (  clasSeq -> Value ( k )  )   ) {
+
+       cfg -> AssignCat ( "/" );
+       cfg -> AssignCat (  clasSeq -> Value ( k )  );
+       cfg -> AssignCat ( NL  );
+       map.Add (  clasSeq -> Value ( k )  );
+
+      }  // end if
+
+    }  // end if
+
+    Handle( TColStd_HSequenceOfHAsciiString ) packSeq = intf -> Packages ();
+
+    for (  k = 1; k <= packSeq -> Length (); ++k  ) {
+
+     Handle( MS_Package ) pack = Extractor () -> MSchema () -> MetaSchema () ->
+                                  GetPackage (  packSeq -> Value ( k )  );
+
+     if (  !pack.IsNull ()  ) {
+
+      clasSeq = pack -> Classes ();
+
+      for ( l = 1; l <= clasSeq -> Length (); ++l ) {
+
+       str = new TCollection_HAsciiString (  pack -> Name ()  );
+
+       str -> AssignCat ( "_" );
+       str -> AssignCat (  clasSeq -> Value ( l )  );
+
+       if (  !map.Contains ( str )  ) {
+
+        cfg -> AssignCat ( "/" );
+        cfg -> AssignCat ( str );
+        cfg -> AssignCat ( NL  );
+        map.Add ( str );
+
+       }  // end if
+
+      }  // end for
+
+     }  // end if
+
+    }  // end for
+
+   }  // end for
+
+  }  // end if
+
+ }  // end for
+
+ outfile = new WOKernel_File (
+                new TCollection_HAsciiString ( "ClassFile.cfg" ), Unit (), javatype
+               );
+ outfile -> GetPath ();
+
+ OSD_File f (   OSD_Path (  outfile -> Path () -> Name () -> String ()  )   );
+
+ f.Build (  OSD_WriteOnly, OSD_Protection ( OSD_RWXD, OSD_RWXD, OSD_R, OSD_R )  );
+
+ if (  !f.Failed ()  ) {
+
+  f.Write (  cfg -> String (), cfg -> Length ()  );
+  f.Close ();
+
+ }  // end if
+
+ ashell -> UnLock ();
+
+ if (  Status () == WOKMake_Unprocessed ) SetSucceeded ();
 
+}  // end WOKStep_JiniExtract :: Execute
index 2f08e404f796cbdd21317cdd83b0322818ad4ac3..08abdb4d7fac1fa0f41cdb68e7133045d8336740 100755 (executable)
@@ -227,6 +227,7 @@ void WOKStep_LibLimit::Execute(const Handle(WOKMake_HSequenceOfInputFile)& execl
              outfile->SetPhysicFlag(Standard_False);
              outfile->SetStepID(Standard_True);
              
+//              cout << "WOKStep_LibLimit::Execute -> GetAndAddStep" << endl ;
              Handle(WOKMake_Step) astep = BuildProcess()->GetAndAddStep(Unit(), Code(), it.Key());
              
              astep->DoExecute();
index fe4026124f116f264d78cb93a0ced7564a6d3264..833eea68fa071d20ca9b2fbe658b27f09e767f14 100755 (executable)
@@ -196,14 +196,13 @@ Handle(WOKMake_OutputFile) WOKStep_LinkList::GetUnitLibrary(const Handle(WOKerne
          Standard_Boolean mustExist = aunit->SearchInFileList(Locator(),libname);
          if (mustExist)
            {
-//           ErrorMsg << "WOKStep_LinkList::GetUnitLibrary" 
-//                    << "No library (" << libname << ") found for unit " << aunit->Name() << endm;          
-//           SetFailed();
+             ErrorMsg << "WOKStep_LinkList::GetUnitLibrary" 
+                      << "No library (" << libname << ") found for unit " << aunit->Name() << endm;          
+             SetFailed();
            }
-         else {
-//         WarningMsg << "WOKStep_LinkList::GetUnitLibrary" 
-//                    << "No library (" << libname << ") in unit " << aunit->Name() << endm;
-         }
+         else
+           WarningMsg << "WOKStep_LinkList::GetUnitLibrary" 
+                      << "No library (" << libname << ") in unit " << aunit->Name() << endm;
        }
       else
        {
@@ -354,13 +353,27 @@ void WOKStep_LinkList::AddWorkbenchUnitContribution(const Handle(WOKMake_InputFi
                    << "Processing step " << step->UniqueName() << endm;
 
 //---> EUG4JR
-          if (   !strcmp (  DynamicType () -> Name (), "WOKStep_TransitiveLinkList"  )   )
-
-           g_fForceLib = Standard_True;
+          if (   !strcmp (  DynamicType () -> Name (), "WOKStep_TransitiveLinkList"  ) ||
+                 !strcmp (  DynamicType () -> Name (), "WOKStep_DirectLinkList"      )
+          ) g_fForceLib = Standard_True;
 //<--- EUG4JR
                  Handle(WOKMake_HSequenceOfOutputFile) outfiles = step->OutputFileList();
 //---> EUG4JR
-          if ( g_fForceLib ) g_fForceLib = Standard_False;
+          if ( g_fForceLib ) {
+
+           if (  Unit () -> Params ().Value ( "%UseUnitLibraries" ).IsNull () &&
+                 outfiles.IsNull ()
+           ) {
+
+            outfiles = new WOKMake_HSequenceOfOutputFile ();
+
+            outfiles -> Append (  GetUnitLibrary ( aunit )  );
+
+           }  // end if
+
+           g_fForceLib = Standard_False;
+
+          }  // end if
 //<--- EUG4JR            
                  if(outfiles.IsNull())
                    {
index 46b5a7c8732679cb0425a9771934ae70a545cfae..ede2a2811607de9d8924f97892ae502bc7eb3652 100755 (executable)
@@ -320,7 +320,9 @@ void WOKStep_ProcessStep::TreatOutput(const Handle(WOKMake_InputFile)& infile, c
              aoutfile->GetPath();
 //-> EUG4YAN
               TCollection_AsciiString s;
-              OSD_Path p (  outent -> Path () -> Name () -> ToCString ()  );
+//              OSD_Path p (  outent -> Path () -> Name () -> ToCString ()  );
+              TCollection_AsciiString atstr = outent -> Path () -> Name () -> ToCString () ;
+              OSD_Path p ( atstr );
 //<- EUG4YAN
              // je l'y deplace
              outent->Path()->MoveTo(aoutfile->Path());
@@ -336,7 +338,9 @@ void WOKStep_ProcessStep::TreatOutput(const Handle(WOKMake_InputFile)& infile, c
 
                if (  pp -> Exists ()  ) {
 
-                OSD_Path p (  aoutfile -> Path () -> Name () -> ToCString ()  );
+//                OSD_Path p (  aoutfile -> Path () -> Name () -> ToCString ()  );
+                TCollection_AsciiString atstr =  aoutfile -> Path () -> Name () -> ToCString () ;
+                OSD_Path p ( atstr );
 
                 p.SetExtension ( ".d" );
                 p.SystemName ( s );
index ed875c0a16b69dbd2dd46d24362f7b5f3cfae751..ff6c9dd8333f2f9a4d49dff31da81519bde5a9e3 100755 (executable)
@@ -99,7 +99,9 @@ void WOKStep_WNTK::Execute(const Handle(WOKMake_HSequenceOfInputFile)& anExecLis
    
    Handle(TColStd_HSequenceOfHAsciiString) unitSeq = aFile.Read();
    
-   Unit()->Params().Set("%DebugMode",(char*)(Unit()->Session()->DebugMode() ? "True" : "False"));
+//HP   Unit()->Params().Set("%DebugMode",Unit()->Session()->DebugMode() ? "True" : "False");
+   const char *TrFa = Unit()->Session()->DebugMode() ? "True" : "False" ;
+   Unit()->Params().Set("%DebugMode",(char *) TrFa);
 
    Handle(WOKernel_File) stubFile = new WOKernel_File(new TCollection_HAsciiString("__stub.c"), Unit(),
                                                      Unit()->GetFileType("object"));
index 37c16041f8558600066731210b7d5b65a884120d..20c0ddbb7b293e48272a2e533660d6e2a453d5bf 100755 (executable)
@@ -63,7 +63,11 @@ void WOKStep_WNTLibrary::Execute (const Handle(WOKMake_HSequenceOfInputFile)& an
 
  Handle(TCollection_HAsciiString) target = OutputDir()->Name();
 
- target->AssignCat(Unit()->Name());
+ Handle( TCollection_HAsciiString ) uName = new TCollection_HAsciiString (  Unit () -> Name ()  );
+
+ uName -> ChangeAll ( '.', '_' );
+
+ target -> AssignCat ( uName );
                         
  Handle(WOKBuilder_WNTLibrarian) tool = Handle(WOKBuilder_WNTLibrarian)::DownCast(ComputeTool());
 
index 55dcfb4121d892b9c2375a943017f9e581829917..23627b932b064ce1bd3c69ee6ff9c6edc8df167c 100755 (executable)
@@ -188,8 +188,14 @@ void WOKStep_WNTLink::Execute(const Handle(WOKMake_HSequenceOfInputFile)&
   Handle(WOKBuilder_WNTLinker) tool =  Handle(WOKBuilder_WNTLinker)::DownCast(ComputeTool());
   
   myTarget = new TCollection_HAsciiString(OutputDir()->Name());
-  
-  myTarget->AssignCat(SubCode().IsNull() ? Unit()->Name() : SubCode());
+
+  Handle( TCollection_HAsciiString ) uName = new TCollection_HAsciiString (
+                                                  SubCode ().IsNull () ? Unit () -> Name ()
+                                                                       : SubCode ()
+                                                 );
+  uName -> ChangeAll ( '.', '_' );
+
+  myTarget -> AssignCat ( uName );
   
   tool->SetTargetName(myTarget);