From bf40adef1f6eeae83c9bbcf68241478eacee7943 Mon Sep 17 00:00:00 2001 From: boulant Date: Thu, 8 Dec 2005 15:42:37 +0000 Subject: [PATCH] =?utf8?q?Compl=C3=A9tude=20passage=20automake:=20-=20bin?= =?utf8?q?=20-=20resources=20-=20idl=20-=20salome=5Fadm=20Et=20amorce=20de?= =?utf8?q?=20prise=20en=20charge=20des=20Test=20unitaire?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Makefile.am | 3 +- clean_configure | 3 +- configure.ac | 15 ++-- idl/Makefile.am | 16 ++++ salome_adm/Makefile.am | 1 + salome_adm/Makefile.in | 47 ------------ salome_adm/unix/Makefile.am | 18 +++++ salome_adm/unix/config_files/Makefile.am | 58 +++++++++++++++ salome_adm/unix/make_common_starter.am | 22 ++++-- src/Basics/Makefile.am | 2 + src/Basics/Test/{Makefile.in => Makefile.am} | 46 +++--------- src/Makefile.am | 16 ++++ src/Notification/Makefile.am | 9 ++- src/SALOMELocalTrace/Makefile.am | 2 + src/SALOMELocalTrace/Test/Makefile.am | 78 ++++++++++++++++++++ src/SALOMELocalTrace/Test/Makefile.in | 62 ---------------- src/SALOMETraceCollector/Makefile.am | 3 +- 17 files changed, 237 insertions(+), 164 deletions(-) create mode 100644 salome_adm/Makefile.am delete mode 100644 salome_adm/Makefile.in create mode 100644 salome_adm/unix/Makefile.am create mode 100644 salome_adm/unix/config_files/Makefile.am rename src/Basics/Test/{Makefile.in => Makefile.am} (68%) create mode 100644 src/SALOMELocalTrace/Test/Makefile.am delete mode 100644 src/SALOMELocalTrace/Test/Makefile.in diff --git a/Makefile.am b/Makefile.am index 4a3aa98ac..e8e12ba23 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,5 +5,6 @@ # $Header$ # -SUBDIRS = idl src doc salome_adm +#SUBDIRS = idl src doc salome_adm bin resources +SUBDIRS = idl src diff --git a/clean_configure b/clean_configure index 8211475dc..29b9cd0bc 100755 --- a/clean_configure +++ b/clean_configure @@ -11,5 +11,6 @@ cd $libdir # Files created by libtoolize rm -f config.guess config.sub ltmain.sh # Files created by automake -rm -rf install-sh missing +rm -rf install-sh missing compile depcomp py-compile cd $here +find src -name Makefile.in | grep -v '/Test/' | xargs rm diff --git a/configure.ac b/configure.ac index 7d23142f8..5939ed13e 100644 --- a/configure.ac +++ b/configure.ac @@ -258,7 +258,7 @@ echo ---------------------------------------------- echo testing CPPUNIT only required for unit testing echo ---------------------------------------------- echo - +AM_CONDITIONAL(CPPUNIT_IS_OK, [test x"$cppunit_ok" = xyes]) CHECK_CPPUNIT echo @@ -370,12 +370,6 @@ else AC_SUBST(SETX) SETX="set -x" fi -# make other build directories -for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources idl -do - $INSTALL -d $rep -done - echo echo --------------------------------------------- echo copying resource files, shell scripts, and @@ -423,8 +417,11 @@ AC_OUTPUT([ \ ./salome_adm/unix/make_conclude \ ./salome_adm/unix/make_module \ ./salome_adm/Makefile \ + ./salome_adm/unix/Makefile \ + ./salome_adm/unix/config_files/Makefile \ ./Makefile \ - ./bin/salome/runIDLparser \ + ./bin/Makefile \ + ./bin/runIDLparser \ ./doc/Makefile \ ./doc/salome/Makefile \ ./doc/salome/DevelopersGuide/DevelopersGuide.tex \ @@ -432,7 +429,7 @@ AC_OUTPUT([ \ ./doc/salome/gui/Makefile \ ./doc/salome/tui/Makefile \ ./idl/Makefile \ - ./resources/Plugin \ + ./resources/Makefile \ ./src/Makefile \ ./src/Basics/Makefile \ ./src/Basics/Test/Makefile \ diff --git a/idl/Makefile.am b/idl/Makefile.am index 7ec84f5cd..e0acf6aba 100644 --- a/idl/Makefile.am +++ b/idl/Makefile.am @@ -6,6 +6,8 @@ # package and then is not manage here. # +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + IDL_FILES = \ SALOME_Exception.idl \ SALOME_Comm.idl \ @@ -24,6 +26,8 @@ IDL_FILES = \ SALOME_GenericObj.idl \ SALOME_TestModuleCatalog.idl +# This variable defines the files to be installed +salomeidl_DATA = $(IDL_FILES) # These variables defines the file extentions for clt and srv CORBA # files generated from the IDL files. @@ -40,6 +44,8 @@ OMNIORB_IDL = @OMNIORB_IDL@ OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@ OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_builddir)/salome/idl IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_builddir)/salome/idl +IDLPYFLAGS = @IDLPYFLAGS@ + # Target for generating the stub from the IDL files. The stubs are # created in the current build directory. @@ -48,3 +54,13 @@ IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_builddir)/salome/idl all: $(IDL_FILES:%.idl=%$(OMNIORB_IDL_CLN_CXX)) $(IDL_FILES:%.idl=%$(OMNIORB_IDL_CLN_H)) + +# This target overload the standard definition of install. The target +# install-pyidl is added to process python corba stubs for SALOME. +install: install-am install-pyidl + +install-pyidl: $(IDL_FILES:%=$(top_srcdir)/idl/%) + $(INSTALL) -d $(pkgpythondir) + ls $^ | while read file; do \ + $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(pkgpythondir) $$file ; \ + done diff --git a/salome_adm/Makefile.am b/salome_adm/Makefile.am new file mode 100644 index 000000000..17e24c797 --- /dev/null +++ b/salome_adm/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = unix diff --git a/salome_adm/Makefile.in b/salome_adm/Makefile.in deleted file mode 100644 index 4dfafb94b..000000000 --- a/salome_adm/Makefile.in +++ /dev/null @@ -1,47 +0,0 @@ -# source path -top_srcdir=@top_srcdir@ -top_builddir=.. -srcdir=@srcdir@ -VPATH=.:$(srcdir)/salome_adm - - -all: resources - -install: - cp -rf @top_srcdir@/salome_adm @prefix@ - -bin: - -resources : - cp -rf @top_srcdir@/salome_adm $(top_builddir) - -inc: - -lib: - -include/salome/SALOMEconfig.h: - -include/salome/config.h: - -include/salome/sstream: - -depend: - -depend_idl: - -install-end: - -install-include: - -install-bin: - -uninstall: - -uninstall-idl: - -distclean: - -clean: - -distclean-other: - diff --git a/salome_adm/unix/Makefile.am b/salome_adm/unix/Makefile.am new file mode 100644 index 000000000..45dec69e5 --- /dev/null +++ b/salome_adm/unix/Makefile.am @@ -0,0 +1,18 @@ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +SUBDIRS = config_files + +DEPRECATED_FILES=\ + DEPRECATED/F77config.h.in \ + DEPRECATED/sstream.in \ + DEPRECATED/envScript.in + +salomeadmux_DATA=\ + SALOMEconfig.h.in \ + depend.in \ + make_commence.in \ + make_conclude.in \ + make_module.in \ + make_omniorb.in \ + $(DEPRECATED_FILES) diff --git a/salome_adm/unix/config_files/Makefile.am b/salome_adm/unix/config_files/Makefile.am new file mode 100644 index 000000000..ce1510536 --- /dev/null +++ b/salome_adm/unix/config_files/Makefile.am @@ -0,0 +1,58 @@ +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + + +# The deprecated files are deprecated for the KERNEL but not for the +# related modules (GUI, MED, ...). Some files have to be installed. +DEPRECATED_FILES=\ + DEPRECATED/ltconfig \ + DEPRECATED/install-sh \ + DEPRECATED/config.sub \ + DEPRECATED/config.guess \ + DEPRECATED/ltmain.sh \ + DEPRECATED/libtool.m4 \ + DEPRECATED/ac_cxx_bool.m4 \ + DEPRECATED/ac_cxx_mutable.m4 \ + DEPRECATED/ac_cxx_partial_specialization.m4 \ + DEPRECATED/check_mico.m4 \ + DEPRECATED/ac_cxx_typename.m4 \ + DEPRECATED/ac_cc_warnings.m4 + +salomem4_DATA=\ +ac_cxx_depend_flag.m4 \ +ac_cxx_have_sstream.m4 \ +ac_cxx_namespaces.m4 \ +ac_cxx_option.m4 \ +ac_cxx_template_options.m4 \ +ac_cxx_use_std_iostream.m4 \ +ac_cxx_warnings.m4 \ +ac_linker_options.m4 \ +check_Kernel.m4 \ +check_boost.m4 \ +check_cas.m4 \ +check_corba.m4 \ +check_cppunit.m4 \ +check_f77.m4 \ +check_hdf5.m4 \ +check_htmlgen.m4 \ +check_lam.m4 \ +check_lsf.m4 \ +check_mpi.m4 \ +check_mpich.m4 \ +check_msg2qm.m4 \ +check_omniorb.m4 \ +check_opengl.m4 \ +check_openpbs.m4 \ +check_pthreads.m4 \ +check_pyqt.m4 \ +check_qt.m4 \ +check_qwt.m4 \ +check_sip.m4 \ +check_sockets.m4 \ +check_swig.m4 \ +check_vtk.m4 \ +check_withihm.m4 \ +enable_pthreads.m4 \ +production.m4 \ +pyembed.m4 \ +python.m4 \ +$(DEPRECATED_FILES) diff --git a/salome_adm/unix/make_common_starter.am b/salome_adm/unix/make_common_starter.am index e856e2444..727e07eea 100644 --- a/salome_adm/unix/make_common_starter.am +++ b/salome_adm/unix/make_common_starter.am @@ -6,11 +6,23 @@ # ============================================================ # -salomeincludedir = $(includedir)/@PACKAGE@ -libdir = $(prefix)/lib/@PACKAGE@ -bindir = $(prefix)/bin/@PACKAGE@ -salomescriptdir = $(bindir) +# Standard directory for installation +salomeincludedir = $(includedir)/@PACKAGE@ +libdir = $(prefix)/lib/@PACKAGE@ +bindir = $(prefix)/bin/@PACKAGE@ +salomescriptdir = $(bindir) + +# Directory for installing idl files +salomeidldir = $(prefix)/idl/@PACKAGE@ + +# Directory for installing resource files +salomeresdir = $(prefix)/share/@PACKAGE@/resources + +# Directories for installing admin files +salomeadmdir = $(prefix)/salome_adm +salomeadmuxdir = $(salomeadmdir)/unix +salomem4dir = $(salomeadmdir)/unix/config_files # Shared modules installation directory -sharedpkgpythondir=${pkgpythondir}/shared_modules +sharedpkgpythondir =$(pkgpythondir)/shared_modules diff --git a/src/Basics/Makefile.am b/src/Basics/Makefile.am index e5a9195e6..e9925f225 100644 --- a/src/Basics/Makefile.am +++ b/src/Basics/Makefile.am @@ -26,6 +26,8 @@ # Module : SALOME # $Header$ +SUBDIRS = Test + salomeincludedir = $(includedir)/@PACKAGE@ salomeinclude_HEADERS = BasicsGenericDestructor.hxx diff --git a/src/Basics/Test/Makefile.in b/src/Basics/Test/Makefile.am similarity index 68% rename from src/Basics/Test/Makefile.in rename to src/Basics/Test/Makefile.am index c98aadb0c..c8353fd72 100644 --- a/src/Basics/Test/Makefile.in +++ b/src/Basics/Test/Makefile.am @@ -21,41 +21,19 @@ # # # -# File : Makefile.in -# Author : Paul RASCLE (EDF) -# Module : SALOME +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL # $Header$ -top_srcdir=@top_srcdir@ -top_builddir=../../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ +include $(top_srcdir)/salome_adm/unix/make_common_starter.am +# +# =============================================================== +# Files to be installed +# =============================================================== +# # header files -EXPORT_HEADERS= BasicMainTest.hxx - -EXPORT_PYSCRIPTS = - -# Libraries targets - -LIB = -LIB_SRC = - -# Executables targets - -BIN = -BIN_SRC = - -CXXFLAGS += @CPPUNIT_INCLUDES@ -CPPFLAGS += @CPPUNIT_INCLUDES@ - -LIBS= @LIBS@ @CPPUNIT_LIBS@ - -LDFLAGS+= - -LDFLAGSFORBIN+= - -@CONCLUDE@ +salomeinclude_HEADERS = BasicMainTest.hxx +# This include file defines the minimal source file for all test +# program. It provides the common main function. diff --git a/src/Makefile.am b/src/Makefile.am index 635527733..2da3f17bf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -25,6 +25,22 @@ # $Header$ SUBDIRS = \ + Basics \ + SALOMELocalTrace + +if CPPUNIT_IS_OK + SUBDIRS+= \ + Basics/Test \ + SALOMELocalTrace/Test \ + Logger/Test \ + SALOMETraceCollector/Test \ + Utils/Test \ + LifeCycleCORBA/Test \ + UnitTests +endif + + +TMPSUBDIRS = \ Basics \ SALOMELocalTrace \ CASCatch \ diff --git a/src/Notification/Makefile.am b/src/Notification/Makefile.am index 0180d9839..ddcccd206 100644 --- a/src/Notification/Makefile.am +++ b/src/Notification/Makefile.am @@ -61,10 +61,11 @@ libSalomeNotification_la_CPPFLAGS =\ libSalomeNotification_la_LDFLAGS = -no-undefined -version-info=0:0:0 -#libSalomeNotification_la_LIBADD =\ -# ../Utils/libOpUtil.la \ -# ../SALOMELocalTrace/libSALOMELocalTrace.la \ -# ../Basics/libSALOMEBasics.la +libSalomeNotification_la_LIBADD =\ + ../Utils/libOpUtil.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + ../Basics/libSALOMEBasics.la \ + @CORBA_LIBS@ #LDFLAGS+= -lOpUtil -lSALOMELocalTrace diff --git a/src/SALOMELocalTrace/Makefile.am b/src/SALOMELocalTrace/Makefile.am index b6c9a7e02..ea97cad92 100644 --- a/src/SALOMELocalTrace/Makefile.am +++ b/src/SALOMELocalTrace/Makefile.am @@ -28,6 +28,8 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am +SUBDIRS = Test + salomeinclude_HEADERS = utilities.h \ LocalTraceBufferPool.hxx \ BaseTraceCollector.hxx diff --git a/src/SALOMELocalTrace/Test/Makefile.am b/src/SALOMELocalTrace/Test/Makefile.am new file mode 100644 index 000000000..186cf18a2 --- /dev/null +++ b/src/SALOMELocalTrace/Test/Makefile.am @@ -0,0 +1,78 @@ +# SALOMELocalTrace : log on local machine +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL +# $Header$ + + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# This directory defines the subdirectory src in the top source directory. +SRCROOT=$(srcdir)/../.. + +# +# =============================================================== +# Files to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS = SALOMELocalTraceTest.hxx + +# Executable scripts to be installed +salomescript_SCRIPTS = TestSALOMELocalTrace.py + +# +# =============================================================== +# Libraries targets +# =============================================================== +# + +lib_LTLIBRARIES = libSALOMELocalTraceTest.la +libSALOMELocalTraceTest_la_SOURCES = SALOMELocalTraceTest.cxx +libSALOMELocalTraceTest_la_CPPFLAGS = \ + @CPPUNIT_INCLUDES@ \ + -I$(SRCROOT)/SALOMELocalTrace \ + -I$(SRCROOT)/Basics + +libSALOMELocalTraceTest_la_LIBADD = \ + @CPPUNIT_LIBS@ \ + ../../SALOMELocalTrace/libSALOMELocalTrace.la + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = TestSALOMELocalTrace +TestSALOMELocalTrace_SOURCES = TestSALOMELocalTrace.cxx +TestSALOMELocalTrace_CPPFLAGS = \ + @CPPUNIT_INCLUDES@ \ + -I$(SRCROOT)/Basics/Test + +TestSALOMELocalTrace_LDADD = \ + @CPPUNIT_LIBS@ \ + libSALOMELocalTraceTest.la \ + ../../SALOMELocalTrace/libSALOMELocalTrace.la \ + ../../Basics/libSALOMEBasics.la diff --git a/src/SALOMELocalTrace/Test/Makefile.in b/src/SALOMELocalTrace/Test/Makefile.in deleted file mode 100644 index 172313ee3..000000000 --- a/src/SALOMELocalTrace/Test/Makefile.in +++ /dev/null @@ -1,62 +0,0 @@ -# SALOMELocalTrace : log on local machine -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE (EDF) -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -# header files -EXPORT_HEADERS= SALOMELocalTraceTest.hxx - -EXPORT_PYSCRIPTS = TestSALOMELocalTrace.py - -# Libraries targets - -LIB = libSALOMELocalTraceTest.la -LIB_SRC = SALOMELocalTraceTest.cxx - -# Executables targets - -BIN = TestSALOMELocalTrace -BIN_SRC = - -CXXFLAGS += @CPPUNIT_INCLUDES@ -CPPFLAGS += @CPPUNIT_INCLUDES@ - -LIBS= @LIBS@ @CPPUNIT_LIBS@ - -LDFLAGS+= -lSALOMELocalTrace - -LDFLAGSFORBIN+= \ - -lSALOMELocalTraceTest -lSALOMELocalTrace -lSALOMEBasics - -@CONCLUDE@ diff --git a/src/SALOMETraceCollector/Makefile.am b/src/SALOMETraceCollector/Makefile.am index 0965d4d6d..df31674a9 100644 --- a/src/SALOMETraceCollector/Makefile.am +++ b/src/SALOMETraceCollector/Makefile.am @@ -23,7 +23,8 @@ lib_LTLIBRARIES = libwith_loggerTraceCollector.la libwith_loggerTraceCollector_la_SOURCES =\ SALOMETraceCollector.cxx \ - TraceCollector_WaitForServerReadiness.cxx + TraceCollector_WaitForServerReadiness.cxx \ + $(BUILT_SOURCES) libwith_loggerTraceCollector_la_CPPFLAGS =\ -I$(srcdir)/../Basics \ -- 2.39.2