]> SALOME platform Git repositories - tools/yacsgen.git/commitdiff
Salome HOME
CCAR: add a context.py file in Examples directory to group prerequisites definition
authorcaremoli <caremoli>
Wed, 25 Nov 2009 17:59:39 +0000 (17:59 +0000)
committercaremoli <caremoli>
Wed, 25 Nov 2009 17:59:39 +0000 (17:59 +0000)
15 files changed:
Examples/ast1/components.py
Examples/ast1/fcompo/Makefile
Examples/ast2/components.py
Examples/ast2/myaster/Makefile
Examples/context.py [new file with mode: 0644]
Examples/cpp1/README.txt
Examples/cpp1/components.py
Examples/cpp2/Makefile
Examples/cpp2/components.py
Examples/fort1/Makefile
Examples/fort1/components.py
Examples/fort2/Makefile
Examples/fort2/components.py
Examples/pyth1/components.py
Examples/pyth2/components.py

index 9c7847c6dbc7296b4d9e90c7e68e88cc57db9d04..88506b0f536f980b402c5f0583f2c7be042351b1 100644 (file)
@@ -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")],
index ce601fe0cf0ad0e7241a0aeadd013d1ac3ce4e73..a04c20164fbfa1ed21be823fa78b058b451a9d40 100644 (file)
@@ -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
index d9f8970d2f562666359b5f0490d3f5806d6da9ae..889d9feb338a7857bb8fc5e6fdfcd2503a3fbe76 100644 (file)
@@ -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)
 
index e693a084a34c9d0b7b6b3b21ce6635e24aa049f3..8fa01d644ae7ce558902f9a504da4acd20a7ee31 100644 (file)
@@ -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 (file)
index 0000000..3ed110f
--- /dev/null
@@ -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"
+
+
index efa5554ecce118e2eb631d4d6c693fa95fe7f240..424e98e9029fbd2c7677f1d39291436a6b35ecbb 100644 (file)
@@ -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 <your prerequisite file>
   python components.py
index 871f238a7555e10d1b36ed4a9f0b3ca5df23008b..c3f9f62005fd96a9be9e471ac58fb96b00ab9a06 100644 (file)
@@ -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"])
 
index 88544a1a30fa1b9122cb45e3ad3576c660b985cf..4a97570a4262762cb1cd6506a36822afdd2b1ae2 100644 (file)
@@ -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
index 5737a9738efe0023136c56d02d1ad4f6b68a4057..bc85669770c81a718e8fd8e61b41f71cb601c651 100644 (file)
@@ -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"])
index 1e65c874034f32f6efc9271fe610cfca62718fd8..f21349dd6cc2fa47fc3c7630460d5729577b4344 100644 (file)
@@ -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 
index 3c44fda040313a25d579741679897287f6aaddf3..3917c797f1b9cbf292845c6fee2f10f7551ebe99 100644 (file)
@@ -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()
 
index b5b693e6bbfa98526a542b7230e852e4d43aed1c..25b4f7c3f2ce1aa255563f16aee5ec3405568de7 100644 (file)
@@ -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
index b92f78deb56e027c517b2376e13cf5b1bc68752f..aa01198131c3429f4bf690f271eb29549187b542 100644 (file)
@@ -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()
 
index b3d5cb3a7a763d3c5c5790deec3e56d09db10c0e..f7c308394d67d6ae1162d0f3fb47a6aee72db651 100644 (file)
@@ -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"])
 
 
index 336c58ca1d3d7765e2ba5433c0806d7950b72146..56cbb18d2d27f273a28ad5b0577f5c2d1ad50c45 100644 (file)
@@ -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()