From: caremoli Date: Wed, 25 Nov 2009 17:59:39 +0000 (+0000) Subject: CCAR: add a context.py file in Examples directory to group prerequisites definition X-Git-Tag: V5_1_3~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fc1013415ff7f3f0dd3ff7f5603fb152b97b3e09;p=tools%2Fyacsgen.git CCAR: add a context.py file in Examples directory to group prerequisites definition --- diff --git a/Examples/ast1/components.py b/Examples/ast1/components.py index 9c7847c..88506b0 100644 --- a/Examples/ast1/components.py +++ b/Examples/ast1/components.py @@ -4,9 +4,10 @@ import os from module_generator import Generator,Module,ASTERComponent,Service,F77Component -context={'update':1,"prerequisites":"/local/cchris/.packages.d/envSalome50", - "kernel":"/local/chris/SALOME2/RELEASES/Install/KERNEL_V5"} -aster_root="/local/chris/ASTER/instals/NEW9" +#import context from .. +execfile("../context.py") + +aster_root=os.path.join(aster_home,aster_version) libfcompodir=os.path.join(os.getcwd(),"fcompo") myasterdir=os.path.join(os.getcwd(),"myaster","bibpyt") @@ -28,7 +29,7 @@ c1=ASTERComponent("caster",services=[ python_path=[myasterdir], argv=["-memjeveux","4",'-rep_outils','/local/chris/ASTER/instals/outils'], ) - + c2=F77Component("cfort",services=[ Service("s1",inport=[("a","double"),("b","long"),("c","string")], outport=[("d","double"),("e","long"),("f","string")], diff --git a/Examples/ast1/fcompo/Makefile b/Examples/ast1/fcompo/Makefile index ce601fe..a04c201 100644 --- a/Examples/ast1/fcompo/Makefile +++ b/Examples/ast1/fcompo/Makefile @@ -1,15 +1,15 @@ -FC=g77 +FC=gfortran -KERNEL_ROOT_DIR=/local/chris/SALOME2/RELEASES/Install/KERNEL_V5 +KERNEL_ROOT_DIR=/local/cchris/Salome/Install/KERNEL_V5 KERNEL_LIBS= -L$(KERNEL_ROOT_DIR)/lib/salome -lCalciumC -lSalomeDSCSuperv -lSalomeDSCContainer -lSalomeDatastream -lSalomeDSCSupervBasic all: libfcompo.so libfcompo.so:compo.o - $(FC) -shared -o libfcompo.so compo.o ${KERNEL_LIBS} -Wl,--rpath -Wl,$(KERNEL_ROOT_DIR)/lib/salome -fexceptions + $(FC) -shared -fPIC -o libfcompo.so compo.o ${KERNEL_LIBS} -Wl,--rpath -Wl,$(KERNEL_ROOT_DIR)/lib/salome -fexceptions compo.o:compo.f - $(FC) -c compo.f -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions + $(FC) -c compo.f -fPIC -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions clean: rm -f *.o *.so diff --git a/Examples/ast2/components.py b/Examples/ast2/components.py index d9f8970..889d9fe 100644 --- a/Examples/ast2/components.py +++ b/Examples/ast2/components.py @@ -4,13 +4,8 @@ import os from module_generator import Generator,Module,ASTERComponent,Service,F77Component -context={'update':1, - "prerequisites":"/local/cchris/.packages.d/envSalome5", - "kernel":"/local/cchris/Salome/Install/KERNEL_V5" - } - -aster_home="/local/cchris/Aster/V10/Install" -aster_version="STA10.0" +#import context from .. +execfile("../context.py") aster_root=os.path.join(aster_home,aster_version) diff --git a/Examples/ast2/myaster/Makefile b/Examples/ast2/myaster/Makefile index e693a08..8fa01d6 100644 --- a/Examples/ast2/myaster/Makefile +++ b/Examples/ast2/myaster/Makefile @@ -5,3 +5,5 @@ ASTER_ROOT=/local/cchris/Aster/V10/Install aster.exe: ./make_exec +clean: + rm -rf commande aster.exe make-exe diff --git a/Examples/context.py b/Examples/context.py new file mode 100644 index 0000000..3ed110f --- /dev/null +++ b/Examples/context.py @@ -0,0 +1,9 @@ + +context={'update':1, + "prerequisites":"/local/cchris/.packages.d/envSalome5", + "kernel":"/local/cchris/Salome/Install/KERNEL_V5" + } +aster_home="/local/cchris/Aster/V10/Install" +aster_version="STA10.0" + + diff --git a/Examples/cpp1/README.txt b/Examples/cpp1/README.txt index efa5554..424e98e 100644 --- a/Examples/cpp1/README.txt +++ b/Examples/cpp1/README.txt @@ -7,7 +7,7 @@ to take into account your configuration. 1- your prerequisite file 2- your KERNEL_ROOT_DIR -Then set the environment (including PYTHONPATH for YACGEN, ../.. from here and execute components.py :: +Then set the environment (including PYTHONPATH for YACSGEN, ../.. from here and execute components.py :: source python components.py diff --git a/Examples/cpp1/components.py b/Examples/cpp1/components.py index 871f238..c3f9f62 100644 --- a/Examples/cpp1/components.py +++ b/Examples/cpp1/components.py @@ -1,10 +1,8 @@ import os from module_generator import Generator,Module,Service,CPPComponent -context={'update':1, - "prerequisites":"/home/aribes/Dev/EnvFiles/prerequis.sh", - "kernel":"/home/aribes/Dev/Install/SALOME/SALOME_BR/KERNEL_INSTALL_V5_1_main" - } +#import context from .. +execfile("../context.py") cwd=os.getcwd() @@ -41,7 +39,5 @@ g.bootstrap() g.configure() g.make() g.install() -g.make_appli("appli",restrict=["KERNEL","GUI","YACS"], - altmodules={"GUI":"/home/aribes/Dev/Install/SALOME/SALOME_BR/GUI_INSTALL_V5_1_main", - "YACS":"/home/aribes/Dev/Install/SALOME/SALOME_BR/YACS_INSTALL_BR_V511_PR"}) +g.make_appli("appli",restrict=["KERNEL","GUI","YACS"]) diff --git a/Examples/cpp2/Makefile b/Examples/cpp2/Makefile index 88544a1..4a97570 100644 --- a/Examples/cpp2/Makefile +++ b/Examples/cpp2/Makefile @@ -1,5 +1,4 @@ -KERNEL_ROOT_DIR=/local/chris/SALOME2/RELEASES/Install/KERNEL_V5 prog:prog.cxx g++ -o prog prog.cxx -L./install/lib/salome -lcompo1Exelib diff --git a/Examples/cpp2/components.py b/Examples/cpp2/components.py index 5737a97..bc85669 100644 --- a/Examples/cpp2/components.py +++ b/Examples/cpp2/components.py @@ -1,10 +1,8 @@ import os from module_generator import Generator,Module,Service,CPPComponent -context={'update':1, - "prerequisites":"/home/aribes/Dev/EnvFiles/prerequis.sh", - "kernel":"/home/aribes/Dev/Install/SALOME/SALOME_BR/KERNEL_INSTALL_V5_1_main" - } +#import context from .. +execfile("../context.py") cwd=os.getcwd() @@ -43,7 +41,4 @@ g.bootstrap() g.configure() g.make() g.install() -g.make_appli("appli",restrict=["KERNEL","GUI","YACS"], - altmodules={"GUI":"/home/aribes/Dev/Install/SALOME/SALOME_BR/GUI_INSTALL_V5_1_main", - "YACS":"/home/aribes/Dev/Install/SALOME/SALOME_BR/YACS_INSTALL_BR_V511_PR"}) - +g.make_appli("appli",restrict=["KERNEL","GUI","YACS"]) diff --git a/Examples/fort1/Makefile b/Examples/fort1/Makefile index 1e65c87..f21349d 100644 --- a/Examples/fort1/Makefile +++ b/Examples/fort1/Makefile @@ -1,17 +1,17 @@ -FC=g77 +FC=gfortran -KERNEL_ROOT_DIR=/local/chris/SALOME2/RELEASES/Install/KERNEL_V5 +KERNEL_ROOT_DIR=/local/cchris/Salome/Install/KERNEL_V5 all:libcode1.so libcode2.so libcode1.so:code1.o - $(FC) -shared -o libcode1.so code1.o + $(FC) -shared -fPIC -o libcode1.so code1.o code1.o:code1.f - $(FC) -c code1.f -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions + $(FC) -c code1.f -fPIC -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions libcode2.so:code2.o - $(FC) -shared -o libcode2.so code2.o + $(FC) -shared -fPIC -o libcode2.so code2.o code2.o:code2.f - $(FC) -c code2.f -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions + $(FC) -c code2.f -fPIC -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions clean: rm -rf *.o *.so diff --git a/Examples/fort1/components.py b/Examples/fort1/components.py index 3c44fda..3917c79 100644 --- a/Examples/fort1/components.py +++ b/Examples/fort1/components.py @@ -1,10 +1,8 @@ import os from module_generator import Generator,Module,Service,F77Component -context={'update':1, - "prerequisites":"/local/cchris/.packages.d/envSalome50", - "kernel":"/local/chris/SALOME2/RELEASES/Install/KERNEL_V5", - } +#import context from .. +execfile("../context.py") cwd=os.getcwd() diff --git a/Examples/fort2/Makefile b/Examples/fort2/Makefile index b5b693e..25b4f7c 100644 --- a/Examples/fort2/Makefile +++ b/Examples/fort2/Makefile @@ -1,7 +1,7 @@ -FC=g77 +FC=gfortran -KERNEL_ROOT_DIR=/local/chris/SALOME2/RELEASES/Install/KERNEL_V5 +KERNEL_ROOT_DIR=/local/cchris/Salome/Install/KERNEL_V5 all:prog1 prog2 prog1:code1.o diff --git a/Examples/fort2/components.py b/Examples/fort2/components.py index b92f78d..aa01198 100644 --- a/Examples/fort2/components.py +++ b/Examples/fort2/components.py @@ -1,10 +1,8 @@ import os from module_generator import Generator,Module,Service,F77Component -context={'update':1, - "prerequisites":"/local/cchris/.packages.d/envSalome50", - "kernel":"/local/chris/SALOME2/RELEASES/Install/KERNEL_V5", - } +#import context from .. +execfile("../context.py") cwd=os.getcwd() diff --git a/Examples/pyth1/components.py b/Examples/pyth1/components.py index b3d5cb3..f7c3083 100644 --- a/Examples/pyth1/components.py +++ b/Examples/pyth1/components.py @@ -1,10 +1,8 @@ import os from module_generator import Generator,Module,Service,PYComponent -context={'update':1, - "prerequisites":"/home/aribes/Dev/Scripts_env/prerequis.sh", - "kernel":"/home/aribes/Dev/Install/SALOME/KERNEL_INSTALL-RIBES" - } +#import context from .. +execfile("../context.py") cwd=os.getcwd() @@ -46,8 +44,6 @@ g.bootstrap() g.configure() g.make() g.install() -g.make_appli("appli",restrict=["KERNEL","GUI","YACS"], - altmodules={"GUI":"/home/aribes/Dev/Install/SALOME/GUI_INSTALL", - "YACS":"/home/aribes/Dev/Install/SALOME/YACS_INSTALL"}) +g.make_appli("appli",restrict=["KERNEL","GUI","YACS"]) diff --git a/Examples/pyth2/components.py b/Examples/pyth2/components.py index 336c58c..56cbb18 100644 --- a/Examples/pyth2/components.py +++ b/Examples/pyth2/components.py @@ -1,10 +1,8 @@ import os from module_generator import Generator,Module,Service,PYComponent -context={'update':1, - "prerequisites":"/local/cchris/.packages.d/envSalome50", - "kernel":"/local/chris/SALOME2/RELEASES/Install/KERNEL_V5", - } +#import context from .. +execfile("../context.py") cwd=os.getcwd()