From: prascle Date: Mon, 11 Feb 2008 15:03:43 +0000 (+0000) Subject: merge from BR_For40_DSC 11 feb 08 X-Git-Tag: V4_1_1rc1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eba150bfff2d6c2712721083270c08f1e8f2c09f;p=modules%2Fkernel.git merge from BR_For40_DSC 11 feb 08 --- diff --git a/bin/Makefile.am b/bin/Makefile.am index 2cf221ead..b8086e529 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -72,20 +72,23 @@ EXTRA_DIST = appliskel dist-hook: rm -rf `find $(distdir)/appliskel -name CVS` -DISTCLEANFILES = $(top_builddir)/bin/@PACKAGE@/Makefile.am +DISTCLEANFILES = $(top_builddir)/bin/salome/Makefile.am clean-local: - rm -rf $(top_builddir)/bin/@PACKAGE@/appliskel - cd $(top_builddir)/bin/@PACKAGE@; \ + rm -rf $(top_builddir)/bin/salome/appliskel + cd $(top_builddir)/bin/salome; \ rm -f $(dist_salomescript_DATA) $(dist_salomescript_SCRIPTS) # This is an ugly target to avoid exploring the appliskel subdirectory. install-exec-local: - $(INSTALL) -d $(salomescriptdir) - $(RM) -rf $(salomescriptdir)/appliskel 1> /dev/null 2>&1 - cp -r $(srcdir)/appliskel $(salomescriptdir) - find $(salomescriptdir) -name CVS -prune -exec rm -rf {} \; + $(INSTALL) -d $(DESTDIR)$(salomescriptdir) + $(RM) -rf $(DESTDIR)$(salomescriptdir)/appliskel 1> /dev/null 2>&1 + cp -r $(srcdir)/appliskel $(DESTDIR)$(salomescriptdir) + find $(DESTDIR)$(salomescriptdir) -name CVS -prune -exec rm -rf {} \; uninstall-local: - find $(salomescriptdir)/appliskel -exec chmod +w {} \; - rm -rf $(salomescriptdir)/appliskel + if test -d $(DESTDIR)$(salomescriptdir)/appliskel; then \ + find $(DESTDIR)$(salomescriptdir)/appliskel -exec chmod +w {} ';' ; \ + rm -rf $(DESTDIR)$(salomescriptdir)/appliskel; \ + fi; + diff --git a/bin/appli_clean.sh b/bin/appli_clean.sh index 0046e946c..169a56622 100644 --- a/bin/appli_clean.sh +++ b/bin/appli_clean.sh @@ -20,4 +20,4 @@ # #clean appli -rm -rf bin lib share doc env.d envd setAppliPath.sh searchFreePort.sh runAppli runConsole runSession runRemote.sh runTests SalomeApp.xml *.pyc *~ .bashrc +rm -rf bin lib share doc env.d envd getAppliPath.py searchFreePort.sh runAppli runConsole runSession runRemote.sh runTests SalomeApp.xml *.pyc *~ .bashrc diff --git a/bin/appli_gen.py b/bin/appli_gen.py index c24614cc1..1ce244aca 100644 --- a/bin/appli_gen.py +++ b/bin/appli_gen.py @@ -145,7 +145,7 @@ def install(prefix,config_file): appliskel_dir=os.path.join(home_dir,'bin','salome','appliskel') for fn in ('envd', - 'setAppliPath.sh', + 'getAppliPath.py', 'searchFreePort.sh', 'runRemote.sh', 'runAppli', @@ -154,7 +154,7 @@ def install(prefix,config_file): 'runTests', '.bashrc', ): - virtual_salome.symlink(os.path.join(appliskel_dir, fn),os.path.join(home_dir, fn)) + virtual_salome.symlink("./bin/salome/appliskel/"+fn,os.path.join(home_dir, fn)) pass if filename != os.path.join(home_dir,"config_appli.xml"): @@ -174,7 +174,7 @@ def install(prefix,config_file): f =open(os.path.join(home_dir,'env.d','configSalome.sh'),'w') for module in _config["modules"]: - command='export '+ module + '_ROOT_DIR=' + home_dir +'\n' + command='export '+ module + '_ROOT_DIR=${HOME}/${APPLI}\n' f.write(command) pass if _config.has_key("samples_path"): @@ -185,9 +185,9 @@ def install(prefix,config_file): f =open(os.path.join(home_dir,'env.d','configGUI.sh'),'w') - command = 'export SalomeAppConfig=' + home_dir +'\n' + command = 'export SalomeAppConfig=${HOME}/${APPLI}\n' f.write(command) - command = 'export SUITRoot=' + os.path.join(home_dir,'share','salome') +'\n' + command = 'export SUITRoot=${HOME}/${APPLI}/share/salome\n' f.write(command) f.write('export DISABLE_FPE=1\n') f.write('export MMGT_REENTRANT=1\n') diff --git a/bin/appli_install.sh b/bin/appli_install.sh index 37da0092e..5e0dc418a 100644 --- a/bin/appli_install.sh +++ b/bin/appli_install.sh @@ -25,13 +25,13 @@ INSTALL_ROOT=${SALOME_ROOT}/Install APPLI_ROOT=`pwd` # --- clean appli -rm -rf bin lib share doc envd setAppliPath.sh searchFreePort.sh runAppli runConsole runSession env.d +rm -rf bin lib share doc envd getAppliPath.py searchFreePort.sh runAppli runConsole runSession env.d # --- install appli mkdir -p env.d ln -fs bin/salome/appliskel/envd . -ln -fs bin/salome/appliskel/setAppliPath.sh . +ln -fs bin/salome/appliskel/getAppliPath.py . ln -fs bin/salome/appliskel/searchFreePort.sh . ln -fs bin/salome/appliskel/runRemote.sh . ln -fs bin/salome/appliskel/runAppli . diff --git a/bin/appliskel/CatalogResources.xml b/bin/appliskel/CatalogResources.xml index 8caed2bfb..9e09ed5fc 100644 --- a/bin/appliskel/CatalogResources.xml +++ b/bin/appliskel/CatalogResources.xml @@ -1,28 +1,4 @@ - - - - - + diff --git a/bin/appliskel/README b/bin/appliskel/README index 644da2122..21ee467ac 100644 --- a/bin/appliskel/README +++ b/bin/appliskel/README @@ -57,7 +57,7 @@ SALOME internal run scripts envd Sets SALOME application environment, envd is sourced by other scripts. -setAppliPath.sh +getAppliPath.py Used by other scripts to define the Application Path. searchFreePort.sh diff --git a/bin/appliskel/getAppliPath.py b/bin/appliskel/getAppliPath.py new file mode 100755 index 000000000..bac311da7 --- /dev/null +++ b/bin/appliskel/getAppliPath.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python + +import os + +def relpath(target, base): + """ Find relative path from base to target + if target== "/local/chris/appli" and base== "/local/chris" the result is appli + if target== /tmp/appli and base /local/chris the result is ../../tmp/appli + """ + target=target.split(os.path.sep) + base=base.split(os.path.sep) + for i in xrange(len(base)): + if base[i] != target[i]: + i=i-1 + #not in base + break + p=['..']*(len(base)-i-1)+target[i+1:] + if p == []: + return '.' + return os.path.join( *p ) + +def set_var(VAR, strpath): + """Set VAR environment variable """ + value = "%r" % strpath + shell = os.getenv('SHELL') + if shell and shell.endswith('csh'): + return "setenv %s %s" % (VAR, value) + else: + return "export %s=%s" % (VAR, value) + + +applipath=relpath(os.path.abspath(os.path.dirname(__file__)),os.path.abspath(os.getenv('HOME'))) + +#print set_var('APPLI', applipath) +print applipath diff --git a/bin/appliskel/killCurrentPort b/bin/appliskel/killCurrentPort index 41b14866a..c9f1e6c9d 100755 --- a/bin/appliskel/killCurrentPort +++ b/bin/appliskel/killCurrentPort @@ -2,7 +2,8 @@ # --- retrieve APPLI path, relative to $HOME, set ${APPLI} -. `dirname $0`/setAppliPath.sh +APPLI_HOME=`dirname $0` +export APPLI=`${APPLI_HOME}/getAppliPath.py` # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...) diff --git a/bin/appliskel/runAppli b/bin/appliskel/runAppli index 2bd9f1dae..a18114dd6 100755 --- a/bin/appliskel/runAppli +++ b/bin/appliskel/runAppli @@ -4,7 +4,7 @@ APPLI_HOME=`dirname $0` # --- retrieve APPLI path, relative to $HOME, set ${APPLI} -. ${APPLI_HOME}/setAppliPath.sh +export APPLI=`${APPLI_HOME}/getAppliPath.py` # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...) diff --git a/bin/appliskel/runConsole b/bin/appliskel/runConsole index c94a02fcf..73f5f5f88 100755 --- a/bin/appliskel/runConsole +++ b/bin/appliskel/runConsole @@ -4,7 +4,7 @@ APPLI_HOME=`dirname $0` # --- retrieve APPLI path, relative to $HOME, set ${APPLI} -. ${APPLI_HOME}/setAppliPath.sh +export APPLI=`${APPLI_HOME}/getAppliPath.py` # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...) diff --git a/bin/appliskel/runRemote.sh b/bin/appliskel/runRemote.sh index 21bc0b0c1..6cd76ef46 100755 --- a/bin/appliskel/runRemote.sh +++ b/bin/appliskel/runRemote.sh @@ -42,7 +42,8 @@ # --- retrieve APPLI path, relative to $HOME, set ${APPLI} -. `dirname $0`/setAppliPath.sh +APPLI_HOME=`dirname $0` +export APPLI=`${APPLI_HOME}/getAppliPath.py` # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...) diff --git a/bin/appliskel/runSession b/bin/appliskel/runSession index 9f3b0e4f9..446ee605a 100755 --- a/bin/appliskel/runSession +++ b/bin/appliskel/runSession @@ -9,7 +9,7 @@ APPLI_HOME=`dirname $0` # --- retrieve APPLI path, relative to $HOME, set ${APPLI} -. ${APPLI_HOME}/setAppliPath.sh +export APPLI=`${APPLI_HOME}/getAppliPath.py` # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...) diff --git a/bin/appliskel/runTests b/bin/appliskel/runTests index e98c1e6aa..4eb9b6dba 100755 --- a/bin/appliskel/runTests +++ b/bin/appliskel/runTests @@ -2,7 +2,8 @@ # --- retrieve APPLI path, relative to $HOME, set ${APPLI} -. `dirname $0`/setAppliPath.sh +APPLI_HOME=`dirname $0` +export APPLI=`${APPLI_HOME}/getAppliPath.py` # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...) diff --git a/bin/appliskel/setAppliPath.sh b/bin/appliskel/setAppliPath.sh deleted file mode 100755 index ccbd6b86a..000000000 --- a/bin/appliskel/setAppliPath.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG -# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# --- retrieve APPLI path, relative to $HOME, set ${APPLI} -# on sarge, "which" gives not allways the absolute path... - -comName=`which $0` -aa=${comName:0:1} -if test x$aa == x\/; then - mycom=${comName} -elif test x$aa == x\.; then - mycom=${PWD}/${comName:2} -else - mycom=${PWD}/${comName} -fi -APPLI=`echo ${HOME} \`dirname $mycom\` | awk ' { print substr($2,length($1)+2) } '` -#echo $APPLI -export APPLI diff --git a/configure.ac b/configure.ac index 1ef7ba68c..4d28fad9f 100644 --- a/configure.ac +++ b/configure.ac @@ -4,8 +4,7 @@ # ================================================================ # #AC_PREREQ(2.59) -#AC_INIT(src) -AC_INIT([Salome2 Project], [4.1.1], [paul.rascle@edf.fr], [salome]) +AC_INIT([Salome2 Project], [4.1.1], [paul.rascle@edf.fr], [SalomeKer]) # AC_CONFIG_AUX_DIR defines an alternative directory where to find the auxiliary # scripts such as config.guess, install-sh, ... @@ -15,12 +14,7 @@ AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([tar-pax]) #AC_CONFIG_HEADER([config.h]) -PACKAGE=salome -AC_SUBST(PACKAGE) - -VERSION=4.1.1 XVERSION=0x040101 -AC_SUBST(VERSION) AC_SUBST(XVERSION) # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.) @@ -425,7 +419,7 @@ summary $basic_mandatory_products check_fatal_error $basic_mandatory_products echo -corba_mandatory_products="omniORB_ok boost_ok libxml_ok" +corba_mandatory_products="omniORB_ok omniORBpy_ok boost_ok libxml_ok" if test x$corba_gen = xtrue; then echo --- CORBA mandatory products - default configuration: summary $corba_mandatory_products @@ -447,7 +441,7 @@ echo --- Kernel parallel extensions: summary $parallel_products echo -optional_products="cppunit_ok openpbs_ok lsf_ok" +optional_products="cppunit_ok openpbs_ok lsf_ok numpy_ok" echo --- Optional products: echo [" These products are optional because the KERNEL functions"] echo [" using them are built only if the products are detected."] diff --git a/doc/salome/Makefile.am b/doc/salome/Makefile.am index 86089e1b9..9f43889c1 100644 --- a/doc/salome/Makefile.am +++ b/doc/salome/Makefile.am @@ -30,7 +30,7 @@ SUBDIRSGUI= tui SUBDIRSTUI= tui index_html: - $(INSTALL) -d $(docdir); + $(INSTALL) -d $(DESTDIR)$(docdir); usr_docs: index_html list='$(SUBDIRSGUI)'; for subdir in $$list; do \ @@ -48,7 +48,9 @@ dev_docs: index_html info_TEXINFOS = Batch.texi install-data-local: html usr_docs - cp -rp $(top_builddir)/doc/salome/Batch.html $(docdir) + cp -rp $(top_builddir)/doc/salome/Batch.html $(DESTDIR)$(docdir) +uninstall-local: + rm -rf $(DESTDIR)$(docdir)/Batch.html EXTRA_DIST= main.dox install.dox \ kernel_resources.dox kernel_services.dox \ diff --git a/doc/salome/tui/Makefile.am b/doc/salome/tui/Makefile.am index 9088dfa1c..794840fc4 100644 --- a/doc/salome/tui/Makefile.am +++ b/doc/salome/tui/Makefile.am @@ -25,12 +25,16 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am -EXTRA_DIST = KERNEL pythfilter.py +EXTRA_DIST = pythfilter.py dist-hook: + cp -rf $(srcdir)/KERNEL $(distdir) + if test -d "KERNEL"; then \ + find "KERNEL" -name "*.*" -exec cp -rf {} $(distdir)/KERNEL ';' ; \ + fi rm -rf `find $(distdir) -name CVS` -usr_docs: +KERNEL/main.html:../main.dox cp -fr $(srcdir)/KERNEL/* ./INPUT; \ cd ./INPUT; \ pwd; ls;\ @@ -48,21 +52,34 @@ usr_docs: fi; \ $(DOXYGEN) ./doxyuser1; \ cd ..; -# $(INSTALL) -d $(docdir)/tui/KERNEL; - cp -fr $(srcdir)/KERNEL/sources/static/*.* $(docdir); - cp -fr $(srcdir)/KERNEL/sources/ $(docdir); - cp -fr KERNEL/[a-f]*.* $(docdir) - cp -fr KERNEL/[g-l]*.* $(docdir) - cp -fr KERNEL/[m-z]*.* $(docdir) - cp -fr $(srcdir)/KERNEL/HTML/ $(docdir); - cp -f $(srcdir)/pythfilter.py $(docdir); - cp -fr $(srcdir)/KERNEL/exemple/ $(docdir); -# cp -fr $(srcdir)/KERNEL/sources/static/*.* $(docdir)/tui/KERNEL; -# cp -fr $(srcdir)/KERNEL/sources/ $(docdir)/tui/KERNEL; -# cp -fr KERNEL $(docdir)/tui -# cp -fr $(srcdir)/KERNEL/HTML/ $(docdir)/tui/KERNEL; -# cp -f $(srcdir)/pythfilter.py $(docdir)/tui/KERNEL; -# cp -fr $(srcdir)/KERNEL/exemple/ $(docdir)/tui/KERNEL; + +usr_docs:KERNEL/main.html + if test -d "KERNEL"; then b=; else b="$(srcdir)/"; fi; \ + cp -fr $(srcdir)/KERNEL/sources/static/*.* $(DESTDIR)$(docdir); \ + cp -fr $(srcdir)/KERNEL/sources/ $(DESTDIR)$(docdir); \ + find $$b"KERNEL" -name "*.*" -exec cp -rf {} $(DESTDIR)$(docdir) ';' ; \ + cp -fr $(srcdir)/KERNEL/HTML/ $(DESTDIR)$(docdir); \ + cp -f $(srcdir)/pythfilter.py $(DESTDIR)$(docdir); \ + cp -fr $(srcdir)/KERNEL/exemple/ $(DESTDIR)$(docdir); + +uninstall-local: + chmod +w $(DESTDIR)$(docdir)/sources + chmod +w $(DESTDIR)$(docdir)/sources/static + chmod +w $(DESTDIR)$(docdir)/HTML + chmod +w $(DESTDIR)$(docdir)/exemple + rm -rf $(DESTDIR)$(docdir)/pythfilter.py + find $(DESTDIR)$(docdir) -name "*.html" -type f -exec rm -rf {} \; + find $(DESTDIR)$(docdir) -name "*.jpg" -type f -exec rm -rf {} \; + find $(DESTDIR)$(docdir) -name "*.map" -type f -exec rm -rf {} \; + find $(DESTDIR)$(docdir) -name "*.md5" -type f -exec rm -rf {} \; + find $(DESTDIR)$(docdir) -name "*.png" -type f -exec rm -rf {} \; + find $(DESTDIR)$(docdir) -name "*.gif" -type f -exec rm -rf {} \; + find $(DESTDIR)$(docdir) -name "*.css" -type f -exec rm -rf {} \; + find $(DESTDIR)$(docdir) -name "*.js*" -type f -exec rm -rf {} \; + rm -rf $(DESTDIR)$(docdir)/sources + rm -rf $(DESTDIR)$(docdir)/HTML + rm -rf $(DESTDIR)$(docdir)/exemple + rm -rf $(DESTDIR)$(docdir)/*.in dev_docs: cp -fr $(srcdir)/KERNEL/* ./INPUT; \ diff --git a/idl/Makefile.am b/idl/Makefile.am index b046999d7..9ff37591d 100644 --- a/idl/Makefile.am +++ b/idl/Makefile.am @@ -235,14 +235,14 @@ SK.cc.hh: @PACO_IDL@ -I $(srcdir):@PACOPATH@/idl $^ omniORB4 0 install-exec-local: $(IDL_FILES:%=$(top_srcdir)/idl/%) - $(INSTALL) -d $(pkgpythondir) + $(INSTALL) -d $(DESTDIR)$(salomepythondir) ls $^ | while read file; do \ - $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(pkgpythondir) $$file ; \ + $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \ done # uninstall-local removes too much, but it works in distcheck uninstall-local: - rm -rf $(pkgpythondir)/* + rm -rf $(DESTDIR)$(salomepythondir)/* mostlyclean-local: -rm -f *.hh *.cc .depidl diff --git a/salome_adm/unix/config_files/check_hdf5.m4 b/salome_adm/unix/config_files/check_hdf5.m4 index 4d200e8f3..9cc52b321 100644 --- a/salome_adm/unix/config_files/check_hdf5.m4 +++ b/salome_adm/unix/config_files/check_hdf5.m4 @@ -42,6 +42,7 @@ hdf5_ok=no LOCAL_INCLUDES="" LOCAL_LIBS="" +LOCAL_RLIBS="" if test -z $HDF5HOME then @@ -53,6 +54,7 @@ else LOCAL_LIBS="" else LOCAL_LIBS="-L$HDF5HOME/lib" + LOCAL_RLIBS="-R$HDF5HOME/lib" fi fi @@ -79,8 +81,8 @@ fi if test "x$hdf5_ok" = "xyes" then HDF5_INCLUDES="$LOCAL_INCLUDES" - HDF5_LIBS="$LOCAL_LIBS -lhdf5" - HDF5_MT_LIBS="$LOCAL_LIBS -lhdf5" + HDF5_LIBS="$LOCAL_LIBS -lhdf5 $LOCAL_RLIBS" + HDF5_MT_LIBS="$LOCAL_LIBS -lhdf5 $LOCAL_RLIBS" fi AC_MSG_RESULT(for hdf5: $hdf5_ok) diff --git a/salome_adm/unix/config_files/check_omniorb.m4 b/salome_adm/unix/config_files/check_omniorb.m4 index f82428747..7818bc85f 100644 --- a/salome_adm/unix/config_files/check_omniorb.m4 +++ b/salome_adm/unix/config_files/check_omniorb.m4 @@ -17,7 +17,7 @@ AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_PATH_PROG(OMNIORB_IDL, omniidl) -if test "xOMNIORB_IDL" = "x" +if test "x$OMNIORB_IDL" = "x" then omniORB_ok=no AC_MSG_RESULT(omniORB binaries not in PATH variable) @@ -101,15 +101,15 @@ then fi -dnl omniORB_ok=yes - if test "x$omniORB_ok" = "xyes" then if test "x$OMNIORB_LIB" = "x/usr/lib" then OMNIORB_LDFLAGS="" + OMNIORB_RFLAGS="" else OMNIORB_LDFLAGS="-L$OMNIORB_LIB" + OMNIORB_RFLAGS="-R$OMNIORB_LIB" fi LIBS_old=$LIBS @@ -153,6 +153,7 @@ then OMNIORB_LIBS="$OMNIORB_LIBS -lCOS${OMNIORB_VERSION}" OMNIORB_LIBS="$OMNIORB_LIBS -lCOSDynamic${OMNIORB_VERSION}" OMNIORB_LIBS="$OMNIORB_LIBS -lomnithread" + OMNIORB_LIBS="$OMNIORB_LIBS ${OMNIORB_RFLAGS}" if test $OMNIORB_VERSION = 3 ; then OMNIORB_LIBS="$OMNIORB_LIBS -ltcpwrapGK" fi @@ -188,7 +189,7 @@ if test "x$omniORB_ok" = "xyes" then OMNIORB_IDLCXXFLAGS="-Wba -nf -I${OMNIORB_ROOT}/idl" - OMNIORB_IDLPYFLAGS_1='-bpython -p ${top_srcdir}/salome_adm/unix' + OMNIORB_IDLPYFLAGS_1='-bpython' OMNIORB_IDLPYFLAGS_2=" -I${OMNIORB_ROOT}/idl" OMNIORB_IDLPYFLAGS=${OMNIORB_IDLPYFLAGS_1}${OMNIORB_IDLPYFLAGS_2} diff --git a/salome_adm/unix/config_files/check_swig.m4 b/salome_adm/unix/config_files/check_swig.m4 index 019755067..08668fb56 100644 --- a/salome_adm/unix/config_files/check_swig.m4 +++ b/salome_adm/unix/config_files/check_swig.m4 @@ -24,6 +24,7 @@ AC_DEFUN([CHECK_SWIG],[ AC_REQUIRE([CHECK_PYTHON])dnl swig_ok=yes +numpy_ok=no AC_ARG_WITH(swig, [AC_HELP_STRING([--with-swig=EXEC],[swig executable])], @@ -59,7 +60,7 @@ fi numpydir=`$PYTHON -c "import numpy;print numpy.get_include()" 2>/dev/null` if test -d "$numpydir"; then - SWIG_FLAGS="$SWIG_FLAGS -DWITH_NUMPY" + numpy_ok=yes PYTHON_INCLUDES="$PYTHON_INCLUDES -I$numpydir" AC_DEFINE([WITH_NUMPY], [], [Python has numpy extension]) fi diff --git a/salome_adm/unix/make_common_starter.am b/salome_adm/unix/make_common_starter.am index 258e057af..f54d8f4f2 100644 --- a/salome_adm/unix/make_common_starter.am +++ b/salome_adm/unix/make_common_starter.am @@ -7,16 +7,19 @@ # # Standard directory for installation -salomeincludedir = $(includedir)/@PACKAGE@ -libdir = $(prefix)/lib@LIB_LOCATION_SUFFIX@/@PACKAGE@ -bindir = $(prefix)/bin/@PACKAGE@ +salomeincludedir = $(includedir)/salome +libdir = $(prefix)/lib@LIB_LOCATION_SUFFIX@/salome +bindir = $(prefix)/bin/salome salomescriptdir = $(bindir) +salomepythondir = $(pythondir)/salome +salomepyexecdir = $(pyexecdir)/salome + # Directory for installing idl files -salomeidldir = $(prefix)/idl/@PACKAGE@ +salomeidldir = $(prefix)/idl/salome # Directory for installing resource files -salomeresdir = $(prefix)/share/@PACKAGE@/resources/@MODULE_NAME@ +salomeresdir = $(prefix)/share/salome/resources/@MODULE_NAME@ # Directories for installing admin files salomeadmdir = $(prefix)/salome_adm @@ -25,7 +28,7 @@ salomem4dir = $(salomeadmdir)/unix/config_files salome4deprdir = $(salomeadmdir)/unix/config_files/DEPRECATED # Shared modules installation directory -sharedpkgpythondir =$(pkgpythondir)/shared_modules +sharedpkgpythondir =$(salomepythondir)/shared_modules # Documentation directory -docdir = $(datadir)/doc/@PACKAGE@ +docdir = $(datadir)/doc/salome diff --git a/src/Batch_SWIG/Makefile.am b/src/Batch_SWIG/Makefile.am index 71154d513..9fceccda1 100644 --- a/src/Batch_SWIG/Makefile.am +++ b/src/Batch_SWIG/Makefile.am @@ -55,8 +55,8 @@ BUILT_SOURCES = swig_wrap.cpp SWIG_FLAGS = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/../Batch SWIG_SOURCES = libBatch_Swig.i libBatch_Swig_exception.i libBatch_Swig_typemap.i -pkgpython_PYTHON = libBatch_Swig.py -pkgpyexec_LTLIBRARIES = _libBatch_Swig.la +salomepython_PYTHON = libBatch_Swig.py +salomepyexec_LTLIBRARIES = _libBatch_Swig.la _libBatch_Swig_la_SOURCES = $(BUILT_SOURCES) $(SWIG_SOURCES) _libBatch_Swig_la_CPPFLAGS = @PYTHON_INCLUDES@ -I$(srcdir) -I$(srcdir)/../Batch _libBatch_Swig_la_LDFLAGS = -module @@ -83,4 +83,4 @@ CLEANFILES = swig_wrap.cpp dist_salomescript_SCRIPTS = Batch_test.py # You don't need to specify libBatch_Swig.py. It is automatically -# installed by means of the swig target pkgpython_PYTHON. +# installed by means of the swig target salomepython_PYTHON. diff --git a/src/Communication_SWIG/Makefile.am b/src/Communication_SWIG/Makefile.am index 30907c8d4..9dd1946a5 100644 --- a/src/Communication_SWIG/Makefile.am +++ b/src/Communication_SWIG/Makefile.am @@ -56,8 +56,8 @@ SWIG_FLAGS = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/../Communication SWIG_SOURCES = libSALOME_Comm.i -pkgpython_PYTHON = libSALOME_Comm.py -pkgpyexec_LTLIBRARIES = _libSALOME_Comm.la +salomepython_PYTHON = libSALOME_Comm.py +salomepyexec_LTLIBRARIES = _libSALOME_Comm.la _libSALOME_Comm_la_SOURCES = $(BUILT_SOURCES) $(SWIG_SOURCES) _libSALOME_Comm_la_CPPFLAGS =\ @PYTHON_INCLUDES@ \ @@ -97,4 +97,4 @@ CLEANFILES = swig_wrap.cpp # (see LifeCycleCORBA_SWIG for an example) # It's not needed to specify libSALOME_Comm.py. It is -# automaticaly installed through the swig target pkgpython_PYTHON. +# automaticaly installed through the swig target salomepython_PYTHON. diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index 2f5692fdc..ea1c23c11 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -336,8 +336,8 @@ Engines_Container_i::load_component_Library(const char* componentName) _numInstanceMutex.lock(); // lock to be alone // (see decInstanceCnt, finalize_removal)) - if (_toRemove_map[impl_name]) _toRemove_map.erase(impl_name); - if (_library_map[impl_name]) + if (_toRemove_map.count(impl_name) != 0) _toRemove_map.erase(impl_name); + if (_library_map.count(impl_name) != 0) { MESSAGE("Library " << impl_name << " already loaded"); _numInstanceMutex.unlock(); @@ -358,13 +358,6 @@ Engines_Container_i::load_component_Library(const char* componentName) _numInstanceMutex.unlock(); return true; } - else - { - INFOS( "Can't load shared library: " << impl_name ); -#ifndef WNT - INFOS("error dlopen: " << dlerror()); -#endif - } _numInstanceMutex.unlock(); // --- try import Python component @@ -375,7 +368,7 @@ Engines_Container_i::load_component_Library(const char* componentName) INFOS("Supervision Container does not support Python Component Engines"); return false; } - if (_library_map[aCompName]) + if (_library_map.count(aCompName) != 0) { return true; // Python Component, already imported } @@ -389,6 +382,7 @@ Engines_Container_i::load_component_Library(const char* componentName) "import_component", "s",componentName); int ret= PyInt_AsLong(result); + Py_XDECREF(result); SCRUTE(ret); Py_RELEASE_NEW_THREAD; @@ -401,6 +395,9 @@ Engines_Container_i::load_component_Library(const char* componentName) return true; } } + INFOS( "Impossible to load component: " << componentName ); + INFOS( "Can't load shared library: " << impl_name ); + INFOS( "Can't import Python module: " << componentName ); return false; } @@ -429,7 +426,7 @@ Engines_Container_i::create_component_instance(const char*genericRegisterName, Engines::Component_var iobject = Engines::Component::_nil() ; string aCompName = genericRegisterName; - if (_library_map[aCompName]) // Python component + if (_library_map.count(aCompName) != 0) // Python component { if (_isSupervContainer) { @@ -478,14 +475,14 @@ Engines_Container_i::create_component_instance(const char*genericRegisterName, #else string impl_name = genericRegisterName +string("Engine.dll"); #endif - void* handle = _library_map[impl_name]; - if ( !handle ) + if (_library_map.count(impl_name) == 0) { - INFOS("shared library " << impl_name <<"must be loaded before instance"); + INFOS("shared library " << impl_name <<" must be loaded before creating instance"); return Engines::Component::_nil() ; } else { + void* handle = _library_map[impl_name]; iobject = createInstance(genericRegisterName, handle, studyId); @@ -735,16 +732,16 @@ Engines_Container_i::find_or_create_instance(string genericRegisterName, { string aGenRegisterName = genericRegisterName; string impl_name = componentLibraryName; - void* handle = _library_map[impl_name]; - if ( !handle ) + if (_library_map.count(impl_name) == 0) { - INFOS("shared library " << impl_name <<"must be loaded before instance"); + INFOS("shared library " << impl_name <<" must be loaded before creating instance"); return Engines::Component::_nil() ; } else { // --- find a registered instance in naming service, or create + void* handle = _library_map[impl_name]; string component_registerBase = _containerName + "/" + aGenRegisterName; Engines::Component_var iobject = Engines::Component::_nil() ; diff --git a/src/Container/Makefile.am b/src/Container/Makefile.am index 409e9e0bb..a7cbd05da 100644 --- a/src/Container/Makefile.am +++ b/src/Container/Makefile.am @@ -91,9 +91,8 @@ COMMON_LIBS =\ ../Batch/libSalomeBatch.la \ $(top_builddir)/idl/libSalomeIDLKernel.la\ @MPI_LIBS@ \ - @CORBA_LIBS@ - -# @PYTHON_LIBS@ + @CORBA_LIBS@ \ + $(PYTHON_LIBS) # # =============================================================== @@ -118,7 +117,6 @@ libSalomeContainer_la_LDFLAGS =\ @LDEXPDYNFLAGS@ libSalomeContainer_la_LIBADD =\ - $(PYTHON_LIBS) \ $(COMMON_LIBS) if WITH_PACO_PARALLEL @@ -141,11 +139,12 @@ SALOME_Container_SOURCES =\ SALOME_Container_CPPFLAGS =\ $(COMMON_CPPFLAGS) -SALOME_Container_LDADD =\ +SALOME_Container_LDADD = \ libSalomeContainer.la \ - $(COMMON_LIBS) \ - ../Basics/libSALOMEBasics.la \ - ../Batch/libSalomeBatch.la + $(HDF5_LIBS) \ + $(MPI_LIBS) \ + $(CORBA_LIBS) \ + $(PYTHON_LIBS) SALOME_Container_LDFLAGS =\ -Xlinker -export-dynamic @@ -158,5 +157,7 @@ TestSalome_file_CPPFLAGS =\ TestSalome_file_LDADD =\ libSalomeContainer.la \ - $(COMMON_LIBS) \ - ../Basics/libSALOMEBasics.la + $(HDF5_LIBS) \ + $(MPI_LIBS) \ + $(CORBA_LIBS) \ + $(PYTHON_LIBS) diff --git a/src/Container/SALOME_ContainerPy.py b/src/Container/SALOME_ContainerPy.py index 843fa794f..1694bc79d 100755 --- a/src/Container/SALOME_ContainerPy.py +++ b/src/Container/SALOME_ContainerPy.py @@ -141,10 +141,10 @@ class SALOME_ContainerPy_i (Engines__POA.Container): self._numInstance = self._numInstance +1 instanceName = nameToRegister + "_inst_" + `self._numInstance` - component=__import__(componentName) - factory=getattr(component,componentName) - comp_i=factory(self._orb, self._poa, self._this(), self._containerName, - instanceName, nameToRegister) + component=__import__(componentName) + factory=getattr(component,componentName) + comp_i=factory(self._orb, self._poa, self._this(), self._containerName, + instanceName, nameToRegister) MESSAGE( "SALOME_ContainerPy_i::instance : component created") comp_o = comp_i._this() @@ -172,7 +172,7 @@ class SALOME_ContainerPy_i (Engines__POA.Container): ret=0 try: if verbose(): print "try import ",componentName - __import__(componentName) + module=__import__(componentName) if verbose(): print "import ",componentName," successful" ret=1 except: diff --git a/src/DF/Makefile.am b/src/DF/Makefile.am index 00dabed07..f06c02a41 100644 --- a/src/DF/Makefile.am +++ b/src/DF/Makefile.am @@ -51,15 +51,10 @@ COMMON_CPPFLAGS=\ @HDF5_INCLUDES@ \ @BOOST_CPPFLAGS@ -# This flag is used to resolve the dependencies of OCC libraries. -LDXMUFLAGS = -L/usr/X11R6/lib@LIB_LOCATION_SUFFIX@ -lXmu - # This local variable defines the list of dependant libraries common to all target in this package. COMMON_LIBS =\ ../HDFPersist/libSalomeHDFPersist.la \ - @HDF5_LIBS@ \ - $(LDXMUFLAGS) - + @HDF5_LIBS@ # # =============================================================== @@ -95,5 +90,6 @@ libDF_la_LIBADD = $(COMMON_LIBS) bin_PROGRAMS = testDF testDF_SOURCES = testDF.cxx testDF_CPPFLAGS = $(COMMON_CPPFLAGS) -testDF_LDADD = libDF.la $(COMMON_LIBS) +testDF_LDADD = ./libDF.la \ + $(HDF5_LIBS) diff --git a/src/DSC/DSC_Python/Makefile.am b/src/DSC/DSC_Python/Makefile.am index a40629e79..d4f0d8e69 100644 --- a/src/DSC/DSC_Python/Makefile.am +++ b/src/DSC/DSC_Python/Makefile.am @@ -57,9 +57,9 @@ COMMON_LIBS = @CORBA_LIBS@ # AM_CFLAGS = -fexceptions -pkgpython_PYTHON = calcium.py dsccalcium.py -pkgpyexec_LTLIBRARIES = _calcium.la -MY_SWIG_FLAGS= $(SWIG_FLAGS) -noexcept +salomepython_PYTHON = calcium.py dsccalcium.py +salomepyexec_LTLIBRARIES = _calcium.la +MY_SWIG_FLAGS= $(SWIG_FLAGS) -noexcept -I$(top_srcdir)/src/DSC/DSC_User/Datastream/Calcium SWIG_SRC=calcium.i _calcium_la_SOURCES = calcium_wrap.cpp _calcium_la_LDFLAGS = -module @@ -72,6 +72,8 @@ _calcium_la_LIBADD = ../DSC_User/Datastream/Calcium/libCalciumC.la \ _calcium_la_CXXFLAGS = $(PYTHON_INCLUDES) $(COMMON_CPPFLAGS) +EXTRA_DIST=calcium_wrap.cpp calcium.i + calcium_wrap.cpp calcium.py:calcium.i $(SWIG) $(MY_SWIG_FLAGS) -o calcium_wrap.cpp $< diff --git a/src/DSC/DSC_Python/calcium.i b/src/DSC/DSC_Python/calcium.i index 3d093153c..0deafca80 100644 --- a/src/DSC/DSC_Python/calcium.i +++ b/src/DSC/DSC_Python/calcium.i @@ -5,7 +5,7 @@ %module(docstring=DOCSTRING) calcium -%feature("autodoc", "0"); +%feature("autodoc", "1"); %{ //C++ Includes @@ -30,13 +30,19 @@ struct omniORBpyAPI { // Raises BAD_PARAM if the Python object is not an object reference. // If is true, caller holds the Python interpreter lock. - - omniORBpyAPI(); - // Constructor for the singleton. Sets up the function pointers. + PyObject* (*handleCxxSystemException)(const CORBA::SystemException& ex); + // Sets the Python exception state to reflect the given C++ system + // exception. Always returns NULL. The caller must hold the Python + // interpreter lock. }; omniORBpyAPI* api; +#define OMNIPY_CATCH_AND_HANDLE_SYSTEM_EXCEPTIONS \ +catch (const CORBA::SystemException& ex) { \ + return api->handleCxxSystemException(ex); \ +} + %} %init @@ -59,13 +65,13 @@ struct omniORBpyAPI { Py_DECREF(pyapi); %} +%include %include "carrays.i" %array_class(int, intArray); %array_class(float, floatArray); %array_class(double, doubleArray); -#ifdef WITH_NUMPY /* * Most of this code is borrowed from numpy distribution * The following code originally appeared in enthought/kiva/agg/src/numeric.i, @@ -76,8 +82,12 @@ struct omniORBpyAPI { %{ +#ifdef WITH_NUMPY +/* With Numpy */ #include +typedef PyArrayObject ArrayObject; + /* Macros to extract array attributes. */ #define is_array(a) ((a) && PyArray_Check((PyArrayObject *)a)) @@ -320,18 +330,32 @@ int require_size(PyArrayObject* ary, int* size, int n) { return success; } +#else +/* Without Numpy */ +typedef PyObject ArrayObject; + +#endif %} -/* input typemap */ +/* input typemap + This typemap can be used for input array objects only. + It accepts swig carray objects or numpy contiguous or non contiguous objects. + In case of non-contiguous numpy object, it is converted (new object) into a contiguous numpy object + This new object is deleted after the call. +*/ %define TYPEMAP_IN3(type,typecode) %typemap(in) type* IN_ARRAY3 - (PyArrayObject* array=NULL, int is_new_object) { + (ArrayObject* array=NULL, int is_new_object) { int size[1] = {-1}; if ((SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor,0)) == -1) { +%#ifdef WITH_NUMPY array = obj_to_array_contiguous_allow_conversion($input, typecode, &is_new_object); if (!array || !require_dimensions(array,1) || !require_size(array,size,1)) SWIG_fail; $1 = (type*) array->data; +%#else + SWIG_exception(SWIG_TypeError, "type* expected"); +%#endif } } %typemap(freearg) type* IN_ARRAY3 { @@ -345,19 +369,26 @@ TYPEMAP_IN3(double, PyArray_DOUBLE) #undef TYPEMAP_IN3 -%apply int* IN_ARRAY3 {int *val}; -%apply float* IN_ARRAY3 {float *val}; -%apply double* IN_ARRAY3 {double *val}; +%apply int* IN_ARRAY3 {int *eval}; +%apply float* IN_ARRAY3 {float *eval}; +%apply double* IN_ARRAY3 {double *eval}; -/* inplace typemaps */ +/* inplace typemaps + This typemap can be used for input/output array objects. + It accepts swig carray objects or numpy contiguous objects. +*/ %define TYPEMAP_INPLACE3(type,typecode) -%typemap(in) type* INPLACE_ARRAY3 (PyArrayObject* temp=NULL) { +%typemap(in) type* INPLACE_ARRAY3 (ArrayObject* temp=NULL) { if ((SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor,0)) == -1) { +%#ifdef WITH_NUMPY temp = obj_to_array_no_conversion($input,typecode); if (!temp || !require_contiguous(temp)) SWIG_fail; $1 = (type*) temp->data; +%#else + SWIG_exception(SWIG_TypeError, "type* expected"); +%#endif } } %enddef @@ -372,7 +403,6 @@ TYPEMAP_INPLACE3(double, PyArray_DOUBLE) %apply float* INPLACE_ARRAY3 {float *lval}; %apply double* INPLACE_ARRAY3 {double *lval}; -#endif %typemap(in) CORBA::Boolean { @@ -435,16 +465,29 @@ TYPEMAP_INPLACE3(double, PyArray_DOUBLE) %exception { try { $action - } catch(Engines::DSC::PortNotDefined& _e) { + } + catch(Engines::DSC::PortNotDefined& _e) { PyErr_SetString(PyExc_ValueError,"Port not defined"); return NULL; - } catch(Engines::DSC::PortNotConnected& _e) { + } + catch(Engines::DSC::PortNotConnected& _e) { PyErr_SetString(PyExc_ValueError,"Port not connected"); return NULL; - } catch(Engines::DSC::BadPortType& _e) { + } + catch(Engines::DSC::BadPortType& _e) { PyErr_SetString(PyExc_ValueError,"Bad port type"); return NULL; - } catch(...) { + } + catch (SALOME_Exception &e) { + PyErr_SetString(PyExc_RuntimeError,e.what()); + return NULL; + } + catch (SALOME::SALOME_Exception &e) { + PyErr_SetString(PyExc_RuntimeError,e.details.text); + return NULL; + } + OMNIPY_CATCH_AND_HANDLE_SYSTEM_EXCEPTIONS + catch(...) { PyErr_SetString(PyExc_ValueError,"Unknown exception"); return NULL; } @@ -541,25 +584,22 @@ class PySupervCompo:public Superv_Component_i extern "C" void create_calcium_port(Superv_Component_i* compo,char* name,char* type,char *mode,char* depend); -#define CP_TEMPS 40 -#define CP_ITERATION 41 -#define CP_SEQUENTIEL 42 -#define CP_CONT 20 -#define CP_ARRET 21 +%ignore CPMESSAGE; +%include "calciumP.h" -int cp_cd(void *component,char *name); +int cp_cd(Superv_Component_i *component,char *name); -int cp_een(void *component,int dep,float t,int n,char *nom,int nval,int *eval); -int cp_edb(void *component,int dep,double t,int n,char *nom,int nval,double *eval); -int cp_ere(void *component,int dep,float t,int n,char *nom,int nval,float *eval); -int cp_ecp(void *component,int dep,float t,int n,char *nom,int nval,float *eval); -int cp_elo(void *component,int dep,float t,int n,char *nom,int nval,int *eval); +int cp_een(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,int *eval); +int cp_edb(Superv_Component_i *component,int dep,double t,int n,char *nom,int nval,double *eval); +int cp_ere(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,float *eval); +int cp_ecp(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,float *eval); +int cp_elo(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,int *eval); -int cp_len(void *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,int *lval); -int cp_ldb(void *component,int dep,double *ti,double *tf,int *niter,char *nom,int nmax,int *nval,double *lval); -int cp_lre(void *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,float *lval); -int cp_lcp(void *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,float *lval); -int cp_llo(void *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,int *lval); +int cp_len(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,int *lval); +int cp_ldb(Superv_Component_i *component,int dep,double *ti,double *tf,int *niter,char *nom,int nmax,int *nval,double *lval); +int cp_lre(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,float *lval); +int cp_lcp(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,float *lval); +int cp_llo(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,int *lval); -int cp_fin(void *component,int cp_end); +int cp_fin(Superv_Component_i *component,int cp_end); diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumInterface.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumInterface.hxx index 71f157f16..8e8453c95 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumInterface.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumInterface.hxx @@ -224,7 +224,7 @@ namespace CalciumInterface { ( dependencyType != CalciumTypes::SEQUENCE_DEPENDENCY ) ) throw CalciumException(CalciumTypes::CPITVR, LOC(OSS()<<"Le mode de dépendance de la variable " - << nomVar << " ne correspond pas au mode demandé.")); + << nomVar << ": " << portDependencyType << " ne correspond pas au mode demandé: " << dependencyType)); if ( dependencyType == CalciumTypes::TIME_DEPENDENCY ) { diff --git a/src/DSC/DSC_User/Datastream/Calcium/Makefile.am b/src/DSC/DSC_User/Datastream/Calcium/Makefile.am index 6f829cd01..f3d3fffb4 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/Makefile.am +++ b/src/DSC/DSC_User/Datastream/Calcium/Makefile.am @@ -58,6 +58,8 @@ salomeinclude_HEADERS = calcium_port_factory.hxx \ calciumP.h \ version.h \ calcium.hf + +EXTRA_DIST=fortoc.h # # =============================================================== # Local definitions diff --git a/src/DSC/DSC_User/Makefile.am b/src/DSC/DSC_User/Makefile.am index 42c20a9c3..7db5294da 100644 --- a/src/DSC/DSC_User/Makefile.am +++ b/src/DSC/DSC_User/Makefile.am @@ -91,6 +91,7 @@ test_DSC_Exception_SOURCES = test_DSC_Exception.cxx test_DSC_Exception_CXXFLAGS = $(COMMON_CPPFLAGS) -test_DSC_Exception_LDADD = $(top_builddir)/src/Utils/libOpUtil.la +test_DSC_Exception_LDADD = $(top_builddir)/src/Utils/libOpUtil.la \ + $(CORBA_LIBS) SUBDIRS = Basic Datastream diff --git a/src/KERNEL_PY/Makefile.am b/src/KERNEL_PY/Makefile.am index bd5ab0a86..3b4e96641 100755 --- a/src/KERNEL_PY/Makefile.am +++ b/src/KERNEL_PY/Makefile.am @@ -25,8 +25,8 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am -# Scripts to be installed (pkgpython is an automake keyword for python targets) -pkgpython_PYTHON = \ +# Scripts to be installed (salomepython is an automake keyword for python targets) +salomepython_PYTHON = \ Help.py \ PyInterp.py \ salome.py \ diff --git a/src/Launcher/Makefile.am b/src/Launcher/Makefile.am index b0323d754..a78dc3edb 100644 --- a/src/Launcher/Makefile.am +++ b/src/Launcher/Makefile.am @@ -84,12 +84,11 @@ COMMON_LIBS =\ ../SALOMELocalTrace/libSALOMELocalTrace.la \ ../Basics/libSALOMEBasics.la \ ../Batch/libSalomeBatch.la \ - $(top_builddir)/idl/libSalomeIDLKernel.la\ + $(top_builddir)/idl/libSalomeIDLKernel.la \ @MPI_LIBS@ \ - @CORBA_LIBS@ - @LIBXML_LIBS@ - -# @PYTHON_LIBS@ + @CORBA_LIBS@ \ + @LIBXML_LIBS@ \ + @PYTHON_LIBS@ # # =============================================================== @@ -113,7 +112,6 @@ libSalomeLauncher_la_LDFLAGS =\ @LDEXPDYNFLAGS@ libSalomeLauncher_la_LIBADD =\ - $(PYTHON_LIBS) \ $(COMMON_LIBS) @@ -132,8 +130,9 @@ SALOME_LauncherServer_CPPFLAGS=\ SALOME_LauncherServer_LDADD =\ libSalomeLauncher.la \ - $(COMMON_LIBS) \ - ../Basics/libSALOMEBasics.la \ - ../Batch/libSalomeBatch.la + $(MPI_LIBS) \ + $(CORBA_LIBS) \ + $(LIBXML_LIBS) \ + $(PYTHON_LIBS) diff --git a/src/LifeCycleCORBA_SWIG/Makefile.am b/src/LifeCycleCORBA_SWIG/Makefile.am index b6e9dbebb..60f4b8305 100644 --- a/src/LifeCycleCORBA_SWIG/Makefile.am +++ b/src/LifeCycleCORBA_SWIG/Makefile.am @@ -55,8 +55,8 @@ BUILT_SOURCES = swig_wrap.cpp SWIG_FLAGS = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/../LifeCycleCORBA -I$(srcdir)/../Utils SWIG_SOURCES = libSALOME_LifeCycleCORBA.i -pkgpython_PYTHON = libSALOME_LifeCycleCORBA.py -pkgpyexec_LTLIBRARIES = _libSALOME_LifeCycleCORBA.la +salomepython_PYTHON = libSALOME_LifeCycleCORBA.py +salomepyexec_LTLIBRARIES = _libSALOME_LifeCycleCORBA.la _libSALOME_LifeCycleCORBA_la_SOURCES = $(BUILT_SOURCES) $(SWIG_SOURCES) _libSALOME_LifeCycleCORBA_la_CPPFLAGS =\ @PYTHON_INCLUDES@ \ @@ -93,4 +93,4 @@ dist_salomescript_DATA =\ TestLifeCycleCORBA.py # It's not needed to specify libSALOME_LifeCycleCORBA.py. It is -# automaticaly installed through the swig target pkgpython_PYTHON. +# automaticaly installed through the swig target salomepython_PYTHON. diff --git a/src/ModuleCatalog/Makefile.am b/src/ModuleCatalog/Makefile.am index 83f138d3d..45dd39b49 100644 --- a/src/ModuleCatalog/Makefile.am +++ b/src/ModuleCatalog/Makefile.am @@ -103,7 +103,6 @@ SALOME_ModuleCatalog_Server_CPPFLAGS =\ SALOME_ModuleCatalog_Server_LDADD =\ libSalomeCatalog.la \ - $(COMMON_LIBS) \ @CORBA_LIBS@ # SALOME_ModuleCatalog_Client @@ -113,5 +112,4 @@ SALOME_ModuleCatalog_Client_CPPFLAGS =\ SALOME_ModuleCatalog_Client_LDADD =\ libSalomeCatalog.la \ - $(COMMON_LIBS) \ @CORBA_LIBS@ diff --git a/src/NOTIFICATION_SWIG/Makefile.am b/src/NOTIFICATION_SWIG/Makefile.am index 42f570e11..59f355d4b 100644 --- a/src/NOTIFICATION_SWIG/Makefile.am +++ b/src/NOTIFICATION_SWIG/Makefile.am @@ -40,8 +40,8 @@ BUILT_SOURCES = swig_wrap.cpp SWIG_FLAGS = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/../Notification SWIG_SOURCES = NOTIFICATION.i -pkgpython_PYTHON = libNOTIFICATION.py -pkgpyexec_LTLIBRARIES = _libNOTIFICATION.la +salomepython_PYTHON = libNOTIFICATION.py +salomepyexec_LTLIBRARIES = _libNOTIFICATION.la _libNOTIFICATION_la_SOURCES = $(BUILT_SOURCES) $(SWIG_SOURCES) \ NOTIFICATION_Swig.cxx NOTIFICATION_Swig.hxx SALOME_NOTIFICATION_SWIG.hxx _libNOTIFICATION_la_CPPFLAGS =\ diff --git a/src/SALOMEDS/Makefile.am b/src/SALOMEDS/Makefile.am index 0d9bac30a..37686d204 100644 --- a/src/SALOMEDS/Makefile.am +++ b/src/SALOMEDS/Makefile.am @@ -71,9 +71,6 @@ COMMON_CPPFLAGS=\ -I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ -# This flag is used to resolve the dependencies of OCC libraries. -LDXMUFLAGS = -L/usr/X11R6/lib@LIB_LOCATION_SUFFIX@ -lXmu - # This local variable defines the list of dependant libraries common to all target in this package. COMMON_LIBS =\ ../TOOLSDS/libTOOLSDS.la \ @@ -87,8 +84,7 @@ COMMON_LIBS =\ ../GenericObj/libSalomeGenericObj.la \ ../LifeCycleCORBA/libSalomeLifeCycleCORBA.la \ $(top_builddir)/idl/libSalomeIDLKernel.la\ - @HDF5_LIBS@ \ - $(LDXMUFLAGS) + @HDF5_LIBS@ #LDFLAGS+= -lSalomeGenericObj -lSalomeLifeCycleCORBA @@ -288,8 +284,10 @@ bin_PROGRAMS = SALOMEDS_Server SALOMEDS_Client SALOMEDS_Server_SOURCES = SALOMEDS_Server.cxx SALOMEDS_Server_CPPFLAGS = $(COMMON_CPPFLAGS) -SALOMEDS_Server_LDADD = libSalomeDS.la +SALOMEDS_Server_LDADD = libSalomeDS.la \ + $(HDF5_LIBS) $(CORBA_LIBS) SALOMEDS_Client_SOURCES = SALOMEDS_Client.cxx SALOMEDS_Client_CPPFLAGS = $(COMMON_CPPFLAGS) -SALOMEDS_Client_LDADD = libSalomeDS.la +SALOMEDS_Client_LDADD = libSalomeDS.la \ + $(HDF5_LIBS) $(CORBA_LIBS) diff --git a/src/SALOMEDS/Test/Makefile.am b/src/SALOMEDS/Test/Makefile.am index 79200aafc..7c765fa9f 100644 --- a/src/SALOMEDS/Test/Makefile.am +++ b/src/SALOMEDS/Test/Makefile.am @@ -144,4 +144,5 @@ EXTRA_DIST = \ bin_PROGRAMS = TestSALOMEDS dist_TestSALOMEDS_SOURCES = TestSALOMEDS.cxx TestSALOMEDS_CPPFLAGS = $(COMMON_CPPFLAGS) -TestSALOMEDS_LDADD = libSALOMEDSTest.la +TestSALOMEDS_LDADD = libSALOMEDSTest.la \ + $(CORBA_LIBS) diff --git a/src/SALOMEDSImpl/Makefile.am b/src/SALOMEDSImpl/Makefile.am index f1b3c72db..4ca4e58ab 100644 --- a/src/SALOMEDSImpl/Makefile.am +++ b/src/SALOMEDSImpl/Makefile.am @@ -92,15 +92,11 @@ COMMON_CPPFLAGS=\ @HDF5_INCLUDES@ \ @BOOST_CPPFLAGS@ -# This flag is used to resolve the dependencies of OCC libraries. -LDXMUFLAGS = -L/usr/X11R6/lib@LIB_LOCATION_SUFFIX@ -lXmu - # This local variable defines the list of dependant libraries common to all target in this package. COMMON_LIBS =\ ../HDFPersist/libSalomeHDFPersist.la \ ../DF/libDF.la \ - @HDF5_LIBS@ \ - $(LDXMUFLAGS) + @HDF5_LIBS@ # @@ -218,4 +214,5 @@ libSalomeDSImpl_la_LIBADD = $(COMMON_LIBS) bin_PROGRAMS = testDS testDS_SOURCES = testDS.cxx testDS_CPPFLAGS = $(COMMON_CPPFLAGS) -testDS_LDADD = libSalomeDSImpl.la $(COMMON_LIBS) +testDS_LDADD = libSalomeDSImpl.la \ + $(HDF5_LIBS) diff --git a/src/TestContainer/Makefile.am b/src/TestContainer/Makefile.am index bca922255..8101d8b2a 100644 --- a/src/TestContainer/Makefile.am +++ b/src/TestContainer/Makefile.am @@ -97,8 +97,10 @@ libSalomeTestComponentEngine_la_LIBADD = $(COMMON_LIBS) bin_PROGRAMS = TestContainer TestLogger TestContainer_SOURCES = TestContainer.cxx TestContainer_CPPFLAGS = $(COMMON_CPPFLAGS) -TestContainer_LDADD = libSalomeTestComponentEngine.la +TestContainer_LDADD = libSalomeTestComponentEngine.la \ + $(CORBA_LIBS) TestLogger_SOURCES = TestLogger.cxx TestLogger_CPPFLAGS = $(COMMON_CPPFLAGS) -TestLogger_LDADD = libSalomeTestComponentEngine.la +TestLogger_LDADD = libSalomeTestComponentEngine.la \ + $(CORBA_LIBS) diff --git a/src/Utils/Makefile.am b/src/Utils/Makefile.am index f0c0dd785..5b3c3a37a 100644 --- a/src/Utils/Makefile.am +++ b/src/Utils/Makefile.am @@ -71,7 +71,7 @@ libOpUtil_la_CPPFLAGS = \ libOpUtil_la_LIBADD = \ ../SALOMELocalTrace/libSALOMELocalTrace.la \ - $(top_builddir)/idl/libSalomeIDLKernel.la\ + $(top_builddir)/idl/libSalomeIDLKernel.la \ @CORBA_LIBS@ diff --git a/src/Utils/Test/Makefile.am b/src/Utils/Test/Makefile.am index 682b4b417..4bcdb9b64 100644 --- a/src/Utils/Test/Makefile.am +++ b/src/Utils/Test/Makefile.am @@ -84,5 +84,5 @@ libUtilsTest_la_LIBADD = $(COMMON_LIBS) bin_PROGRAMS = TestUtils TestUtils_SOURCES = TestUtils.cxx TestUtils_CPPFLAGS = $(COMMON_CPPFLAGS) -TestUtils_LDADD = libUtilsTest.la $(COMMON_LIBS) +TestUtils_LDADD = libUtilsTest.la $(CORBA_LIBS) diff --git a/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx b/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx index c48e4afd9..d429d0daa 100644 --- a/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx +++ b/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx @@ -111,9 +111,10 @@ public : virtual void operator()(void){ typedef PortableServer::ServantBase TServant; if(_PtrObjet){ - if(TServant* aServant = dynamic_cast(_PtrObjet)){ - std::cerr << "WARNING: automatic destruction for servant is no more used. It's too late in exit. Use explicit call" << std::endl; + if(dynamic_cast(_PtrObjet)){ + // std::cerr << "WARNING: automatic destruction for servant is no more used. It's too late in exit. Use explicit call" << std::endl; /* + if(TServant* aServant = dynamic_cast(_PtrObjet)){ PortableServer::POA_var aPOA = aServant->_default_POA(); PortableServer::ObjectId_var anObjectId = aPOA->servant_to_id(aServant); aPOA->deactivate_object(anObjectId.in()); diff --git a/src/Utils/Utils_ORB_INIT.cxx b/src/Utils/Utils_ORB_INIT.cxx index e2649a580..7d7370e71 100644 --- a/src/Utils/Utils_ORB_INIT.cxx +++ b/src/Utils/Utils_ORB_INIT.cxx @@ -40,7 +40,7 @@ ORB_INIT::~ORB_INIT() { if ( ! CORBA::is_nil( _orb ) ) { - std::cerr << "WARNING: orb destroy is no more called at exit. Use explicit call." << std::endl; + MESSAGE("WARNING: orb destroy is no more called at exit. Use explicit call."); //std::cerr << "appel _orb->destroy()" << std::endl; /* try {