[sword-svn] r2731 - in trunk: . bindings/swig bindings/swig/perl bindings/swig/python cmake

greg.hellings at crosswire.org greg.hellings at crosswire.org
Wed Aug 29 01:16:40 MST 2012


Author: greg.hellings
Date: 2012-08-29 01:16:39 -0700 (Wed, 29 Aug 2012)
New Revision: 2731

Added:
   trunk/bindings/swig/CMakeLists.txt
   trunk/bindings/swig/perl/
   trunk/bindings/swig/perl/CMakeLists.txt
   trunk/bindings/swig/perl/install.cmake
   trunk/bindings/swig/python/
   trunk/bindings/swig/python/CMakeLists.txt
   trunk/bindings/swig/python/install.cmake
Removed:
   trunk/cmake/bindings.cmake
Modified:
   trunk/CMakeLists.txt
Log:
Greatly streamlined the building of bindings.

1) Made CMake files more readable by writing file instead of echoing
2) Made compile times faster by reducing the number of compiles from
two to one.
3) Broke .cxx generation from compile to enhance readability.
4) Forced CMake's basic system to work, but discovered it had no way
of installing the resultant libraries and that it still suffered from
mult-compile mania. Abandoned.
5) Moved binding-specific code into the bindings folder rather than
under the cmake modules.

Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt	2012-08-29 03:47:37 UTC (rev 2730)
+++ trunk/CMakeLists.txt	2012-08-29 08:16:39 UTC (rev 2731)
@@ -66,11 +66,16 @@
 	ADD_LIBRARY(sword SHARED ${sword_SOURCES})
 	MESSAGE(STATUS "Building Shared library.")
 	SET(BUILDING_SHARED 1)
+	SET(SWORD_LINK_NAME sword)
 ENDIF(LIBSWORD_LIBRARY_TYPE MATCHES ".*Shared.*" OR NOT LIBSWORD_LIBRARY_TYPE)
 
 IF(LIBSWORD_LIBRARY_TYPE MATCHES ".*Static.*" OR NOT LIBSWORD_LIBRARY_TYPE)
 	ADD_LIBRARY(sword_static STATIC ${sword_SOURCES})
 	SET(BUILDING_STATIC 1)
+	# Defaults to linking against the shared if it is also being built
+	IF(NOT BUILDING_SHARED)
+		SET(SWORD_LINK_NAME sword_static)
+	ENDIF(NOT BUILDING_SHARED)
 	# With MSVC, the .dll files also create .lib files of the same name
 	# with the exported symbols.  Thus, we don't want the two to have the
 	# same exact name.  In other systems, the .a and .so suffixes suffice
@@ -225,7 +230,7 @@
 #
 
 IF(NOT SWORD_BINDINGS STREQUAL "" AND SWORD_BINDINGS)
-	INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/cmake/bindings.cmake")
+	ADD_SUBDIRECTORY("${CMAKE_CURRENT_SOURCE_DIR}/bindings/swig")
 ENDIF(NOT SWORD_BINDINGS STREQUAL "" AND SWORD_BINDINGS)
 
 ##############################################################################################

Added: trunk/bindings/swig/CMakeLists.txt
===================================================================
--- trunk/bindings/swig/CMakeLists.txt	                        (rev 0)
+++ trunk/bindings/swig/CMakeLists.txt	2012-08-29 08:16:39 UTC (rev 2731)
@@ -0,0 +1,48 @@
+#####################################################################################################
+#
+# A system to, hopefully, build the Sword bindings which are asked for.  Currently I only know and
+# therefore only support Python & Perl bindings.  YMMV for it, please submit patches or suggestions.
+# I will try to get them integrated into the system if I can.  If there are bindings that you need
+# other than the Python|Perl/Swig bindings, then you should probably speak up now.
+
+MESSAGE(STATUS "\n-- CONFIGURING SWIG BINDINGS")
+#####################################################################################################
+# SWIG
+# We need to find the SWIG executable in order to be able to do this, right?
+FIND_PACKAGE(SWIG)
+
+IF(NOT SWIG_FOUND)
+	MESSAGE(FATAL_ERROR "Swig: no")
+ELSE(NOT SWIG_FOUND)
+	MESSAGE(STATUS "Swig: yes")
+	
+	#INCLUDE(${SWIG_USE_FILE})
+	
+	#INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+	#INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}../../include)
+	#INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..)
+	#INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../..)
+	
+	SET(CMAKE_SWIG_FLAGS "-w-451,-402;-shadow;-c++")
+	
+	MACRO(SWORD_SWIG_GENERATE LANG)
+		ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Sword.cxx
+			COMMAND ${SWIG_EXECUTABLE} ${CMAKE_SWIG_FLAGS} -${LANG} -o "${CMAKE_CURRENT_BINARY_DIR}/Sword.cxx"
+				"-I${CMAKE_SOURCE_DIR}/bindings/swig" ${SWIG_INCLUDES} "${CMAKE_SOURCE_DIR}/bindings/swig/sword.i"
+			WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+	ENDMACRO(SWORD_SWIG_GENERATE)
+	
+	GET_DIRECTORY_PROPERTY(cmake_include_directories INCLUDE_DIRECTORIES)
+	SET(SWIG_INCLUDES)
+	FOREACH(directory ${cmake_include_directories})
+		SET(SWIG_INCLUDES ${SWIG_INCLUDES} "-I${directory}")
+	ENDFOREACH(directory ${cmake_include_directories})
+	
+	IF(SWORD_BINDINGS MATCHES ".*Python.*")
+		ADD_SUBDIRECTORY(python)
+	ENDIF(SWORD_BINDINGS MATCHES ".*Python.*")
+	
+	IF(SWORD_BINDINGS MATCHES ".*Perl.*")
+		ADD_SUBDIRECTORY(perl)
+	ENDIF(SWORD_BINDINGS MATCHES ".*Perl.*")
+ENDIF(NOT SWIG_FOUND)

