]> SALOME platform Git repositories - tools/yacsgen.git/commitdiff
Salome HOME
CCAR: problem with absolute path for source files V5_1_2rc1 V5_1_2rc2 V5_1_2rc3 V5_1_2rc4 V5_1_2rc5
authorcaremoli <caremoli>
Mon, 8 Jun 2009 13:59:53 +0000 (13:59 +0000)
committercaremoli <caremoli>
Mon, 8 Jun 2009 13:59:53 +0000 (13:59 +0000)
module_generator/cppcompo.py
module_generator/gener.py
module_generator/pycompo.py

index e2d950801bdad4f5d542dff195c27ea1d5d7cd1a..a0b36d592607d234de020023243f3b68b942a777 100644 (file)
@@ -2,6 +2,7 @@
   Module that defines CPPComponent for SALOME components implemented in C++
 """
 
+import os
 from gener import Component, Invalid
 from cpp_tmpl import initService, cxxService, hxxCompo, cxxCompo
 from cpp_tmpl import compoEXEMakefile, compoMakefile, exeCPP
@@ -33,7 +34,7 @@ class CPPComponent(Component):
     cxxfile = "%s.cxx" % self.name
     hxxfile = "%s.hxx" % self.name
     if self.kind == "lib":
-      sources = " ".join(self.sources)
+      sources = " ".join(map(os.path.basename,self.sources))
       return {"Makefile.am":compoMakefile.substitute(module=gen.module.name, 
                                                      component=self.name,
                                                      libs=self.libs, 
index 18fc93be4a79bb79b9320e982abee80609150d12..c610628dfe362f16dbe62cdb6f04d788e2978b01 100644 (file)
@@ -215,7 +215,7 @@ class Generator(object):
     #copy source files if any in creates tree
     for compo in module.components:
       for src in compo.sources:
-        shutil.copyfile(src, os.path.join(namedir, "src", compo.name, src))
+        shutil.copyfile(src, os.path.join(namedir, "src", compo.name, os.path.basename(src)))
 
     for m4file in ("check_Kernel.m4", "check_omniorb.m4", 
                    "ac_linker_options.m4", "ac_cxx_option.m4",
index 69ac03f5e49f49d2e74607fa5a04523212ad8016..f542e619a0713df04328a400cae4d4a4dc41306f 100644 (file)
@@ -1,6 +1,7 @@
 """
   Module that defines PYComponent for SALOME components implemented in Python
 """
+import os
 from gener import Component, Invalid
 from pyth_tmpl import pyinitService, pyService, pyCompoEXE, pyCompo
 from pyth_tmpl import pycompoEXEMakefile, pycompoMakefile
@@ -20,7 +21,7 @@ class PYComponent(Component):
 
   def makeCompo(self, gen):
     pyfile = "%s.py" % self.name
-    sources = " ".join(self.sources)
+    sources = " ".join(map(os.path.basename,self.sources))
     if self.kind == "lib":
       return {"Makefile.am":pycompoMakefile.substitute(module=gen.module.name, 
                                                        component=self.name,