From: caremoli Date: Mon, 8 Jun 2009 13:59:53 +0000 (+0000) Subject: CCAR: problem with absolute path for source files X-Git-Tag: V5_1_2rc1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=58818552a45330224a8e0f5d2d6766de73fb5a97;p=tools%2Fyacsgen.git CCAR: problem with absolute path for source files --- diff --git a/module_generator/cppcompo.py b/module_generator/cppcompo.py index e2d9508..a0b36d5 100644 --- a/module_generator/cppcompo.py +++ b/module_generator/cppcompo.py @@ -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, diff --git a/module_generator/gener.py b/module_generator/gener.py index 18fc93b..c610628 100644 --- a/module_generator/gener.py +++ b/module_generator/gener.py @@ -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", diff --git a/module_generator/pycompo.py b/module_generator/pycompo.py index 69ac03f..f542e61 100644 --- a/module_generator/pycompo.py +++ b/module_generator/pycompo.py @@ -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,