Added: trunk/bindings/swig/perl/CMakeLists.txt
===================================================================
--- trunk/bindings/swig/perl/CMakeLists.txt	                        (rev 0)
+++ trunk/bindings/swig/perl/CMakeLists.txt	2012-08-29 08:16:39 UTC (rev 2731)
@@ -0,0 +1,67 @@
+# This method works but there is no good way to install the results of it
+#FIND_PACKAGE(PerlLibs REQUIRED)
+#INCLUDE_DIRECTORIES(${PERL_INCLUDE_PATH})
+#
+#SET_SOURCE_FILES_PROPERTIES(../sword.i PROPERTIES CPLUSPLUS ON)
+#SET_SOURCE_FILES_PROPERTIES(../sword.i PROPERTIES SWIG_FLAGS "")
+#
+#SWIG_ADD_MODULE(Sword perl
+#	"../sword.i"
+#)
+#
+#SWIG_LINK_LIBRARIES(Sword ${PERL_LIBRARY} ${SWORD_LINK_NAME})
+
+FIND_PACKAGE(Perl REQUIRED)
+
+SET(PERL_MAKEFILE "#!${PERL_EXECUTABLE}
+
+use ExtUtils::MakeMaker;
+
+# See lib/ExtUtils/MakeMaker.pm for details of how to influence
+# the contents of the Makefile that is written
+WriteMakefile(
+	'NAME'		=> 'Sword',
+	'VERSION'	=> '${SWORD_VERSION}',
+	'INC'		=> '-I${CMAKE_SOURCE_DIR}/include -I${CMAKE_CURRENT_SOURCE_DIR}/..',
+	'DEFINE'	=> '-DSWIG',
+	'LIBS'		=> '-L${CMAKE_BINARY_DIR} -lsword -lz',
+	'PREREQ_PM'	=> {},
+		($] >= 5.005 ? ## Add these new keywords supported since 5.005
+		(ABSTRACT => 'Sword Project perl bindings', # retrieve abstract from module
+		AUTHOR => 'Sword Project <sword-devel at crosswire.org>') : ()),
+);
+
+rename 'Makefile', 'Makefile.old' or die \"Can't rename Makefile\";
+open(INPUT, '<Makefile.old') or die \"Can't open input Makefile.old\";
+open(OUTPUT,'>Makefile') or die \"Can't open output Makefile\";
+while (<INPUT>) {
+  s/\\-lsword/\\-lsword \\-lstdc\\+\\+/;
+  print OUTPUT \"$_\";
+}
+
+close INPUT;
+close OUTPUT;")
+FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/Makefile.PL "${PERL_MAKEFILE}")
+
+SET(SKIP_MAKEFILE "\\.old
+~$
+\\.bak
+^CVS
+Makefile$")
+FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/Makefile.SKIP "${SKIP_MAKEFILE}")
+
+SWORD_SWIG_GENERATE(perl)
+
+ADD_CUSTOM_COMMAND(OUTPUT MANIFEST
+	COMMAND ${PERL_EXECUTABLE} Makefile.PL && make -j1 clean
+	COMMAND ${PERL_EXECUTABLE} Makefile.PL && make -j1 manifest
+	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+
+ADD_CUSTOM_TARGET(perlswig ALL
+	COMMAND make -j1
+	DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Sword.cxx ${CMAKE_CURRENT_BINARY_DIR}/MANIFEST ${SWORD_LINK_NAME}
+	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+
+INSTALL(SCRIPT install.cmake)
+
+MESSAGE(STATUS "Perl: yes")

Added: trunk/bindings/swig/perl/install.cmake
===================================================================
--- trunk/bindings/swig/perl/install.cmake	                        (rev 0)
+++ trunk/bindings/swig/perl/install.cmake	2012-08-29 08:16:39 UTC (rev 2731)
@@ -0,0 +1,3 @@
+EXECUTE_PROCESS(COMMAND
+	make install
+	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bindings/swig/perl/)

Added: trunk/bindings/swig/python/CMakeLists.txt
===================================================================
--- trunk/bindings/swig/python/CMakeLists.txt	                        (rev 0)
+++ trunk/bindings/swig/python/CMakeLists.txt	2012-08-29 08:16:39 UTC (rev 2731)
@@ -0,0 +1,43 @@
+# This method works, but there is no established way to do the installation
+#FIND_PACKAGE(PythonLibs REQUIRED)
+#INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})
+#
+#SET_SOURCE_FILES_PROPERTIES(../sword.i PROPERTIES CPLUSPLUS ON)
+#SET_SOURCE_FILES_PROPERTIES(../sword.i PROPERTIES SWIG_FLAGS "")
+#
+#SWIG_ADD_MODULE(Sword python
+#	"../sword.i"
+#)
+#
+#SWIG_LINK_LIBRARIES(Sword ${PYTHON_LIBRARIES} ${SWORD_LINK_NAME})
+
+FIND_PACKAGE(PythonInterp REQUIRED)
+
+SET(PY_SCRIPT "#!${PYTHON_EXECUTABLE} python
+
+from distutils.core import setup, Extension
+setup(name='sword',version='${SWORD_VERSION}',
+maintainer='Sword Developers',
+maintainer_email='sword-devel at crosswire.org',
+url='http://www.crosswire.org/sword',
+py_modules=['Sword'],
+include_dirs=['${CMAKE_CURRENT_SOURCE_DIR}', '${CMAKE_SOURCE_DIR}/include', '${CMAKE_CURRENT_SOURCE_DIR}/..', '${CMAKE_CURRENT_SOURCE_DIR}../../'],
+ext_modules = [Extension('_Sword',['Sword.cxx'],
+libraries=[('sword')],
+library_dirs=[('${CMAKE_BINARY_DIR}')],
+)]
+,)"
+)
+
+FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/setup.py "${PY_SCRIPT}")
+
+SWORD_SWIG_GENERATE(python)
+
+ADD_CUSTOM_TARGET(swordswig ALL
+	COMMAND python setup.py build
+	DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Sword.cxx ${SWORD_LINK_NAME}
+	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+
+INSTALL(SCRIPT install.cmake)
+
+MESSAGE(STATUS "Python: yes")

Added: trunk/bindings/swig/python/install.cmake
===================================================================
--- trunk/bindings/swig/python/install.cmake	                        (rev 0)
+++ trunk/bindings/swig/python/install.cmake	2012-08-29 08:16:39 UTC (rev 2731)
@@ -0,0 +1,4 @@
+EXECUTE_PROCESS(COMMAND
+	python setup.py install
+	WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bindings/swig/python"
+)

Deleted: trunk/cmake/bindings.cmake
===================================================================
--- trunk/cmake/bindings.cmake	2012-08-29 03:47:37 UTC (rev 2730)
+++ trunk/cmake/bindings.cmake	2012-08-29 08:16:39 UTC (rev 2731)
@@ -1,133 +0,0 @@
-#####################################################################################################
-#
-# A system to, hopefully, build the Sword bindings which are asked for.  Currently I only know and
-# therefore only support Python & Perl bindings.  YMMV for it, please submit patches or suggestions.
-# I will try to get them integrated into the system if I can.  If there are bindings that you need
-# other than the Python|Perl/Swig bindings, then you should probably speak up now.
-
-MESSAGE(STATUS "\n-- CONFIGURING SWIG BINDINGS")
-#####################################################################################################
-# SWIG
-# We need to find the SWIG executable in order to be able to do this, right?
-FIND_PACKAGE(SWIG)
-
-IF(NOT SWIG_FOUND)
-	MESSAGE(FATAL_ERROR "Swig: no")
-ELSE(NOT SWIG_FOUND)
-	MESSAGE(STATUS "Swig: yes")
-	
-	SET(SWORD_SWIG_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/bindings/swig")
-	SET(SWORD_SWIG_BINARY "${CMAKE_CURRENT_BINARY_DIR}/bindings/swig")
-	
-	# This code that is commented out is basically how CMake suggests that you do it.  I, on the
-	# other hand, can't seem to get it to do that.  The manual seems to work though, so go with that
-	# instead.
-	#INCLUDE(${SWIG_USE_FILE})
-	
-	#FIND_PACKAGE(PythonLibs)
-	#INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
-	#INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/bindings/swig)
-	
-	#SET(CMAKE_SWIG_FLAGS "")
-	
-	#SET_SOURCE_FILES_PROPERTIES(sword.i PROPERTIES CPLUSPLUS ON)
-	#SET_SOURCE_FILES_PROPERTIES(sword.i PROPERTIES SWIG_FLAGS "-shadow")
-	
-	#SWIG_ADD_MODULE(sword python
-	#	"${CMAKE_CURRENT_SOURCE_DIR}/bindings/swig/sword.i" 
-		#"${CMAKE_CURRENT_SOURCE_DIR}/bindings/swig/python/Sword.cxx"
-	#	)
-	#SWIG_LINK_LIBRARIES(sword ${PYTHON_LIBRARIES})
-	
-	# Borrowed this from the CMake UseSWIG.cmake file
-	GET_DIRECTORY_PROPERTY(cmake_include_directories INCLUDE_DIRECTORIES)
-	SET(SWIG_INCLUDES)
-	FOREACH(direct ${cmake_include_directories})
-		SET(SWIG_INCLUDES ${SWIG_INCLUDES} "-I${direct}")
-	ENDFOREACH(direct ${cmake_include_directories})
-# 	MESSAGE(STATUS "${SWIG_INCLUDES} include directories")
-
-	IF(SWORD_BINDINGS MATCHES ".*Python.*")
-		# This should add the pythonswig target to be built when the "make" command is executed
-		ADD_CUSTOM_TARGET(pythonswig ALL
-				mkdir -p "${SWORD_SWIG_BINARY}/python"
-			COMMAND	${SWIG_EXECUTABLE}  "-w-451,-402" -python -c++ -shadow -o "${SWORD_SWIG_BINARY}/python/Sword.cxx" "-I${SWORD_SWIG_SOURCE}" ${SWIG_INCLUDES} "${SWORD_SWIG_SOURCE}/sword.i"
-			COMMAND	echo "#! /usr/bin/python" > ${SWORD_SWIG_BINARY}/python/setup.py
-			COMMAND echo "" >> ${SWORD_SWIG_BINARY}/python/setup.py
-			COMMAND echo "from distutils.core import setup, Extension" >> ${SWORD_SWIG_BINARY}/python/setup.py
-			COMMAND echo "setup (name = \"sword\"," >> ${SWORD_SWIG_BINARY}/python/setup.py
-			COMMAND echo " version = \"${SWORD_VERSION}\"," >> ${SWORD_SWIG_BINARY}/python/setup.py
-			COMMAND echo " maintainer = \"Sword Developers\"," >> ${SWORD_SWIG_BINARY}/python/setup.py
-			COMMAND echo " maintainer_email = \"sword-devel at crosswire.org\"," >> ${SWORD_SWIG_BINARY}/python/setup.py
-			COMMAND echo " url = \"http://www.crosswire.org/sword\"," >> ${SWORD_SWIG_BINARY}/python/setup.py
-			COMMAND echo " py_modules = [\"Sword\"]," >> ${SWORD_SWIG_BINARY}/python/setup.py
-			COMMAND echo " include_dirs=['${SWORD_SWIG_SOURCE}', '${CMAKE_CURRENT_SOURCE_DIR}/include', '${SWORD_SWIG_SOURCE}/..', '${SWORD_SWIG_SOURCE}/../..']," >> ${SWORD_SWIG_BINARY}/python/setup.py
-			COMMAND echo " ext_modules = [Extension(\"_Sword\", [\"Sword.cxx\"]," >> ${SWORD_SWIG_BINARY}/python/setup.py
-			COMMAND echo " libraries=[('sword')], " >> ${SWORD_SWIG_BINARY}/python/setup.py
-                        COMMAND echo " library_dirs=[('${CMAKE_CURRENT_BINARY_DIR}')], " >> ${SWORD_SWIG_BINARY}/python/setup.py
-			COMMAND echo " )], " >> ${SWORD_SWIG_BINARY}/python/setup.py
-			COMMAND echo ")" >> ${SWORD_SWIG_BINARY}/python/setup.py
-			COMMAND echo "Python bindings built, to install change into ${SWORD_SWIG_BINARY}/python and type 'python setup.py install'"
-			DEPENDS sword
-			WORKING_DIRECTORY "${SWORD_SWIG_SOURCE}"
-			VERBATIM
-		)
-		
-		MESSAGE(STATUS "Python: yes")
-	ENDIF(SWORD_BINDINGS MATCHES ".*Python.*")
-	
-	IF(SWORD_BINDINGS MATCHES ".*Perl.*")
-		FIND_PACKAGE(Perl REQUIRED)
-		IF(PERL_FOUND)
-			# This should add the perlswig target to be build with the "make" command is executed
-			ADD_CUSTOM_TARGET(perlswig ALL
-				mkdir -p "${SWORD_SWIG_BINARY}/perl"
-				COMMAND ${SWIG_EXECUTABLE} "-w-451,-402" -perl -c++ -shadow -o "${SWORD_SWIG_BINARY}/perl/Sword.cxx" "-I${SWORD_SWIG_SOURCE}" ${SWIG_INCLUDES} "${SWORD_SWIG_SOURCE}/sword.i"
-				COMMAND echo "Writing ${SWORD_SWIG_BINARY}/perl/Makefile.PL"
-				COMMAND echo "#! /usr/bin/perl" > ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "use ExtUtils::MakeMaker;" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "# See lib/ExtUtils/MakeMaker.pm for details of how to influence" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "# the contents of the Makefile that is written." >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "WriteMakefile(" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "         'NAME'          => 'Sword'," >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "         'VERSION'       => '${SWORD_VERSION}'," >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "         'INC'           => '-I${CMAKE_CURRENT_SOURCE_DIR}/include -I${SWORD_SWIG_SOURCE}'," >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "         'DEFINE'        => '-DSWIG'," >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "         'LIBS'          => '-L${CMAKE_CURRENT_BINARY_DIR} -lsword -lz'," >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "         'PREREQ_PM'     => {}, # e.g., Module::Name => 1.1" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "                 ($] >= 5.005 ?         ## Add these new keywords supported since 5.005" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "                 (ABSTRACT => 'Sword Project perl bindings', # retrieve abstract from module" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "                 AUTHOR          => 'Sword Project <sword-devel at crosswire.org>') : ())," >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo ");" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "rename 'Makefile', 'Makefile.old' or die \"can't rename Makefile\";" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "open(INPUT, '<Makefile.old') or die \"can't open input Makefile.old\";" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "open(OUTPUT, '>Makefile') or die \"can't open output Makefile\";" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "while (<INPUT>) {" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo " s/\\-lsword/\\-lsword \\-lstdc\\+\\+/;" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo " print OUTPUT \"$_\";" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "}" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "close INPUT;" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND echo "close OUTPUT;" >> ${SWORD_SWIG_BINARY}/perl/Makefile.PL
-				COMMAND cd ${SWORD_SWIG_BINARY}/perl && ${PERL_EXECUTABLE} Makefile.PL && make clean
-				COMMAND echo "\\.old" > ${SWORD_SWIG_BINARY}/perl/MANIFEST.SKIP
-				COMMAND echo "~$" >> ${SWORD_SWIG_BINARY}/perl/MANIFEST.SKIP
-				COMMAND echo "\\.bak" >> ${SWORD_SWIG_BINARY}/perl/MANIFEST.SKIP
-				COMMAND echo "^CVS" >> ${SWORD_SWIG_BINARY}/perl/MANIFEST.SKIP
-				COMMAND echo "Makefile$" >> ${SWORD_SWIG_BINARY}/perl/MANIFEST.SKIP
-				COMMAND cd ${SWORD_SWIG_BINARY}/perl && ${PERL_EXECUTABLE} Makefile.PL && make manifest
-				COMMAND echo "Perl bindings built, to install change into ${SWORD_SWIG_BINARY}/perl and type 'make install'"
-				DEPENDS sword
-				WORKING_DIRECTORY "${SWORD_SWIG_SOURCE}"
-				VERBATIM
-			)
-			
-			MESSAGE(STATUS "Perl: yes")
-		ELSE(PERL_FOUND)
-			MESSAGE(FATAL_ERROR "Perl: not found")
-		ENDIF(PERL_FOUND)
-	ENDIF(SWORD_BINDINGS MATCHES ".*Perl.*")
-ENDIF(NOT SWIG_FOUND)




More information about the sword-cvs mailing list