From: barate Date: Tue, 15 Jan 2013 10:56:34 +0000 (+0000) Subject: Naming consistency: headers are now installed in include/libbatch, library is now... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2d7ff04e6d65b810c1ea15bf50b6a3195fb2cc89;p=tools%2Flibbatch.git Naming consistency: headers are now installed in include/libbatch, library is now libbatch.so and Python module is libbatch.py --- diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index c85a28a..fade8d3 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -28,4 +28,4 @@ ADD_CUSTOM_TARGET(doc ALL ${MAKEINFO_EXECUTABLE} --html ${TEXI_FILE}) FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Batch) -INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Batch/ DESTINATION share/Batch/doc) +INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Batch/ DESTINATION share/libbatch/doc) diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt index c0ec92b..3266b56 100644 --- a/misc/CMakeLists.txt +++ b/misc/CMakeLists.txt @@ -21,12 +21,12 @@ # email : webmaster.salome@opencascade.com INSTALL(FILES check_libbatch.m4 - DESTINATION share/Batch/misc) + DESTINATION share/libbatch/misc) -GET_TARGET_PROPERTY(LIBBATCH_ABS_PATH Batch LOCATION) +GET_TARGET_PROPERTY(LIBBATCH_ABS_PATH batch LOCATION) GET_FILENAME_COMPONENT(LIBBATCH_REAL_NAME ${LIBBATCH_ABS_PATH} NAME) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libBatchConfig.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/libBatchConfig.cmake @ONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libbatchConfig.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/libbatchConfig.cmake @ONLY) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libBatchConfig.cmake +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libbatchConfig.cmake DESTINATION lib) diff --git a/misc/check_libbatch.m4 b/misc/check_libbatch.m4 index 9fb0f1b..4e67887 100644 --- a/misc/check_libbatch.m4 +++ b/misc/check_libbatch.m4 @@ -1,35 +1,35 @@ -dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl See http://www.salome-platform.org/ or -dnl email : webmaster.salome@opencascade.com +dnl See http://www.salome-platform.org/ or +dnl email : webmaster.salome@opencascade.com dnl # CHECK_LIBBATCH -# This macro can be used to find libBatch and set the associated variables in +# This macro can be used to find libbatch and set the associated variables in # a project based on autoconf. You can copy this file in your own project and # eventually modify it according to your own needs. # ---------------------------------------------------------------------------- AC_DEFUN([CHECK_LIBBATCH],[ -AC_MSG_NOTICE(Checking for libBatch library) +AC_MSG_NOTICE(Checking for libbatch library) AC_SUBST(LIBBATCH_INCLUDES) AC_SUBST(LIBBATCH_LIBS) @@ -59,27 +59,27 @@ LOCAL_LIBS="" if test "x$LIBBATCH_DIR" != "x" ; then LOCAL_INCLUDES="-I$LIBBATCH_DIR/include" if test "x$LIBBATCH_DIR" = "x/usr" ; then - LOCAL_LIBS="-lBatch" + LOCAL_LIBS="-lbatch" else - LOCAL_LIBS="-L$LIBBATCH_DIR/lib -lBatch" + LOCAL_LIBS="-L$LIBBATCH_DIR/lib -lbatch" fi else LOCAL_INCLUDES="-I/usr/include" - LOCAL_LIBS="-lBatch" + LOCAL_LIBS="-lbatch" fi -# libBatch headers +# libbatch headers CPPFLAGS_old="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES" -AC_CHECK_HEADER(Batch/Batch_BatchManager.hxx, +AC_CHECK_HEADER(libbatch/Batch_BatchManager.hxx, libbatch_ok="yes", libbatch_ok="no") CPPFLAGS="$CPPFLAGS_old" if test "x$libbatch_ok" = "xyes" ; then - # libBatch library + # libbatch library LIBS_old=$LIBS LIBS="$LIBS $LOCAL_LIBS" @@ -110,6 +110,6 @@ if test "x$libbatch_ok" = "xyes" ; then LIBBATCH_LIBS="$LOCAL_LIBS" fi -AC_MSG_RESULT(for libBatch: $libbatch_ok) +AC_MSG_RESULT(for libbatch: $libbatch_ok) ]) diff --git a/misc/libBatchConfig.cmake.in b/misc/libBatchConfig.cmake.in deleted file mode 100644 index 5e457c1..0000000 --- a/misc/libBatchConfig.cmake.in +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 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.salome-platform.org/ or -# email : webmaster.salome@opencascade.com - -get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -get_filename_component(LIBBATCH_ROOT_DIR "${SELF_DIR}/.." ABSOLUTE) -set(LIBBATCH_INCLUDE_DIRS "${LIBBATCH_ROOT_DIR}/include/Batch") -set(LIBBATCH_LIBRARIES "${LIBBATCH_ROOT_DIR}/lib/@LIBBATCH_REAL_NAME@") -set(LIBBATCH_RUNTIME_LIBRARY_DIRS "${LIBBATCH_ROOT_DIR}/lib") -set(LIBBATCH_PYTHONPATH "${LIBBATCH_ROOT_DIR}/lib/python@PYTHON_VERSION@/site-packages") diff --git a/misc/libbatchConfig.cmake.in b/misc/libbatchConfig.cmake.in new file mode 100644 index 0000000..3d1345a --- /dev/null +++ b/misc/libbatchConfig.cmake.in @@ -0,0 +1,28 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 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.salome-platform.org/ or +# email : webmaster.salome@opencascade.com + +get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(LIBBATCH_ROOT_DIR "${SELF_DIR}/.." ABSOLUTE) +set(LIBBATCH_INCLUDE_DIRS "${LIBBATCH_ROOT_DIR}/include/libbatch") +set(LIBBATCH_LIBRARIES "${LIBBATCH_ROOT_DIR}/lib/@LIBBATCH_REAL_NAME@") +set(LIBBATCH_RUNTIME_LIBRARY_DIRS "${LIBBATCH_ROOT_DIR}/lib") +set(LIBBATCH_PYTHONPATH "${LIBBATCH_ROOT_DIR}/lib/python@PYTHON_VERSION@/site-packages") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 66a48e4..d334b16 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -70,21 +70,21 @@ SET(HDR_FILES ${HDR_FILES_BUILD} CACHE INTERNAL "") SET(HDR_FILES_BUILD CACHE INTERNAL "") -add_library (Batch SHARED ${SRC_FILES}) +add_library(batch SHARED ${SRC_FILES}) include_directories(${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Core) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Local) -target_link_libraries(Batch ${PTHREAD_LIBRARY}) +target_link_libraries(batch ${PTHREAD_LIBRARY}) IF (WIN32) - target_link_libraries(Batch ws2_32) + target_link_libraries(batch ws2_32) ENDIF (WIN32) # If necessary, activate all warnings (useful for debugging and code cleaning) # add_definitions(-Wall -Werror -ansi -pedantic) -INSTALL(TARGETS Batch DESTINATION lib) -INSTALL(FILES ${HDR_FILES} DESTINATION include/Batch) +INSTALL(TARGETS batch DESTINATION lib) +INSTALL(FILES ${HDR_FILES} DESTINATION include/libbatch) IF (BUILD_PYTHON_WRAPPING AND Python_FOUND AND SWIG_FOUND) add_subdirectory (Python) diff --git a/src/LSF/Test/CMakeLists.txt b/src/LSF/Test/CMakeLists.txt index de1db94..2794feb 100644 --- a/src/LSF/Test/CMakeLists.txt +++ b/src/LSF/Test/CMakeLists.txt @@ -33,7 +33,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) # Build the test programs and add the tests add_executable(Test_eLSF Test_eLSF.cxx) -target_link_libraries(Test_eLSF Batch SimpleParser) +target_link_libraries(Test_eLSF batch SimpleParser) IF (HAS_SSH) ADD_TEST(eLSF_SSH Test_eLSF SSH) diff --git a/src/LoadLeveler/Test/CMakeLists.txt b/src/LoadLeveler/Test/CMakeLists.txt index 293c8ff..f3d24a3 100644 --- a/src/LoadLeveler/Test/CMakeLists.txt +++ b/src/LoadLeveler/Test/CMakeLists.txt @@ -33,7 +33,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) # Build the test programs and add the tests add_executable(Test_eLL Test_eLL.cxx) -target_link_libraries(Test_eLL Batch SimpleParser) +target_link_libraries(Test_eLL batch SimpleParser) IF (HAS_SSH) ADD_TEST(eLL_SSH Test_eLL SSH) diff --git a/src/Local/Test/CMakeLists.txt b/src/Local/Test/CMakeLists.txt index 4ff10b4..69b86d3 100644 --- a/src/Local/Test/CMakeLists.txt +++ b/src/Local/Test/CMakeLists.txt @@ -44,19 +44,19 @@ IF (HAS_SH) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Test_Local_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Test_Local_config.h) add_executable(Test_Local_SH Test_Local_SH.cxx) - target_link_libraries(Test_Local_SH Batch SimpleParser) + target_link_libraries(Test_Local_SH batch SimpleParser) ADD_TEST(Local_SH Test_Local_SH) ENDIF (HAS_SH) IF (HAS_SSH) add_executable(Test_Local_SSH Test_Local_SSH.cxx) - target_link_libraries(Test_Local_SSH Batch SimpleParser) + target_link_libraries(Test_Local_SSH batch SimpleParser) ADD_TEST(Local_SSH Test_Local_SSH) ENDIF (HAS_SSH) IF (HAS_RSH) add_executable(Test_Local_RSH Test_Local_RSH.cxx) - target_link_libraries(Test_Local_RSH Batch SimpleParser) + target_link_libraries(Test_Local_RSH batch SimpleParser) ADD_TEST(Local_RSH Test_Local_RSH) ENDIF (HAS_RSH) diff --git a/src/PBS/Test/CMakeLists.txt b/src/PBS/Test/CMakeLists.txt index 32dfa9b..bad38d1 100644 --- a/src/PBS/Test/CMakeLists.txt +++ b/src/PBS/Test/CMakeLists.txt @@ -33,7 +33,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) # Build the test programs and add the tests add_executable(Test_ePBS Test_ePBS.cxx) -target_link_libraries(Test_ePBS Batch SimpleParser) +target_link_libraries(Test_ePBS batch SimpleParser) IF (HAS_SSH) ADD_TEST(ePBS_SSH Test_ePBS SSH) diff --git a/src/Python/CMakeLists.txt b/src/Python/CMakeLists.txt index f9a8a3a..6f5dfe0 100644 --- a/src/Python/CMakeLists.txt +++ b/src/Python/CMakeLists.txt @@ -28,14 +28,14 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) SET(SWIG_SRC_FILE libBatch_Swig.i) SET_SOURCE_FILES_PROPERTIES(${SWIG_SRC_FILE} PROPERTIES CPLUSPLUS ON SWIG_FLAGS "-shadow") -SWIG_ADD_MODULE(libBatch_Swig python ${SWIG_SRC_FILE}) -SWIG_LINK_LIBRARIES(libBatch_Swig Batch ${PYTHON_LIBRARIES}) +SWIG_ADD_MODULE(libbatch python ${SWIG_SRC_FILE}) +SWIG_LINK_LIBRARIES(libbatch batch ${PYTHON_LIBRARIES}) -INSTALL(TARGETS ${SWIG_MODULE_libBatch_Swig_REAL_NAME} DESTINATION lib/python${PYTHON_VERSION}/site-packages) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libBatch_Swig.py +INSTALL(TARGETS ${SWIG_MODULE_libbatch_REAL_NAME} DESTINATION lib/python${PYTHON_VERSION}/site-packages) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libbatch.py DESTINATION lib/python${PYTHON_VERSION}/site-packages) -SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES libBatch_Swig.py) +SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES libbatch.py) IF (TEST_ENABLED) add_subdirectory(Test) diff --git a/src/Python/Test/Test_Python_Local_SH.py b/src/Python/Test/Test_Python_Local_SH.py index d327324..64a70af 100644 --- a/src/Python/Test/Test_Python_Local_SH.py +++ b/src/Python/Test/Test_Python_Local_SH.py @@ -25,8 +25,8 @@ import os import sys import time -# Import libBatch library -from libBatch_Swig import * +# Import libbatch library +from libbatch import * def work(): print "*******************************************************************************************" diff --git a/src/Python/libBatch_Swig.i b/src/Python/libBatch_Swig.i index 3abc72b..dea1d94 100644 --- a/src/Python/libBatch_Swig.i +++ b/src/Python/libBatch_Swig.i @@ -41,7 +41,7 @@ /* Le nom du module Python tel qu'il est importe */ -%module libBatch_Swig +%module libbatch /* generate docstrings with types */ %feature("autodoc", "1"); diff --git a/src/Slurm/Test/CMakeLists.txt b/src/Slurm/Test/CMakeLists.txt index 3163654..be028f6 100644 --- a/src/Slurm/Test/CMakeLists.txt +++ b/src/Slurm/Test/CMakeLists.txt @@ -33,7 +33,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) # Build the test programs and add the tests add_executable(Test_eSlurm Test_eSlurm.cxx) -target_link_libraries(Test_eSlurm Batch SimpleParser) +target_link_libraries(Test_eSlurm batch SimpleParser) IF (HAS_SSH) ADD_TEST(eSlurm_SSH Test_eSlurm SSH) diff --git a/src/Vishnu/Test/CMakeLists.txt b/src/Vishnu/Test/CMakeLists.txt index 84d88d0..9e66fb2 100644 --- a/src/Vishnu/Test/CMakeLists.txt +++ b/src/Vishnu/Test/CMakeLists.txt @@ -33,7 +33,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) # Build the test programs and add the tests add_executable(Test_eVishnu Test_eVishnu.cxx) -target_link_libraries(Test_eVishnu Batch SimpleParser) +target_link_libraries(Test_eVishnu batch SimpleParser) IF (HAS_SSH) ADD_TEST(eVishnu_SSH Test_eVishnu SSH)